laag-xz 5.2.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +57 -0
- data/LICENSE.txt +65 -0
- data/README.org +34 -0
- data/ext/laag/xz/extconf.rb +21 -0
- data/laag-xz.gemspec +20 -0
- data/lib/laag/xz.rb +29 -0
- data/vendor/git.tukaani.org/xz/.gitignore +66 -0
- data/vendor/git.tukaani.org/xz/AUTHORS +27 -0
- data/vendor/git.tukaani.org/xz/COPYING +65 -0
- data/vendor/git.tukaani.org/xz/COPYING.GPLv2 +339 -0
- data/vendor/git.tukaani.org/xz/COPYING.GPLv3 +674 -0
- data/vendor/git.tukaani.org/xz/COPYING.LGPLv2.1 +502 -0
- data/vendor/git.tukaani.org/xz/ChangeLog +7 -0
- data/vendor/git.tukaani.org/xz/Doxyfile.in +1234 -0
- data/vendor/git.tukaani.org/xz/INSTALL +618 -0
- data/vendor/git.tukaani.org/xz/INSTALL.generic +365 -0
- data/vendor/git.tukaani.org/xz/Makefile.am +110 -0
- data/vendor/git.tukaani.org/xz/NEWS +571 -0
- data/vendor/git.tukaani.org/xz/PACKAGERS +231 -0
- data/vendor/git.tukaani.org/xz/README +308 -0
- data/vendor/git.tukaani.org/xz/THANKS +124 -0
- data/vendor/git.tukaani.org/xz/TODO +111 -0
- data/vendor/git.tukaani.org/xz/autogen.sh +22 -0
- data/vendor/git.tukaani.org/xz/build-aux/manconv.sh +58 -0
- data/vendor/git.tukaani.org/xz/build-aux/version.sh +24 -0
- data/vendor/git.tukaani.org/xz/configure.ac +900 -0
- data/vendor/git.tukaani.org/xz/debug/Makefile.am +30 -0
- data/vendor/git.tukaani.org/xz/debug/README +17 -0
- data/vendor/git.tukaani.org/xz/debug/crc32.c +39 -0
- data/vendor/git.tukaani.org/xz/debug/full_flush.c +103 -0
- data/vendor/git.tukaani.org/xz/debug/hex2bin.c +53 -0
- data/vendor/git.tukaani.org/xz/debug/known_sizes.c +129 -0
- data/vendor/git.tukaani.org/xz/debug/memusage.c +51 -0
- data/vendor/git.tukaani.org/xz/debug/repeat.c +36 -0
- data/vendor/git.tukaani.org/xz/debug/sync_flush.c +125 -0
- data/vendor/git.tukaani.org/xz/debug/translation.bash +100 -0
- data/vendor/git.tukaani.org/xz/doc/examples/00_README.txt +31 -0
- data/vendor/git.tukaani.org/xz/doc/examples/01_compress_easy.c +297 -0
- data/vendor/git.tukaani.org/xz/doc/examples/02_decompress.c +287 -0
- data/vendor/git.tukaani.org/xz/doc/examples/03_compress_custom.c +193 -0
- data/vendor/git.tukaani.org/xz/doc/examples/04_compress_easy_mt.c +206 -0
- data/vendor/git.tukaani.org/xz/doc/examples/Makefile +24 -0
- data/vendor/git.tukaani.org/xz/doc/examples_old/xz_pipe_comp.c +127 -0
- data/vendor/git.tukaani.org/xz/doc/examples_old/xz_pipe_decomp.c +123 -0
- data/vendor/git.tukaani.org/xz/doc/faq.txt +224 -0
- data/vendor/git.tukaani.org/xz/doc/history.txt +150 -0
- data/vendor/git.tukaani.org/xz/doc/lzma-file-format.txt +166 -0
- data/vendor/git.tukaani.org/xz/doc/xz-file-format.txt +1150 -0
- data/vendor/git.tukaani.org/xz/dos/INSTALL.txt +79 -0
- data/vendor/git.tukaani.org/xz/dos/Makefile +147 -0
- data/vendor/git.tukaani.org/xz/dos/README.txt +123 -0
- data/vendor/git.tukaani.org/xz/dos/config.h +136 -0
- data/vendor/git.tukaani.org/xz/extra/7z2lzma/7z2lzma.bash +115 -0
- data/vendor/git.tukaani.org/xz/extra/scanlzma/scanlzma.c +88 -0
- data/vendor/git.tukaani.org/xz/lib/Makefile.am +32 -0
- data/vendor/git.tukaani.org/xz/lib/getopt.c +1197 -0
- data/vendor/git.tukaani.org/xz/lib/getopt.in.h +226 -0
- data/vendor/git.tukaani.org/xz/lib/getopt1.c +171 -0
- data/vendor/git.tukaani.org/xz/lib/getopt_int.h +131 -0
- data/vendor/git.tukaani.org/xz/m4/.gitignore +38 -0
- data/vendor/git.tukaani.org/xz/m4/ax_check_capsicum.m4 +85 -0
- data/vendor/git.tukaani.org/xz/m4/ax_pthread.m4 +332 -0
- data/vendor/git.tukaani.org/xz/m4/getopt.m4 +71 -0
- data/vendor/git.tukaani.org/xz/m4/posix-shell.m4 +63 -0
- data/vendor/git.tukaani.org/xz/m4/tuklib_common.m4 +22 -0
- data/vendor/git.tukaani.org/xz/m4/tuklib_cpucores.m4 +176 -0
- data/vendor/git.tukaani.org/xz/m4/tuklib_integer.m4 +74 -0
- data/vendor/git.tukaani.org/xz/m4/tuklib_mbstr.m4 +30 -0
- data/vendor/git.tukaani.org/xz/m4/tuklib_physmem.m4 +212 -0
- data/vendor/git.tukaani.org/xz/m4/tuklib_progname.m4 +25 -0
- data/vendor/git.tukaani.org/xz/macosx/build.sh +113 -0
- data/vendor/git.tukaani.org/xz/po/.gitignore +31 -0
- data/vendor/git.tukaani.org/xz/po/LINGUAS +6 -0
- data/vendor/git.tukaani.org/xz/po/Makevars +46 -0
- data/vendor/git.tukaani.org/xz/po/POTFILES.in +13 -0
- data/vendor/git.tukaani.org/xz/po/cs.po +949 -0
- data/vendor/git.tukaani.org/xz/po/de.po +993 -0
- data/vendor/git.tukaani.org/xz/po/fr.po +978 -0
- data/vendor/git.tukaani.org/xz/po/it.po +1067 -0
- data/vendor/git.tukaani.org/xz/po/pl.po +968 -0
- data/vendor/git.tukaani.org/xz/po/vi.po +1039 -0
- data/vendor/git.tukaani.org/xz/src/Makefile.am +42 -0
- data/vendor/git.tukaani.org/xz/src/common/common_w32res.rc +50 -0
- data/vendor/git.tukaani.org/xz/src/common/mythread.h +521 -0
- data/vendor/git.tukaani.org/xz/src/common/sysdefs.h +202 -0
- data/vendor/git.tukaani.org/xz/src/common/tuklib_common.h +71 -0
- data/vendor/git.tukaani.org/xz/src/common/tuklib_config.h +7 -0
- data/vendor/git.tukaani.org/xz/src/common/tuklib_cpucores.c +100 -0
- data/vendor/git.tukaani.org/xz/src/common/tuklib_cpucores.h +23 -0
- data/vendor/git.tukaani.org/xz/src/common/tuklib_exit.c +57 -0
- data/vendor/git.tukaani.org/xz/src/common/tuklib_exit.h +25 -0
- data/vendor/git.tukaani.org/xz/src/common/tuklib_gettext.h +44 -0
- data/vendor/git.tukaani.org/xz/src/common/tuklib_integer.h +534 -0
- data/vendor/git.tukaani.org/xz/src/common/tuklib_mbstr.h +66 -0
- data/vendor/git.tukaani.org/xz/src/common/tuklib_mbstr_fw.c +31 -0
- data/vendor/git.tukaani.org/xz/src/common/tuklib_mbstr_width.c +64 -0
- data/vendor/git.tukaani.org/xz/src/common/tuklib_open_stdxxx.c +57 -0
- data/vendor/git.tukaani.org/xz/src/common/tuklib_open_stdxxx.h +23 -0
- data/vendor/git.tukaani.org/xz/src/common/tuklib_physmem.c +216 -0
- data/vendor/git.tukaani.org/xz/src/common/tuklib_physmem.h +28 -0
- data/vendor/git.tukaani.org/xz/src/common/tuklib_progname.c +50 -0
- data/vendor/git.tukaani.org/xz/src/common/tuklib_progname.h +32 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/Makefile.am +122 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/api/Makefile.am +23 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/api/lzma.h +325 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/api/lzma/base.h +659 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/api/lzma/bcj.h +90 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/api/lzma/block.h +581 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/api/lzma/check.h +150 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/api/lzma/container.h +632 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/api/lzma/delta.h +77 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/api/lzma/filter.h +425 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/api/lzma/hardware.h +64 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/api/lzma/index.h +686 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/api/lzma/index_hash.h +107 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/api/lzma/lzma12.h +420 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/api/lzma/stream_flags.h +223 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/api/lzma/version.h +121 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/api/lzma/vli.h +166 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/check/Makefile.inc +53 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/check/check.c +174 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/check/check.h +172 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/check/crc32_fast.c +82 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/check/crc32_small.c +61 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/check/crc32_table.c +19 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/check/crc32_table_be.h +525 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/check/crc32_table_le.h +525 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/check/crc32_tablegen.c +117 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/check/crc32_x86.S +304 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/check/crc64_fast.c +72 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/check/crc64_small.c +53 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/check/crc64_table.c +19 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/check/crc64_table_be.h +521 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/check/crc64_table_le.h +521 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/check/crc64_tablegen.c +88 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/check/crc64_x86.S +287 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/check/crc_macros.h +30 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/check/sha256.c +196 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/common/Makefile.inc +79 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/common/alone_decoder.c +243 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/common/alone_decoder.h +23 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/common/alone_encoder.c +163 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/common/auto_decoder.c +195 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/common/block_buffer_decoder.c +80 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/common/block_buffer_encoder.c +337 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/common/block_buffer_encoder.h +24 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/common/block_decoder.c +257 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/common/block_decoder.h +22 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/common/block_encoder.c +223 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/common/block_encoder.h +47 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/common/block_header_decoder.c +124 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/common/block_header_encoder.c +132 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/common/block_util.c +90 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/common/common.c +445 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/common/common.h +314 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/common/easy_buffer_encoder.c +27 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/common/easy_decoder_memusage.c +24 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/common/easy_encoder.c +24 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/common/easy_encoder_memusage.c +24 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/common/easy_preset.c +27 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/common/easy_preset.h +32 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/common/filter_buffer_decoder.c +88 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/common/filter_buffer_encoder.c +55 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/common/filter_common.c +337 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/common/filter_common.h +48 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/common/filter_decoder.c +184 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/common/filter_decoder.h +23 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/common/filter_encoder.c +286 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/common/filter_encoder.h +27 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/common/filter_flags_decoder.c +46 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/common/filter_flags_encoder.c +56 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/common/hardware_cputhreads.c +22 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/common/hardware_physmem.c +25 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/common/index.c +1250 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/common/index.h +73 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/common/index_decoder.c +352 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/common/index_encoder.c +256 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/common/index_encoder.h +23 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/common/index_hash.c +334 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/common/memcmplen.h +175 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/common/outqueue.c +184 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/common/outqueue.h +156 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/common/stream_buffer_decoder.c +91 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/common/stream_buffer_encoder.c +141 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/common/stream_decoder.c +467 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/common/stream_decoder.h +22 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/common/stream_encoder.c +340 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/common/stream_encoder_mt.c +1143 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/common/stream_flags_common.c +47 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/common/stream_flags_common.h +33 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/common/stream_flags_decoder.c +82 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/common/stream_flags_encoder.c +86 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/common/vli_decoder.c +86 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/common/vli_encoder.c +69 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/common/vli_size.c +30 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/delta/Makefile.inc +23 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/delta/delta_common.c +73 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/delta/delta_common.h +20 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/delta/delta_decoder.c +78 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/delta/delta_decoder.h +26 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/delta/delta_encoder.c +125 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/delta/delta_encoder.h +24 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/delta/delta_private.h +37 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/liblzma.map +108 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/liblzma.pc.in +19 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/liblzma_w32res.rc +12 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/lz/Makefile.inc +22 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/lz/lz_decoder.c +306 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/lz/lz_decoder.h +234 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/lz/lz_encoder.c +616 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/lz/lz_encoder.h +327 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/lz/lz_encoder_hash.h +108 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/lz/lz_encoder_hash_table.h +68 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/lz/lz_encoder_mf.c +744 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/lzma/Makefile.inc +47 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/lzma/fastpos.h +141 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/lzma/fastpos_table.c +519 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/lzma/fastpos_tablegen.c +56 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/lzma/lzma2_decoder.c +310 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/lzma/lzma2_decoder.h +29 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/lzma/lzma2_encoder.c +410 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/lzma/lzma2_encoder.h +43 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/lzma/lzma_common.h +224 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/lzma/lzma_decoder.c +1064 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/lzma/lzma_decoder.h +53 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/lzma/lzma_encoder.c +677 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/lzma/lzma_encoder.h +58 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/lzma/lzma_encoder_optimum_fast.c +170 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/lzma/lzma_encoder_optimum_normal.c +855 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/lzma/lzma_encoder_presets.c +64 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/lzma/lzma_encoder_private.h +148 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/rangecoder/Makefile.inc +21 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/rangecoder/price.h +92 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/rangecoder/price_table.c +22 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/rangecoder/price_tablegen.c +87 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/rangecoder/range_common.h +71 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/rangecoder/range_decoder.h +185 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/rangecoder/range_encoder.h +231 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/simple/Makefile.inc +47 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/simple/arm.c +71 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/simple/armthumb.c +76 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/simple/ia64.c +112 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/simple/powerpc.c +75 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/simple/simple_coder.c +282 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/simple/simple_coder.h +72 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/simple/simple_decoder.c +40 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/simple/simple_decoder.h +22 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/simple/simple_encoder.c +38 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/simple/simple_encoder.h +23 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/simple/simple_private.h +74 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/simple/sparc.c +83 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/simple/x86.c +159 -0
- data/vendor/git.tukaani.org/xz/src/liblzma/validate_map.sh +68 -0
- data/vendor/git.tukaani.org/xz/src/lzmainfo/Makefile.am +39 -0
- data/vendor/git.tukaani.org/xz/src/lzmainfo/lzmainfo.1 +60 -0
- data/vendor/git.tukaani.org/xz/src/lzmainfo/lzmainfo.c +219 -0
- data/vendor/git.tukaani.org/xz/src/lzmainfo/lzmainfo_w32res.rc +12 -0
- data/vendor/git.tukaani.org/xz/src/scripts/Makefile.am +55 -0
- data/vendor/git.tukaani.org/xz/src/scripts/xzdiff.1 +77 -0
- data/vendor/git.tukaani.org/xz/src/scripts/xzdiff.in +200 -0
- data/vendor/git.tukaani.org/xz/src/scripts/xzgrep.1 +98 -0
- data/vendor/git.tukaani.org/xz/src/scripts/xzgrep.in +215 -0
- data/vendor/git.tukaani.org/xz/src/scripts/xzless.1 +69 -0
- data/vendor/git.tukaani.org/xz/src/scripts/xzless.in +58 -0
- data/vendor/git.tukaani.org/xz/src/scripts/xzmore.1 +55 -0
- data/vendor/git.tukaani.org/xz/src/scripts/xzmore.in +78 -0
- data/vendor/git.tukaani.org/xz/src/xz/Makefile.am +111 -0
- data/vendor/git.tukaani.org/xz/src/xz/args.c +700 -0
- data/vendor/git.tukaani.org/xz/src/xz/args.h +44 -0
- data/vendor/git.tukaani.org/xz/src/xz/coder.c +936 -0
- data/vendor/git.tukaani.org/xz/src/xz/coder.h +76 -0
- data/vendor/git.tukaani.org/xz/src/xz/file_io.c +1300 -0
- data/vendor/git.tukaani.org/xz/src/xz/file_io.h +156 -0
- data/vendor/git.tukaani.org/xz/src/xz/hardware.c +150 -0
- data/vendor/git.tukaani.org/xz/src/xz/hardware.h +37 -0
- data/vendor/git.tukaani.org/xz/src/xz/list.c +1192 -0
- data/vendor/git.tukaani.org/xz/src/xz/list.h +18 -0
- data/vendor/git.tukaani.org/xz/src/xz/main.c +330 -0
- data/vendor/git.tukaani.org/xz/src/xz/main.h +30 -0
- data/vendor/git.tukaani.org/xz/src/xz/message.c +1258 -0
- data/vendor/git.tukaani.org/xz/src/xz/message.h +167 -0
- data/vendor/git.tukaani.org/xz/src/xz/mytime.c +89 -0
- data/vendor/git.tukaani.org/xz/src/xz/mytime.h +47 -0
- data/vendor/git.tukaani.org/xz/src/xz/options.c +363 -0
- data/vendor/git.tukaani.org/xz/src/xz/options.h +31 -0
- data/vendor/git.tukaani.org/xz/src/xz/private.h +66 -0
- data/vendor/git.tukaani.org/xz/src/xz/signals.c +209 -0
- data/vendor/git.tukaani.org/xz/src/xz/signals.h +43 -0
- data/vendor/git.tukaani.org/xz/src/xz/suffix.c +399 -0
- data/vendor/git.tukaani.org/xz/src/xz/suffix.h +28 -0
- data/vendor/git.tukaani.org/xz/src/xz/util.c +288 -0
- data/vendor/git.tukaani.org/xz/src/xz/util.h +123 -0
- data/vendor/git.tukaani.org/xz/src/xz/xz.1 +2786 -0
- data/vendor/git.tukaani.org/xz/src/xz/xz_w32res.rc +12 -0
- data/vendor/git.tukaani.org/xz/src/xzdec/Makefile.am +82 -0
- data/vendor/git.tukaani.org/xz/src/xzdec/lzmadec_w32res.rc +12 -0
- data/vendor/git.tukaani.org/xz/src/xzdec/xzdec.1 +146 -0
- data/vendor/git.tukaani.org/xz/src/xzdec/xzdec.c +323 -0
- data/vendor/git.tukaani.org/xz/src/xzdec/xzdec_w32res.rc +12 -0
- data/vendor/git.tukaani.org/xz/tests/Makefile.am +57 -0
- data/vendor/git.tukaani.org/xz/tests/bcj_test.c +65 -0
- data/vendor/git.tukaani.org/xz/tests/compress_prepared_bcj_sparc +0 -0
- data/vendor/git.tukaani.org/xz/tests/compress_prepared_bcj_x86 +0 -0
- data/vendor/git.tukaani.org/xz/tests/create_compress_files.c +158 -0
- data/vendor/git.tukaani.org/xz/tests/files/README +240 -0
- data/vendor/git.tukaani.org/xz/tests/files/bad-0-backward_size.xz +0 -0
- data/vendor/git.tukaani.org/xz/tests/files/bad-0-empty-truncated.xz +0 -0
- data/vendor/git.tukaani.org/xz/tests/files/bad-0-footer_magic.xz +0 -0
- data/vendor/git.tukaani.org/xz/tests/files/bad-0-header_magic.xz +0 -0
- data/vendor/git.tukaani.org/xz/tests/files/bad-0-nonempty_index.xz +0 -0
- data/vendor/git.tukaani.org/xz/tests/files/bad-0cat-alone.xz +0 -0
- data/vendor/git.tukaani.org/xz/tests/files/bad-0cat-header_magic.xz +0 -0
- data/vendor/git.tukaani.org/xz/tests/files/bad-0catpad-empty.xz +0 -0
- data/vendor/git.tukaani.org/xz/tests/files/bad-0pad-empty.xz +0 -0
- data/vendor/git.tukaani.org/xz/tests/files/bad-1-block_header-1.xz +0 -0
- data/vendor/git.tukaani.org/xz/tests/files/bad-1-block_header-2.xz +0 -0
- data/vendor/git.tukaani.org/xz/tests/files/bad-1-block_header-3.xz +0 -0
- data/vendor/git.tukaani.org/xz/tests/files/bad-1-block_header-4.xz +0 -0
- data/vendor/git.tukaani.org/xz/tests/files/bad-1-block_header-5.xz +0 -0
- data/vendor/git.tukaani.org/xz/tests/files/bad-1-block_header-6.xz +0 -0
- data/vendor/git.tukaani.org/xz/tests/files/bad-1-check-crc32.xz +0 -0
- data/vendor/git.tukaani.org/xz/tests/files/bad-1-check-crc64.xz +0 -0
- data/vendor/git.tukaani.org/xz/tests/files/bad-1-check-sha256.xz +0 -0
- data/vendor/git.tukaani.org/xz/tests/files/bad-1-lzma2-1.xz +0 -0
- data/vendor/git.tukaani.org/xz/tests/files/bad-1-lzma2-2.xz +0 -0
- data/vendor/git.tukaani.org/xz/tests/files/bad-1-lzma2-3.xz +0 -0
- data/vendor/git.tukaani.org/xz/tests/files/bad-1-lzma2-4.xz +0 -0
- data/vendor/git.tukaani.org/xz/tests/files/bad-1-lzma2-5.xz +0 -0
- data/vendor/git.tukaani.org/xz/tests/files/bad-1-lzma2-6.xz +0 -0
- data/vendor/git.tukaani.org/xz/tests/files/bad-1-lzma2-7.xz +0 -0
- data/vendor/git.tukaani.org/xz/tests/files/bad-1-lzma2-8.xz +0 -0
- data/vendor/git.tukaani.org/xz/tests/files/bad-1-stream_flags-1.xz +0 -0
- data/vendor/git.tukaani.org/xz/tests/files/bad-1-stream_flags-2.xz +0 -0
- data/vendor/git.tukaani.org/xz/tests/files/bad-1-stream_flags-3.xz +0 -0
- data/vendor/git.tukaani.org/xz/tests/files/bad-1-vli-1.xz +0 -0
- data/vendor/git.tukaani.org/xz/tests/files/bad-1-vli-2.xz +0 -0
- data/vendor/git.tukaani.org/xz/tests/files/bad-2-compressed_data_padding.xz +0 -0
- data/vendor/git.tukaani.org/xz/tests/files/bad-2-index-1.xz +0 -0
- data/vendor/git.tukaani.org/xz/tests/files/bad-2-index-2.xz +0 -0
- data/vendor/git.tukaani.org/xz/tests/files/bad-2-index-3.xz +0 -0
- data/vendor/git.tukaani.org/xz/tests/files/bad-2-index-4.xz +0 -0
- data/vendor/git.tukaani.org/xz/tests/files/bad-2-index-5.xz +0 -0
- data/vendor/git.tukaani.org/xz/tests/files/good-0-empty.xz +0 -0
- data/vendor/git.tukaani.org/xz/tests/files/good-0cat-empty.xz +0 -0
- data/vendor/git.tukaani.org/xz/tests/files/good-0catpad-empty.xz +0 -0
- data/vendor/git.tukaani.org/xz/tests/files/good-0pad-empty.xz +0 -0
- data/vendor/git.tukaani.org/xz/tests/files/good-1-3delta-lzma2.xz +0 -0
- data/vendor/git.tukaani.org/xz/tests/files/good-1-block_header-1.xz +0 -0
- data/vendor/git.tukaani.org/xz/tests/files/good-1-block_header-2.xz +0 -0
- data/vendor/git.tukaani.org/xz/tests/files/good-1-block_header-3.xz +0 -0
- data/vendor/git.tukaani.org/xz/tests/files/good-1-check-crc32.xz +0 -0
- data/vendor/git.tukaani.org/xz/tests/files/good-1-check-crc64.xz +0 -0
- data/vendor/git.tukaani.org/xz/tests/files/good-1-check-none.xz +0 -0
- data/vendor/git.tukaani.org/xz/tests/files/good-1-check-sha256.xz +0 -0
- data/vendor/git.tukaani.org/xz/tests/files/good-1-delta-lzma2.tiff.xz +0 -0
- data/vendor/git.tukaani.org/xz/tests/files/good-1-lzma2-1.xz +0 -0
- data/vendor/git.tukaani.org/xz/tests/files/good-1-lzma2-2.xz +0 -0
- data/vendor/git.tukaani.org/xz/tests/files/good-1-lzma2-3.xz +0 -0
- data/vendor/git.tukaani.org/xz/tests/files/good-1-lzma2-4.xz +0 -0
- data/vendor/git.tukaani.org/xz/tests/files/good-1-lzma2-5.xz +0 -0
- data/vendor/git.tukaani.org/xz/tests/files/good-1-sparc-lzma2.xz +0 -0
- data/vendor/git.tukaani.org/xz/tests/files/good-1-x86-lzma2.xz +0 -0
- data/vendor/git.tukaani.org/xz/tests/files/good-2-lzma2.xz +0 -0
- data/vendor/git.tukaani.org/xz/tests/files/unsupported-block_header.xz +0 -0
- data/vendor/git.tukaani.org/xz/tests/files/unsupported-check.xz +0 -0
- data/vendor/git.tukaani.org/xz/tests/files/unsupported-filter_flags-1.xz +0 -0
- data/vendor/git.tukaani.org/xz/tests/files/unsupported-filter_flags-2.xz +0 -0
- data/vendor/git.tukaani.org/xz/tests/files/unsupported-filter_flags-3.xz +0 -0
- data/vendor/git.tukaani.org/xz/tests/test_bcj_exact_size.c +113 -0
- data/vendor/git.tukaani.org/xz/tests/test_block_header.c +240 -0
- data/vendor/git.tukaani.org/xz/tests/test_check.c +83 -0
- data/vendor/git.tukaani.org/xz/tests/test_compress.sh +142 -0
- data/vendor/git.tukaani.org/xz/tests/test_files.sh +57 -0
- data/vendor/git.tukaani.org/xz/tests/test_filter_flags.c +258 -0
- data/vendor/git.tukaani.org/xz/tests/test_index.c +689 -0
- data/vendor/git.tukaani.org/xz/tests/test_scripts.sh +76 -0
- data/vendor/git.tukaani.org/xz/tests/test_stream_flags.c +180 -0
- data/vendor/git.tukaani.org/xz/tests/tests.h +124 -0
- data/vendor/git.tukaani.org/xz/tests/xzgrep_expected_output +39 -0
- data/vendor/git.tukaani.org/xz/windows/INSTALL-MSVC.txt +47 -0
- data/vendor/git.tukaani.org/xz/windows/INSTALL-MinGW.txt +138 -0
- data/vendor/git.tukaani.org/xz/windows/README-Windows.txt +122 -0
- data/vendor/git.tukaani.org/xz/windows/build.bash +203 -0
- data/vendor/git.tukaani.org/xz/windows/vs2013/config.h +148 -0
- data/vendor/git.tukaani.org/xz/windows/vs2013/liblzma.vcxproj +354 -0
- data/vendor/git.tukaani.org/xz/windows/vs2013/liblzma_dll.vcxproj +383 -0
- data/vendor/git.tukaani.org/xz/windows/vs2013/xz_win.sln +48 -0
- data/vendor/git.tukaani.org/xz/windows/vs2017/config.h +148 -0
- data/vendor/git.tukaani.org/xz/windows/vs2017/liblzma.vcxproj +355 -0
- data/vendor/git.tukaani.org/xz/windows/vs2017/liblzma_dll.vcxproj +384 -0
- data/vendor/git.tukaani.org/xz/windows/vs2017/xz_win.sln +48 -0
- metadata +457 -0
@@ -0,0 +1,107 @@
|
|
1
|
+
/**
|
2
|
+
* \file lzma/index_hash.h
|
3
|
+
* \brief Validate Index by using a hash function
|
4
|
+
*
|
5
|
+
* Hashing makes it possible to use constant amount of memory to validate
|
6
|
+
* Index of arbitrary size.
|
7
|
+
*/
|
8
|
+
|
9
|
+
/*
|
10
|
+
* Author: Lasse Collin
|
11
|
+
*
|
12
|
+
* This file has been put into the public domain.
|
13
|
+
* You can do whatever you want with this file.
|
14
|
+
*
|
15
|
+
* See ../lzma.h for information about liblzma as a whole.
|
16
|
+
*/
|
17
|
+
|
18
|
+
#ifndef LZMA_H_INTERNAL
|
19
|
+
# error Never include this file directly. Use <lzma.h> instead.
|
20
|
+
#endif
|
21
|
+
|
22
|
+
/**
|
23
|
+
* \brief Opaque data type to hold the Index hash
|
24
|
+
*/
|
25
|
+
typedef struct lzma_index_hash_s lzma_index_hash;
|
26
|
+
|
27
|
+
|
28
|
+
/**
|
29
|
+
* \brief Allocate and initialize a new lzma_index_hash structure
|
30
|
+
*
|
31
|
+
* If index_hash is NULL, a new lzma_index_hash structure is allocated,
|
32
|
+
* initialized, and a pointer to it returned. If allocation fails, NULL
|
33
|
+
* is returned.
|
34
|
+
*
|
35
|
+
* If index_hash is non-NULL, it is reinitialized and the same pointer
|
36
|
+
* returned. In this case, return value cannot be NULL or a different
|
37
|
+
* pointer than the index_hash that was given as an argument.
|
38
|
+
*/
|
39
|
+
extern LZMA_API(lzma_index_hash *) lzma_index_hash_init(
|
40
|
+
lzma_index_hash *index_hash, const lzma_allocator *allocator)
|
41
|
+
lzma_nothrow lzma_attr_warn_unused_result;
|
42
|
+
|
43
|
+
|
44
|
+
/**
|
45
|
+
* \brief Deallocate lzma_index_hash structure
|
46
|
+
*/
|
47
|
+
extern LZMA_API(void) lzma_index_hash_end(
|
48
|
+
lzma_index_hash *index_hash, const lzma_allocator *allocator)
|
49
|
+
lzma_nothrow;
|
50
|
+
|
51
|
+
|
52
|
+
/**
|
53
|
+
* \brief Add a new Record to an Index hash
|
54
|
+
*
|
55
|
+
* \param index Pointer to a lzma_index_hash structure
|
56
|
+
* \param unpadded_size Unpadded Size of a Block
|
57
|
+
* \param uncompressed_size Uncompressed Size of a Block
|
58
|
+
*
|
59
|
+
* \return - LZMA_OK
|
60
|
+
* - LZMA_DATA_ERROR: Compressed or uncompressed size of the
|
61
|
+
* Stream or size of the Index field would grow too big.
|
62
|
+
* - LZMA_PROG_ERROR: Invalid arguments or this function is being
|
63
|
+
* used when lzma_index_hash_decode() has already been used.
|
64
|
+
*/
|
65
|
+
extern LZMA_API(lzma_ret) lzma_index_hash_append(lzma_index_hash *index_hash,
|
66
|
+
lzma_vli unpadded_size, lzma_vli uncompressed_size)
|
67
|
+
lzma_nothrow lzma_attr_warn_unused_result;
|
68
|
+
|
69
|
+
|
70
|
+
/**
|
71
|
+
* \brief Decode and validate the Index field
|
72
|
+
*
|
73
|
+
* After telling the sizes of all Blocks with lzma_index_hash_append(),
|
74
|
+
* the actual Index field is decoded with this function. Specifically,
|
75
|
+
* once decoding of the Index field has been started, no more Records
|
76
|
+
* can be added using lzma_index_hash_append().
|
77
|
+
*
|
78
|
+
* This function doesn't use lzma_stream structure to pass the input data.
|
79
|
+
* Instead, the input buffer is specified using three arguments. This is
|
80
|
+
* because it matches better the internal APIs of liblzma.
|
81
|
+
*
|
82
|
+
* \param index_hash Pointer to a lzma_index_hash structure
|
83
|
+
* \param in Pointer to the beginning of the input buffer
|
84
|
+
* \param in_pos in[*in_pos] is the next byte to process
|
85
|
+
* \param in_size in[in_size] is the first byte not to process
|
86
|
+
*
|
87
|
+
* \return - LZMA_OK: So far good, but more input is needed.
|
88
|
+
* - LZMA_STREAM_END: Index decoded successfully and it matches
|
89
|
+
* the Records given with lzma_index_hash_append().
|
90
|
+
* - LZMA_DATA_ERROR: Index is corrupt or doesn't match the
|
91
|
+
* information given with lzma_index_hash_append().
|
92
|
+
* - LZMA_BUF_ERROR: Cannot progress because *in_pos >= in_size.
|
93
|
+
* - LZMA_PROG_ERROR
|
94
|
+
*/
|
95
|
+
extern LZMA_API(lzma_ret) lzma_index_hash_decode(lzma_index_hash *index_hash,
|
96
|
+
const uint8_t *in, size_t *in_pos, size_t in_size)
|
97
|
+
lzma_nothrow lzma_attr_warn_unused_result;
|
98
|
+
|
99
|
+
|
100
|
+
/**
|
101
|
+
* \brief Get the size of the Index field as bytes
|
102
|
+
*
|
103
|
+
* This is needed to verify the Backward Size field in the Stream Footer.
|
104
|
+
*/
|
105
|
+
extern LZMA_API(lzma_vli) lzma_index_hash_size(
|
106
|
+
const lzma_index_hash *index_hash)
|
107
|
+
lzma_nothrow lzma_attr_pure;
|
@@ -0,0 +1,420 @@
|
|
1
|
+
/**
|
2
|
+
* \file lzma/lzma12.h
|
3
|
+
* \brief LZMA1 and LZMA2 filters
|
4
|
+
*/
|
5
|
+
|
6
|
+
/*
|
7
|
+
* Author: Lasse Collin
|
8
|
+
*
|
9
|
+
* This file has been put into the public domain.
|
10
|
+
* You can do whatever you want with this file.
|
11
|
+
*
|
12
|
+
* See ../lzma.h for information about liblzma as a whole.
|
13
|
+
*/
|
14
|
+
|
15
|
+
#ifndef LZMA_H_INTERNAL
|
16
|
+
# error Never include this file directly. Use <lzma.h> instead.
|
17
|
+
#endif
|
18
|
+
|
19
|
+
|
20
|
+
/**
|
21
|
+
* \brief LZMA1 Filter ID
|
22
|
+
*
|
23
|
+
* LZMA1 is the very same thing as what was called just LZMA in LZMA Utils,
|
24
|
+
* 7-Zip, and LZMA SDK. It's called LZMA1 here to prevent developers from
|
25
|
+
* accidentally using LZMA when they actually want LZMA2.
|
26
|
+
*
|
27
|
+
* LZMA1 shouldn't be used for new applications unless you _really_ know
|
28
|
+
* what you are doing. LZMA2 is almost always a better choice.
|
29
|
+
*/
|
30
|
+
#define LZMA_FILTER_LZMA1 LZMA_VLI_C(0x4000000000000001)
|
31
|
+
|
32
|
+
/**
|
33
|
+
* \brief LZMA2 Filter ID
|
34
|
+
*
|
35
|
+
* Usually you want this instead of LZMA1. Compared to LZMA1, LZMA2 adds
|
36
|
+
* support for LZMA_SYNC_FLUSH, uncompressed chunks (smaller expansion
|
37
|
+
* when trying to compress uncompressible data), possibility to change
|
38
|
+
* lc/lp/pb in the middle of encoding, and some other internal improvements.
|
39
|
+
*/
|
40
|
+
#define LZMA_FILTER_LZMA2 LZMA_VLI_C(0x21)
|
41
|
+
|
42
|
+
|
43
|
+
/**
|
44
|
+
* \brief Match finders
|
45
|
+
*
|
46
|
+
* Match finder has major effect on both speed and compression ratio.
|
47
|
+
* Usually hash chains are faster than binary trees.
|
48
|
+
*
|
49
|
+
* If you will use LZMA_SYNC_FLUSH often, the hash chains may be a better
|
50
|
+
* choice, because binary trees get much higher compression ratio penalty
|
51
|
+
* with LZMA_SYNC_FLUSH.
|
52
|
+
*
|
53
|
+
* The memory usage formulas are only rough estimates, which are closest to
|
54
|
+
* reality when dict_size is a power of two. The formulas are more complex
|
55
|
+
* in reality, and can also change a little between liblzma versions. Use
|
56
|
+
* lzma_raw_encoder_memusage() to get more accurate estimate of memory usage.
|
57
|
+
*/
|
58
|
+
typedef enum {
|
59
|
+
LZMA_MF_HC3 = 0x03,
|
60
|
+
/**<
|
61
|
+
* \brief Hash Chain with 2- and 3-byte hashing
|
62
|
+
*
|
63
|
+
* Minimum nice_len: 3
|
64
|
+
*
|
65
|
+
* Memory usage:
|
66
|
+
* - dict_size <= 16 MiB: dict_size * 7.5
|
67
|
+
* - dict_size > 16 MiB: dict_size * 5.5 + 64 MiB
|
68
|
+
*/
|
69
|
+
|
70
|
+
LZMA_MF_HC4 = 0x04,
|
71
|
+
/**<
|
72
|
+
* \brief Hash Chain with 2-, 3-, and 4-byte hashing
|
73
|
+
*
|
74
|
+
* Minimum nice_len: 4
|
75
|
+
*
|
76
|
+
* Memory usage:
|
77
|
+
* - dict_size <= 32 MiB: dict_size * 7.5
|
78
|
+
* - dict_size > 32 MiB: dict_size * 6.5
|
79
|
+
*/
|
80
|
+
|
81
|
+
LZMA_MF_BT2 = 0x12,
|
82
|
+
/**<
|
83
|
+
* \brief Binary Tree with 2-byte hashing
|
84
|
+
*
|
85
|
+
* Minimum nice_len: 2
|
86
|
+
*
|
87
|
+
* Memory usage: dict_size * 9.5
|
88
|
+
*/
|
89
|
+
|
90
|
+
LZMA_MF_BT3 = 0x13,
|
91
|
+
/**<
|
92
|
+
* \brief Binary Tree with 2- and 3-byte hashing
|
93
|
+
*
|
94
|
+
* Minimum nice_len: 3
|
95
|
+
*
|
96
|
+
* Memory usage:
|
97
|
+
* - dict_size <= 16 MiB: dict_size * 11.5
|
98
|
+
* - dict_size > 16 MiB: dict_size * 9.5 + 64 MiB
|
99
|
+
*/
|
100
|
+
|
101
|
+
LZMA_MF_BT4 = 0x14
|
102
|
+
/**<
|
103
|
+
* \brief Binary Tree with 2-, 3-, and 4-byte hashing
|
104
|
+
*
|
105
|
+
* Minimum nice_len: 4
|
106
|
+
*
|
107
|
+
* Memory usage:
|
108
|
+
* - dict_size <= 32 MiB: dict_size * 11.5
|
109
|
+
* - dict_size > 32 MiB: dict_size * 10.5
|
110
|
+
*/
|
111
|
+
} lzma_match_finder;
|
112
|
+
|
113
|
+
|
114
|
+
/**
|
115
|
+
* \brief Test if given match finder is supported
|
116
|
+
*
|
117
|
+
* Return true if the given match finder is supported by this liblzma build.
|
118
|
+
* Otherwise false is returned. It is safe to call this with a value that
|
119
|
+
* isn't listed in lzma_match_finder enumeration; the return value will be
|
120
|
+
* false.
|
121
|
+
*
|
122
|
+
* There is no way to list which match finders are available in this
|
123
|
+
* particular liblzma version and build. It would be useless, because
|
124
|
+
* a new match finder, which the application developer wasn't aware,
|
125
|
+
* could require giving additional options to the encoder that the older
|
126
|
+
* match finders don't need.
|
127
|
+
*/
|
128
|
+
extern LZMA_API(lzma_bool) lzma_mf_is_supported(lzma_match_finder match_finder)
|
129
|
+
lzma_nothrow lzma_attr_const;
|
130
|
+
|
131
|
+
|
132
|
+
/**
|
133
|
+
* \brief Compression modes
|
134
|
+
*
|
135
|
+
* This selects the function used to analyze the data produced by the match
|
136
|
+
* finder.
|
137
|
+
*/
|
138
|
+
typedef enum {
|
139
|
+
LZMA_MODE_FAST = 1,
|
140
|
+
/**<
|
141
|
+
* \brief Fast compression
|
142
|
+
*
|
143
|
+
* Fast mode is usually at its best when combined with
|
144
|
+
* a hash chain match finder.
|
145
|
+
*/
|
146
|
+
|
147
|
+
LZMA_MODE_NORMAL = 2
|
148
|
+
/**<
|
149
|
+
* \brief Normal compression
|
150
|
+
*
|
151
|
+
* This is usually notably slower than fast mode. Use this
|
152
|
+
* together with binary tree match finders to expose the
|
153
|
+
* full potential of the LZMA1 or LZMA2 encoder.
|
154
|
+
*/
|
155
|
+
} lzma_mode;
|
156
|
+
|
157
|
+
|
158
|
+
/**
|
159
|
+
* \brief Test if given compression mode is supported
|
160
|
+
*
|
161
|
+
* Return true if the given compression mode is supported by this liblzma
|
162
|
+
* build. Otherwise false is returned. It is safe to call this with a value
|
163
|
+
* that isn't listed in lzma_mode enumeration; the return value will be false.
|
164
|
+
*
|
165
|
+
* There is no way to list which modes are available in this particular
|
166
|
+
* liblzma version and build. It would be useless, because a new compression
|
167
|
+
* mode, which the application developer wasn't aware, could require giving
|
168
|
+
* additional options to the encoder that the older modes don't need.
|
169
|
+
*/
|
170
|
+
extern LZMA_API(lzma_bool) lzma_mode_is_supported(lzma_mode mode)
|
171
|
+
lzma_nothrow lzma_attr_const;
|
172
|
+
|
173
|
+
|
174
|
+
/**
|
175
|
+
* \brief Options specific to the LZMA1 and LZMA2 filters
|
176
|
+
*
|
177
|
+
* Since LZMA1 and LZMA2 share most of the code, it's simplest to share
|
178
|
+
* the options structure too. For encoding, all but the reserved variables
|
179
|
+
* need to be initialized unless specifically mentioned otherwise.
|
180
|
+
* lzma_lzma_preset() can be used to get a good starting point.
|
181
|
+
*
|
182
|
+
* For raw decoding, both LZMA1 and LZMA2 need dict_size, preset_dict, and
|
183
|
+
* preset_dict_size (if preset_dict != NULL). LZMA1 needs also lc, lp, and pb.
|
184
|
+
*/
|
185
|
+
typedef struct {
|
186
|
+
/**
|
187
|
+
* \brief Dictionary size in bytes
|
188
|
+
*
|
189
|
+
* Dictionary size indicates how many bytes of the recently processed
|
190
|
+
* uncompressed data is kept in memory. One method to reduce size of
|
191
|
+
* the uncompressed data is to store distance-length pairs, which
|
192
|
+
* indicate what data to repeat from the dictionary buffer. Thus,
|
193
|
+
* the bigger the dictionary, the better the compression ratio
|
194
|
+
* usually is.
|
195
|
+
*
|
196
|
+
* Maximum size of the dictionary depends on multiple things:
|
197
|
+
* - Memory usage limit
|
198
|
+
* - Available address space (not a problem on 64-bit systems)
|
199
|
+
* - Selected match finder (encoder only)
|
200
|
+
*
|
201
|
+
* Currently the maximum dictionary size for encoding is 1.5 GiB
|
202
|
+
* (i.e. (UINT32_C(1) << 30) + (UINT32_C(1) << 29)) even on 64-bit
|
203
|
+
* systems for certain match finder implementation reasons. In the
|
204
|
+
* future, there may be match finders that support bigger
|
205
|
+
* dictionaries.
|
206
|
+
*
|
207
|
+
* Decoder already supports dictionaries up to 4 GiB - 1 B (i.e.
|
208
|
+
* UINT32_MAX), so increasing the maximum dictionary size of the
|
209
|
+
* encoder won't cause problems for old decoders.
|
210
|
+
*
|
211
|
+
* Because extremely small dictionaries sizes would have unneeded
|
212
|
+
* overhead in the decoder, the minimum dictionary size is 4096 bytes.
|
213
|
+
*
|
214
|
+
* \note When decoding, too big dictionary does no other harm
|
215
|
+
* than wasting memory.
|
216
|
+
*/
|
217
|
+
uint32_t dict_size;
|
218
|
+
# define LZMA_DICT_SIZE_MIN UINT32_C(4096)
|
219
|
+
# define LZMA_DICT_SIZE_DEFAULT (UINT32_C(1) << 23)
|
220
|
+
|
221
|
+
/**
|
222
|
+
* \brief Pointer to an initial dictionary
|
223
|
+
*
|
224
|
+
* It is possible to initialize the LZ77 history window using
|
225
|
+
* a preset dictionary. It is useful when compressing many
|
226
|
+
* similar, relatively small chunks of data independently from
|
227
|
+
* each other. The preset dictionary should contain typical
|
228
|
+
* strings that occur in the files being compressed. The most
|
229
|
+
* probable strings should be near the end of the preset dictionary.
|
230
|
+
*
|
231
|
+
* This feature should be used only in special situations. For
|
232
|
+
* now, it works correctly only with raw encoding and decoding.
|
233
|
+
* Currently none of the container formats supported by
|
234
|
+
* liblzma allow preset dictionary when decoding, thus if
|
235
|
+
* you create a .xz or .lzma file with preset dictionary, it
|
236
|
+
* cannot be decoded with the regular decoder functions. In the
|
237
|
+
* future, the .xz format will likely get support for preset
|
238
|
+
* dictionary though.
|
239
|
+
*/
|
240
|
+
const uint8_t *preset_dict;
|
241
|
+
|
242
|
+
/**
|
243
|
+
* \brief Size of the preset dictionary
|
244
|
+
*
|
245
|
+
* Specifies the size of the preset dictionary. If the size is
|
246
|
+
* bigger than dict_size, only the last dict_size bytes are
|
247
|
+
* processed.
|
248
|
+
*
|
249
|
+
* This variable is read only when preset_dict is not NULL.
|
250
|
+
* If preset_dict is not NULL but preset_dict_size is zero,
|
251
|
+
* no preset dictionary is used (identical to only setting
|
252
|
+
* preset_dict to NULL).
|
253
|
+
*/
|
254
|
+
uint32_t preset_dict_size;
|
255
|
+
|
256
|
+
/**
|
257
|
+
* \brief Number of literal context bits
|
258
|
+
*
|
259
|
+
* How many of the highest bits of the previous uncompressed
|
260
|
+
* eight-bit byte (also known as `literal') are taken into
|
261
|
+
* account when predicting the bits of the next literal.
|
262
|
+
*
|
263
|
+
* E.g. in typical English text, an upper-case letter is
|
264
|
+
* often followed by a lower-case letter, and a lower-case
|
265
|
+
* letter is usually followed by another lower-case letter.
|
266
|
+
* In the US-ASCII character set, the highest three bits are 010
|
267
|
+
* for upper-case letters and 011 for lower-case letters.
|
268
|
+
* When lc is at least 3, the literal coding can take advantage of
|
269
|
+
* this property in the uncompressed data.
|
270
|
+
*
|
271
|
+
* There is a limit that applies to literal context bits and literal
|
272
|
+
* position bits together: lc + lp <= 4. Without this limit the
|
273
|
+
* decoding could become very slow, which could have security related
|
274
|
+
* results in some cases like email servers doing virus scanning.
|
275
|
+
* This limit also simplifies the internal implementation in liblzma.
|
276
|
+
*
|
277
|
+
* There may be LZMA1 streams that have lc + lp > 4 (maximum possible
|
278
|
+
* lc would be 8). It is not possible to decode such streams with
|
279
|
+
* liblzma.
|
280
|
+
*/
|
281
|
+
uint32_t lc;
|
282
|
+
# define LZMA_LCLP_MIN 0
|
283
|
+
# define LZMA_LCLP_MAX 4
|
284
|
+
# define LZMA_LC_DEFAULT 3
|
285
|
+
|
286
|
+
/**
|
287
|
+
* \brief Number of literal position bits
|
288
|
+
*
|
289
|
+
* lp affects what kind of alignment in the uncompressed data is
|
290
|
+
* assumed when encoding literals. A literal is a single 8-bit byte.
|
291
|
+
* See pb below for more information about alignment.
|
292
|
+
*/
|
293
|
+
uint32_t lp;
|
294
|
+
# define LZMA_LP_DEFAULT 0
|
295
|
+
|
296
|
+
/**
|
297
|
+
* \brief Number of position bits
|
298
|
+
*
|
299
|
+
* pb affects what kind of alignment in the uncompressed data is
|
300
|
+
* assumed in general. The default means four-byte alignment
|
301
|
+
* (2^ pb =2^2=4), which is often a good choice when there's
|
302
|
+
* no better guess.
|
303
|
+
*
|
304
|
+
* When the aligment is known, setting pb accordingly may reduce
|
305
|
+
* the file size a little. E.g. with text files having one-byte
|
306
|
+
* alignment (US-ASCII, ISO-8859-*, UTF-8), setting pb=0 can
|
307
|
+
* improve compression slightly. For UTF-16 text, pb=1 is a good
|
308
|
+
* choice. If the alignment is an odd number like 3 bytes, pb=0
|
309
|
+
* might be the best choice.
|
310
|
+
*
|
311
|
+
* Even though the assumed alignment can be adjusted with pb and
|
312
|
+
* lp, LZMA1 and LZMA2 still slightly favor 16-byte alignment.
|
313
|
+
* It might be worth taking into account when designing file formats
|
314
|
+
* that are likely to be often compressed with LZMA1 or LZMA2.
|
315
|
+
*/
|
316
|
+
uint32_t pb;
|
317
|
+
# define LZMA_PB_MIN 0
|
318
|
+
# define LZMA_PB_MAX 4
|
319
|
+
# define LZMA_PB_DEFAULT 2
|
320
|
+
|
321
|
+
/** Compression mode */
|
322
|
+
lzma_mode mode;
|
323
|
+
|
324
|
+
/**
|
325
|
+
* \brief Nice length of a match
|
326
|
+
*
|
327
|
+
* This determines how many bytes the encoder compares from the match
|
328
|
+
* candidates when looking for the best match. Once a match of at
|
329
|
+
* least nice_len bytes long is found, the encoder stops looking for
|
330
|
+
* better candidates and encodes the match. (Naturally, if the found
|
331
|
+
* match is actually longer than nice_len, the actual length is
|
332
|
+
* encoded; it's not truncated to nice_len.)
|
333
|
+
*
|
334
|
+
* Bigger values usually increase the compression ratio and
|
335
|
+
* compression time. For most files, 32 to 128 is a good value,
|
336
|
+
* which gives very good compression ratio at good speed.
|
337
|
+
*
|
338
|
+
* The exact minimum value depends on the match finder. The maximum
|
339
|
+
* is 273, which is the maximum length of a match that LZMA1 and
|
340
|
+
* LZMA2 can encode.
|
341
|
+
*/
|
342
|
+
uint32_t nice_len;
|
343
|
+
|
344
|
+
/** Match finder ID */
|
345
|
+
lzma_match_finder mf;
|
346
|
+
|
347
|
+
/**
|
348
|
+
* \brief Maximum search depth in the match finder
|
349
|
+
*
|
350
|
+
* For every input byte, match finder searches through the hash chain
|
351
|
+
* or binary tree in a loop, each iteration going one step deeper in
|
352
|
+
* the chain or tree. The searching stops if
|
353
|
+
* - a match of at least nice_len bytes long is found;
|
354
|
+
* - all match candidates from the hash chain or binary tree have
|
355
|
+
* been checked; or
|
356
|
+
* - maximum search depth is reached.
|
357
|
+
*
|
358
|
+
* Maximum search depth is needed to prevent the match finder from
|
359
|
+
* wasting too much time in case there are lots of short match
|
360
|
+
* candidates. On the other hand, stopping the search before all
|
361
|
+
* candidates have been checked can reduce compression ratio.
|
362
|
+
*
|
363
|
+
* Setting depth to zero tells liblzma to use an automatic default
|
364
|
+
* value, that depends on the selected match finder and nice_len.
|
365
|
+
* The default is in the range [4, 200] or so (it may vary between
|
366
|
+
* liblzma versions).
|
367
|
+
*
|
368
|
+
* Using a bigger depth value than the default can increase
|
369
|
+
* compression ratio in some cases. There is no strict maximum value,
|
370
|
+
* but high values (thousands or millions) should be used with care:
|
371
|
+
* the encoder could remain fast enough with typical input, but
|
372
|
+
* malicious input could cause the match finder to slow down
|
373
|
+
* dramatically, possibly creating a denial of service attack.
|
374
|
+
*/
|
375
|
+
uint32_t depth;
|
376
|
+
|
377
|
+
/*
|
378
|
+
* Reserved space to allow possible future extensions without
|
379
|
+
* breaking the ABI. You should not touch these, because the names
|
380
|
+
* of these variables may change. These are and will never be used
|
381
|
+
* with the currently supported options, so it is safe to leave these
|
382
|
+
* uninitialized.
|
383
|
+
*/
|
384
|
+
uint32_t reserved_int1;
|
385
|
+
uint32_t reserved_int2;
|
386
|
+
uint32_t reserved_int3;
|
387
|
+
uint32_t reserved_int4;
|
388
|
+
uint32_t reserved_int5;
|
389
|
+
uint32_t reserved_int6;
|
390
|
+
uint32_t reserved_int7;
|
391
|
+
uint32_t reserved_int8;
|
392
|
+
lzma_reserved_enum reserved_enum1;
|
393
|
+
lzma_reserved_enum reserved_enum2;
|
394
|
+
lzma_reserved_enum reserved_enum3;
|
395
|
+
lzma_reserved_enum reserved_enum4;
|
396
|
+
void *reserved_ptr1;
|
397
|
+
void *reserved_ptr2;
|
398
|
+
|
399
|
+
} lzma_options_lzma;
|
400
|
+
|
401
|
+
|
402
|
+
/**
|
403
|
+
* \brief Set a compression preset to lzma_options_lzma structure
|
404
|
+
*
|
405
|
+
* 0 is the fastest and 9 is the slowest. These match the switches -0 .. -9
|
406
|
+
* of the xz command line tool. In addition, it is possible to bitwise-or
|
407
|
+
* flags to the preset. Currently only LZMA_PRESET_EXTREME is supported.
|
408
|
+
* The flags are defined in container.h, because the flags are used also
|
409
|
+
* with lzma_easy_encoder().
|
410
|
+
*
|
411
|
+
* The preset values are subject to changes between liblzma versions.
|
412
|
+
*
|
413
|
+
* This function is available only if LZMA1 or LZMA2 encoder has been enabled
|
414
|
+
* when building liblzma.
|
415
|
+
*
|
416
|
+
* \return On success, false is returned. If the preset is not
|
417
|
+
* supported, true is returned.
|
418
|
+
*/
|
419
|
+
extern LZMA_API(lzma_bool) lzma_lzma_preset(
|
420
|
+
lzma_options_lzma *options, uint32_t preset) lzma_nothrow;
|