node-liblzma 1.0.4 → 1.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/History.md +5 -0
- package/README.md +65 -37
- package/binding.gyp +671 -43
- package/package.json +39 -24
- package/prebuilds/linux-x64/node_lzma.node +0 -0
- package/prebuilds/mac-x64/node_lzma.node +0 -0
- package/prebuilds/win-x64/node_lzma.node +0 -0
- package/scripts/download_extract_deps.py +29 -0
- package/scripts/prebuildify.py +13 -0
- package/scripts/walk_sources.py +7 -0
- package/src/bindings/module.cpp +86 -86
- package/src/bindings/node-liblzma.cpp +292 -273
- package/src/bindings/node-liblzma.hpp +62 -90
- package/src/lzma.coffee +25 -18
- package/.npmignore +0 -1
- package/.travis.yml +0 -35
- package/build/Makefile +0 -329
- package/build/Release/.deps/Release/node-liblzma.node.d +0 -1
- package/build/Release/.deps/Release/obj.target/action_after_build.stamp.d +0 -1
- package/build/Release/.deps/Release/obj.target/node-liblzma/src/bindings/module.o.d +0 -89
- package/build/Release/.deps/Release/obj.target/node-liblzma/src/bindings/node-liblzma.o.d +0 -89
- package/build/Release/.deps/Release/obj.target/node-liblzma.node.d +0 -1
- package/build/Release/.deps/home/o2/dev/node-liblzma/build/node-liblzma.node.d +0 -1
- package/build/Release/node-liblzma.node +0 -0
- package/build/Release/obj.target/action_after_build.stamp +0 -0
- package/build/Release/obj.target/node-liblzma/src/bindings/module.o +0 -0
- package/build/Release/obj.target/node-liblzma/src/bindings/node-liblzma.o +0 -0
- package/build/Release/obj.target/node-liblzma.node +0 -0
- package/build/action_after_build.target.mk +0 -32
- package/build/binding.Makefile +0 -6
- package/build/config.gypi +0 -143
- package/build/node-liblzma.node +0 -0
- package/build/node-liblzma.target.mk +0 -144
- package/build.yml +0 -65
- package/deps/xz/ABOUT-NLS +0 -1327
- package/deps/xz/AUTHORS +0 -27
- package/deps/xz/COPYING +0 -65
- package/deps/xz/COPYING.GPLv2 +0 -339
- package/deps/xz/COPYING.GPLv3 +0 -674
- package/deps/xz/COPYING.LGPLv2.1 +0 -502
- package/deps/xz/ChangeLog +0 -14953
- package/deps/xz/Doxyfile +0 -1234
- package/deps/xz/Doxyfile.in +0 -1234
- package/deps/xz/INSTALL +0 -554
- package/deps/xz/INSTALL.generic +0 -365
- package/deps/xz/Makefile +0 -1067
- package/deps/xz/Makefile.am +0 -109
- package/deps/xz/Makefile.in +0 -1067
- package/deps/xz/NEWS +0 -505
- package/deps/xz/PACKAGERS +0 -231
- package/deps/xz/README +0 -308
- package/deps/xz/THANKS +0 -116
- package/deps/xz/TODO +0 -111
- package/deps/xz/aclocal.m4 +0 -1225
- package/deps/xz/autogen.sh +0 -22
- package/deps/xz/autom4te.cache/output.0 +0 -21751
- package/deps/xz/autom4te.cache/output.1 +0 -21751
- package/deps/xz/autom4te.cache/requests +0 -415
- package/deps/xz/autom4te.cache/traces.0 +0 -6996
- package/deps/xz/autom4te.cache/traces.1 +0 -1783
- package/deps/xz/build-aux/compile +0 -347
- package/deps/xz/build-aux/config.guess +0 -1558
- package/deps/xz/build-aux/config.rpath +0 -672
- package/deps/xz/build-aux/config.sub +0 -1791
- package/deps/xz/build-aux/depcomp +0 -791
- package/deps/xz/build-aux/install-sh +0 -527
- package/deps/xz/build-aux/ltmain.sh +0 -9661
- package/deps/xz/build-aux/manconv.sh +0 -58
- package/deps/xz/build-aux/missing +0 -215
- package/deps/xz/build-aux/version.sh +0 -24
- package/deps/xz/config.h +0 -487
- package/deps/xz/config.h.in +0 -486
- package/deps/xz/config.h.in~ +0 -485
- package/deps/xz/config.log +0 -5446
- package/deps/xz/config.status +0 -2587
- package/deps/xz/configure +0 -21751
- package/deps/xz/configure.ac +0 -842
- package/deps/xz/debug/.deps/crc32.Po +0 -1
- package/deps/xz/debug/.deps/full_flush.Po +0 -1
- package/deps/xz/debug/.deps/hex2bin.Po +0 -1
- package/deps/xz/debug/.deps/known_sizes.Po +0 -1
- package/deps/xz/debug/.deps/memusage.Po +0 -1
- package/deps/xz/debug/.deps/repeat.Po +0 -1
- package/deps/xz/debug/.deps/sync_flush.Po +0 -1
- package/deps/xz/debug/Makefile +0 -691
- package/deps/xz/debug/Makefile.am +0 -30
- package/deps/xz/debug/Makefile.in +0 -691
- package/deps/xz/debug/README +0 -17
- package/deps/xz/debug/crc32.c +0 -39
- package/deps/xz/debug/full_flush.c +0 -103
- package/deps/xz/debug/hex2bin.c +0 -53
- package/deps/xz/debug/known_sizes.c +0 -129
- package/deps/xz/debug/memusage.c +0 -51
- package/deps/xz/debug/repeat.c +0 -36
- package/deps/xz/debug/sync_flush.c +0 -125
- package/deps/xz/debug/translation.bash +0 -100
- package/deps/xz/doc/examples/00_README.txt +0 -31
- package/deps/xz/doc/examples/01_compress_easy.c +0 -297
- package/deps/xz/doc/examples/02_decompress.c +0 -287
- package/deps/xz/doc/examples/03_compress_custom.c +0 -193
- package/deps/xz/doc/examples/04_compress_easy_mt.c +0 -206
- package/deps/xz/doc/examples/Makefile +0 -24
- package/deps/xz/doc/examples_old/xz_pipe_comp.c +0 -127
- package/deps/xz/doc/examples_old/xz_pipe_decomp.c +0 -123
- package/deps/xz/doc/faq.txt +0 -224
- package/deps/xz/doc/history.txt +0 -150
- package/deps/xz/doc/lzma-file-format.txt +0 -166
- package/deps/xz/doc/man/pdf-a4/lzmainfo-a4.pdf +0 -0
- package/deps/xz/doc/man/pdf-a4/xz-a4.pdf +0 -0
- package/deps/xz/doc/man/pdf-a4/xzdec-a4.pdf +0 -0
- package/deps/xz/doc/man/pdf-a4/xzdiff-a4.pdf +0 -0
- package/deps/xz/doc/man/pdf-a4/xzgrep-a4.pdf +0 -0
- package/deps/xz/doc/man/pdf-a4/xzless-a4.pdf +0 -0
- package/deps/xz/doc/man/pdf-a4/xzmore-a4.pdf +0 -0
- package/deps/xz/doc/man/pdf-letter/lzmainfo-letter.pdf +0 -0
- package/deps/xz/doc/man/pdf-letter/xz-letter.pdf +0 -0
- package/deps/xz/doc/man/pdf-letter/xzdec-letter.pdf +0 -0
- package/deps/xz/doc/man/pdf-letter/xzdiff-letter.pdf +0 -0
- package/deps/xz/doc/man/pdf-letter/xzgrep-letter.pdf +0 -0
- package/deps/xz/doc/man/pdf-letter/xzless-letter.pdf +0 -0
- package/deps/xz/doc/man/pdf-letter/xzmore-letter.pdf +0 -0
- package/deps/xz/doc/man/txt/lzmainfo.txt +0 -40
- package/deps/xz/doc/man/txt/xz.txt +0 -1483
- package/deps/xz/doc/man/txt/xzdec.txt +0 -80
- package/deps/xz/doc/man/txt/xzdiff.txt +0 -36
- package/deps/xz/doc/man/txt/xzgrep.txt +0 -39
- package/deps/xz/doc/man/txt/xzless.txt +0 -39
- package/deps/xz/doc/man/txt/xzmore.txt +0 -34
- package/deps/xz/doc/xz-file-format.txt +0 -1150
- package/deps/xz/dos/INSTALL.txt +0 -79
- package/deps/xz/dos/Makefile +0 -147
- package/deps/xz/dos/README.txt +0 -123
- package/deps/xz/dos/config.h +0 -130
- package/deps/xz/extra/7z2lzma/7z2lzma.bash +0 -115
- package/deps/xz/extra/scanlzma/scanlzma.c +0 -84
- package/deps/xz/include/lzma/base.h +0 -654
- package/deps/xz/include/lzma/bcj.h +0 -90
- package/deps/xz/include/lzma/block.h +0 -581
- package/deps/xz/include/lzma/check.h +0 -150
- package/deps/xz/include/lzma/container.h +0 -619
- package/deps/xz/include/lzma/delta.h +0 -77
- package/deps/xz/include/lzma/filter.h +0 -425
- package/deps/xz/include/lzma/hardware.h +0 -64
- package/deps/xz/include/lzma/index.h +0 -682
- package/deps/xz/include/lzma/index_hash.h +0 -107
- package/deps/xz/include/lzma/lzma12.h +0 -420
- package/deps/xz/include/lzma/stream_flags.h +0 -223
- package/deps/xz/include/lzma/version.h +0 -121
- package/deps/xz/include/lzma/vli.h +0 -166
- package/deps/xz/include/lzma.h +0 -321
- package/deps/xz/lib/.deps/getopt.Po +0 -1
- package/deps/xz/lib/.deps/getopt1.Po +0 -1
- package/deps/xz/lib/Makefile +0 -566
- package/deps/xz/lib/Makefile.am +0 -32
- package/deps/xz/lib/Makefile.in +0 -566
- package/deps/xz/lib/getopt.c +0 -1197
- package/deps/xz/lib/getopt.in.h +0 -226
- package/deps/xz/lib/getopt1.c +0 -171
- package/deps/xz/lib/getopt_int.h +0 -131
- package/deps/xz/lib/liblzma.a +0 -0
- package/deps/xz/lib/liblzma.la +0 -41
- package/deps/xz/lib/pkgconfig/liblzma.pc +0 -19
- package/deps/xz/libtool +0 -10221
- package/deps/xz/m4/ax_pthread.m4 +0 -332
- package/deps/xz/m4/codeset.m4 +0 -21
- package/deps/xz/m4/fcntl-o.m4 +0 -81
- package/deps/xz/m4/getopt.m4 +0 -71
- package/deps/xz/m4/gettext.m4 +0 -383
- package/deps/xz/m4/glibc2.m4 +0 -30
- package/deps/xz/m4/glibc21.m4 +0 -30
- package/deps/xz/m4/iconv.m4 +0 -199
- package/deps/xz/m4/intdiv0.m4 +0 -84
- package/deps/xz/m4/intl.m4 +0 -294
- package/deps/xz/m4/intldir.m4 +0 -19
- package/deps/xz/m4/intlmacosx.m4 +0 -51
- package/deps/xz/m4/intmax.m4 +0 -33
- package/deps/xz/m4/inttypes-pri.m4 +0 -36
- package/deps/xz/m4/inttypes_h.m4 +0 -26
- package/deps/xz/m4/lcmessage.m4 +0 -31
- package/deps/xz/m4/lib-ld.m4 +0 -110
- package/deps/xz/m4/lib-link.m4 +0 -774
- package/deps/xz/m4/lib-prefix.m4 +0 -224
- package/deps/xz/m4/libtool.m4 +0 -7997
- package/deps/xz/m4/lock.m4 +0 -37
- package/deps/xz/m4/longlong.m4 +0 -106
- package/deps/xz/m4/ltoptions.m4 +0 -384
- package/deps/xz/m4/ltsugar.m4 +0 -123
- package/deps/xz/m4/ltversion.m4 +0 -23
- package/deps/xz/m4/lt~obsolete.m4 +0 -98
- package/deps/xz/m4/nls.m4 +0 -32
- package/deps/xz/m4/po.m4 +0 -449
- package/deps/xz/m4/posix-shell.m4 +0 -63
- package/deps/xz/m4/printf-posix.m4 +0 -45
- package/deps/xz/m4/progtest.m4 +0 -92
- package/deps/xz/m4/size_max.m4 +0 -75
- package/deps/xz/m4/stdint_h.m4 +0 -26
- package/deps/xz/m4/threadlib.m4 +0 -347
- package/deps/xz/m4/tuklib_common.m4 +0 -22
- package/deps/xz/m4/tuklib_cpucores.m4 +0 -148
- package/deps/xz/m4/tuklib_integer.m4 +0 -74
- package/deps/xz/m4/tuklib_mbstr.m4 +0 -30
- package/deps/xz/m4/tuklib_physmem.m4 +0 -212
- package/deps/xz/m4/tuklib_progname.m4 +0 -25
- package/deps/xz/m4/uintmax_t.m4 +0 -30
- package/deps/xz/m4/visibility.m4 +0 -74
- package/deps/xz/m4/wchar_t.m4 +0 -20
- package/deps/xz/m4/wint_t.m4 +0 -28
- package/deps/xz/m4/xsize.m4 +0 -13
- package/deps/xz/macosx/build.sh +0 -113
- package/deps/xz/po/LINGUAS +0 -6
- package/deps/xz/po/Makefile +0 -549
- package/deps/xz/po/Makefile.in +0 -444
- package/deps/xz/po/Makefile.in.in +0 -444
- package/deps/xz/po/Makevars +0 -46
- package/deps/xz/po/Makevars.template +0 -41
- package/deps/xz/po/POTFILES +0 -12
- package/deps/xz/po/POTFILES.in +0 -13
- package/deps/xz/po/Rules-quot +0 -47
- package/deps/xz/po/boldquot.sed +0 -10
- package/deps/xz/po/cs.gmo +0 -0
- package/deps/xz/po/cs.po +0 -989
- package/deps/xz/po/de.gmo +0 -0
- package/deps/xz/po/de.po +0 -990
- package/deps/xz/po/en@boldquot.header +0 -25
- package/deps/xz/po/en@quot.header +0 -22
- package/deps/xz/po/fr.gmo +0 -0
- package/deps/xz/po/fr.po +0 -974
- package/deps/xz/po/insert-header.sin +0 -23
- package/deps/xz/po/it.gmo +0 -0
- package/deps/xz/po/it.po +0 -975
- package/deps/xz/po/pl.gmo +0 -0
- package/deps/xz/po/pl.po +0 -964
- package/deps/xz/po/quot.sed +0 -6
- package/deps/xz/po/remove-potcdate.sin +0 -19
- package/deps/xz/po/stamp-po +0 -1
- package/deps/xz/po/vi.gmo +0 -0
- package/deps/xz/po/vi.po +0 -970
- package/deps/xz/po/xz.pot +0 -854
- package/deps/xz/share/doc/xz/AUTHORS +0 -27
- package/deps/xz/share/doc/xz/COPYING +0 -65
- package/deps/xz/share/doc/xz/COPYING.GPLv2 +0 -339
- package/deps/xz/share/doc/xz/NEWS +0 -505
- package/deps/xz/share/doc/xz/README +0 -308
- package/deps/xz/share/doc/xz/THANKS +0 -116
- package/deps/xz/share/doc/xz/TODO +0 -111
- package/deps/xz/share/doc/xz/examples/00_README.txt +0 -31
- package/deps/xz/share/doc/xz/examples/01_compress_easy.c +0 -297
- package/deps/xz/share/doc/xz/examples/02_decompress.c +0 -287
- package/deps/xz/share/doc/xz/examples/03_compress_custom.c +0 -193
- package/deps/xz/share/doc/xz/examples/04_compress_easy_mt.c +0 -206
- package/deps/xz/share/doc/xz/examples/Makefile +0 -24
- package/deps/xz/share/doc/xz/examples_old/xz_pipe_comp.c +0 -127
- package/deps/xz/share/doc/xz/examples_old/xz_pipe_decomp.c +0 -123
- package/deps/xz/share/doc/xz/faq.txt +0 -224
- package/deps/xz/share/doc/xz/history.txt +0 -150
- package/deps/xz/share/doc/xz/lzma-file-format.txt +0 -166
- package/deps/xz/share/doc/xz/xz-file-format.txt +0 -1150
- package/deps/xz/share/locale/cs/LC_MESSAGES/xz.mo +0 -0
- package/deps/xz/share/locale/de/LC_MESSAGES/xz.mo +0 -0
- package/deps/xz/share/locale/fr/LC_MESSAGES/xz.mo +0 -0
- package/deps/xz/share/locale/it/LC_MESSAGES/xz.mo +0 -0
- package/deps/xz/share/locale/pl/LC_MESSAGES/xz.mo +0 -0
- package/deps/xz/share/locale/vi/LC_MESSAGES/xz.mo +0 -0
- package/deps/xz/src/Makefile +0 -674
- package/deps/xz/src/Makefile.am +0 -42
- package/deps/xz/src/Makefile.in +0 -674
- package/deps/xz/src/common/common_w32res.rc +0 -50
- package/deps/xz/src/common/mythread.h +0 -521
- package/deps/xz/src/common/sysdefs.h +0 -202
- package/deps/xz/src/common/tuklib_common.h +0 -71
- package/deps/xz/src/common/tuklib_config.h +0 -7
- package/deps/xz/src/common/tuklib_cpucores.c +0 -91
- package/deps/xz/src/common/tuklib_cpucores.h +0 -23
- package/deps/xz/src/common/tuklib_exit.c +0 -57
- package/deps/xz/src/common/tuklib_exit.h +0 -25
- package/deps/xz/src/common/tuklib_gettext.h +0 -44
- package/deps/xz/src/common/tuklib_integer.h +0 -523
- package/deps/xz/src/common/tuklib_mbstr.h +0 -66
- package/deps/xz/src/common/tuklib_mbstr_fw.c +0 -31
- package/deps/xz/src/common/tuklib_mbstr_width.c +0 -64
- package/deps/xz/src/common/tuklib_open_stdxxx.c +0 -57
- package/deps/xz/src/common/tuklib_open_stdxxx.h +0 -23
- package/deps/xz/src/common/tuklib_physmem.c +0 -215
- package/deps/xz/src/common/tuklib_physmem.h +0 -28
- package/deps/xz/src/common/tuklib_progname.c +0 -50
- package/deps/xz/src/common/tuklib_progname.h +0 -32
- package/deps/xz/src/liblzma/.deps/liblzma_la-alone_decoder.Plo +0 -269
- package/deps/xz/src/liblzma/.deps/liblzma_la-alone_encoder.Plo +0 -263
- package/deps/xz/src/liblzma/.deps/liblzma_la-arm.Plo +0 -263
- package/deps/xz/src/liblzma/.deps/liblzma_la-armthumb.Plo +0 -263
- package/deps/xz/src/liblzma/.deps/liblzma_la-auto_decoder.Plo +0 -263
- package/deps/xz/src/liblzma/.deps/liblzma_la-block_buffer_decoder.Plo +0 -261
- package/deps/xz/src/liblzma/.deps/liblzma_la-block_buffer_encoder.Plo +0 -273
- package/deps/xz/src/liblzma/.deps/liblzma_la-block_decoder.Plo +0 -268
- package/deps/xz/src/liblzma/.deps/liblzma_la-block_encoder.Plo +0 -268
- package/deps/xz/src/liblzma/.deps/liblzma_la-block_header_decoder.Plo +0 -263
- package/deps/xz/src/liblzma/.deps/liblzma_la-block_header_encoder.Plo +0 -263
- package/deps/xz/src/liblzma/.deps/liblzma_la-block_util.Plo +0 -260
- package/deps/xz/src/liblzma/.deps/liblzma_la-check.Plo +0 -261
- package/deps/xz/src/liblzma/.deps/liblzma_la-common.Plo +0 -258
- package/deps/xz/src/liblzma/.deps/liblzma_la-crc32_fast.Plo +0 -263
- package/deps/xz/src/liblzma/.deps/liblzma_la-crc32_small.Plo +0 -1
- package/deps/xz/src/liblzma/.deps/liblzma_la-crc32_table.Plo +0 -260
- package/deps/xz/src/liblzma/.deps/liblzma_la-crc32_x86.Plo +0 -1
- package/deps/xz/src/liblzma/.deps/liblzma_la-crc64_fast.Plo +0 -263
- package/deps/xz/src/liblzma/.deps/liblzma_la-crc64_small.Plo +0 -1
- package/deps/xz/src/liblzma/.deps/liblzma_la-crc64_table.Plo +0 -260
- package/deps/xz/src/liblzma/.deps/liblzma_la-crc64_x86.Plo +0 -1
- package/deps/xz/src/liblzma/.deps/liblzma_la-delta_common.Plo +0 -263
- package/deps/xz/src/liblzma/.deps/liblzma_la-delta_decoder.Plo +0 -265
- package/deps/xz/src/liblzma/.deps/liblzma_la-delta_encoder.Plo +0 -265
- package/deps/xz/src/liblzma/.deps/liblzma_la-easy_buffer_encoder.Plo +0 -261
- package/deps/xz/src/liblzma/.deps/liblzma_la-easy_decoder_memusage.Plo +0 -261
- package/deps/xz/src/liblzma/.deps/liblzma_la-easy_encoder.Plo +0 -261
- package/deps/xz/src/liblzma/.deps/liblzma_la-easy_encoder_memusage.Plo +0 -261
- package/deps/xz/src/liblzma/.deps/liblzma_la-easy_preset.Plo +0 -261
- package/deps/xz/src/liblzma/.deps/liblzma_la-fastpos_table.Plo +0 -261
- package/deps/xz/src/liblzma/.deps/liblzma_la-filter_buffer_decoder.Plo +0 -261
- package/deps/xz/src/liblzma/.deps/liblzma_la-filter_buffer_encoder.Plo +0 -261
- package/deps/xz/src/liblzma/.deps/liblzma_la-filter_common.Plo +0 -261
- package/deps/xz/src/liblzma/.deps/liblzma_la-filter_decoder.Plo +0 -283
- package/deps/xz/src/liblzma/.deps/liblzma_la-filter_encoder.Plo +0 -283
- package/deps/xz/src/liblzma/.deps/liblzma_la-filter_flags_decoder.Plo +0 -261
- package/deps/xz/src/liblzma/.deps/liblzma_la-filter_flags_encoder.Plo +0 -261
- package/deps/xz/src/liblzma/.deps/liblzma_la-hardware_cputhreads.Plo +0 -260
- package/deps/xz/src/liblzma/.deps/liblzma_la-hardware_physmem.Plo +0 -260
- package/deps/xz/src/liblzma/.deps/liblzma_la-ia64.Plo +0 -263
- package/deps/xz/src/liblzma/.deps/liblzma_la-index.Plo +0 -262
- package/deps/xz/src/liblzma/.deps/liblzma_la-index_decoder.Plo +0 -266
- package/deps/xz/src/liblzma/.deps/liblzma_la-index_encoder.Plo +0 -268
- package/deps/xz/src/liblzma/.deps/liblzma_la-index_hash.Plo +0 -265
- package/deps/xz/src/liblzma/.deps/liblzma_la-lz_decoder.Plo +0 -261
- package/deps/xz/src/liblzma/.deps/liblzma_la-lz_encoder.Plo +0 -286
- package/deps/xz/src/liblzma/.deps/liblzma_la-lz_encoder_mf.Plo +0 -286
- package/deps/xz/src/liblzma/.deps/liblzma_la-lzma2_decoder.Plo +0 -266
- package/deps/xz/src/liblzma/.deps/liblzma_la-lzma2_encoder.Plo +0 -268
- package/deps/xz/src/liblzma/.deps/liblzma_la-lzma_decoder.Plo +0 -274
- package/deps/xz/src/liblzma/.deps/liblzma_la-lzma_encoder.Plo +0 -285
- package/deps/xz/src/liblzma/.deps/liblzma_la-lzma_encoder_optimum_fast.Plo +0 -300
- package/deps/xz/src/liblzma/.deps/liblzma_la-lzma_encoder_optimum_normal.Plo +0 -303
- package/deps/xz/src/liblzma/.deps/liblzma_la-lzma_encoder_presets.Plo +0 -259
- package/deps/xz/src/liblzma/.deps/liblzma_la-outqueue.Plo +0 -260
- package/deps/xz/src/liblzma/.deps/liblzma_la-powerpc.Plo +0 -263
- package/deps/xz/src/liblzma/.deps/liblzma_la-price_table.Plo +0 -266
- package/deps/xz/src/liblzma/.deps/liblzma_la-sha256.Plo +0 -261
- package/deps/xz/src/liblzma/.deps/liblzma_la-simple_coder.Plo +0 -263
- package/deps/xz/src/liblzma/.deps/liblzma_la-simple_decoder.Plo +0 -263
- package/deps/xz/src/liblzma/.deps/liblzma_la-simple_encoder.Plo +0 -263
- package/deps/xz/src/liblzma/.deps/liblzma_la-sparc.Plo +0 -263
- package/deps/xz/src/liblzma/.deps/liblzma_la-stream_buffer_decoder.Plo +0 -261
- package/deps/xz/src/liblzma/.deps/liblzma_la-stream_buffer_encoder.Plo +0 -261
- package/deps/xz/src/liblzma/.deps/liblzma_la-stream_decoder.Plo +0 -263
- package/deps/xz/src/liblzma/.deps/liblzma_la-stream_encoder.Plo +0 -263
- package/deps/xz/src/liblzma/.deps/liblzma_la-stream_encoder_mt.Plo +0 -273
- package/deps/xz/src/liblzma/.deps/liblzma_la-stream_flags_common.Plo +0 -261
- package/deps/xz/src/liblzma/.deps/liblzma_la-stream_flags_decoder.Plo +0 -261
- package/deps/xz/src/liblzma/.deps/liblzma_la-stream_flags_encoder.Plo +0 -261
- package/deps/xz/src/liblzma/.deps/liblzma_la-tuklib_cpucores.Plo +0 -170
- package/deps/xz/src/liblzma/.deps/liblzma_la-tuklib_physmem.Plo +0 -170
- package/deps/xz/src/liblzma/.deps/liblzma_la-vli_decoder.Plo +0 -258
- package/deps/xz/src/liblzma/.deps/liblzma_la-vli_encoder.Plo +0 -258
- package/deps/xz/src/liblzma/.deps/liblzma_la-vli_size.Plo +0 -258
- package/deps/xz/src/liblzma/.deps/liblzma_la-x86.Plo +0 -263
- package/deps/xz/src/liblzma/.libs/liblzma.a +0 -0
- package/deps/xz/src/liblzma/.libs/liblzma.lai +0 -41
- package/deps/xz/src/liblzma/Makefile +0 -1858
- package/deps/xz/src/liblzma/Makefile.am +0 -122
- package/deps/xz/src/liblzma/Makefile.in +0 -1858
- package/deps/xz/src/liblzma/api/Makefile +0 -608
- package/deps/xz/src/liblzma/api/Makefile.am +0 -23
- package/deps/xz/src/liblzma/api/Makefile.in +0 -608
- package/deps/xz/src/liblzma/api/lzma/base.h +0 -654
- package/deps/xz/src/liblzma/api/lzma/bcj.h +0 -90
- package/deps/xz/src/liblzma/api/lzma/block.h +0 -581
- package/deps/xz/src/liblzma/api/lzma/check.h +0 -150
- package/deps/xz/src/liblzma/api/lzma/container.h +0 -619
- package/deps/xz/src/liblzma/api/lzma/delta.h +0 -77
- package/deps/xz/src/liblzma/api/lzma/filter.h +0 -425
- package/deps/xz/src/liblzma/api/lzma/hardware.h +0 -64
- package/deps/xz/src/liblzma/api/lzma/index.h +0 -682
- package/deps/xz/src/liblzma/api/lzma/index_hash.h +0 -107
- package/deps/xz/src/liblzma/api/lzma/lzma12.h +0 -420
- package/deps/xz/src/liblzma/api/lzma/stream_flags.h +0 -223
- package/deps/xz/src/liblzma/api/lzma/version.h +0 -121
- package/deps/xz/src/liblzma/api/lzma/vli.h +0 -166
- package/deps/xz/src/liblzma/api/lzma.h +0 -321
- package/deps/xz/src/liblzma/check/Makefile.inc +0 -53
- package/deps/xz/src/liblzma/check/check.c +0 -174
- package/deps/xz/src/liblzma/check/check.h +0 -162
- package/deps/xz/src/liblzma/check/crc32_fast.c +0 -82
- package/deps/xz/src/liblzma/check/crc32_small.c +0 -61
- package/deps/xz/src/liblzma/check/crc32_table.c +0 -19
- package/deps/xz/src/liblzma/check/crc32_table_be.h +0 -525
- package/deps/xz/src/liblzma/check/crc32_table_le.h +0 -525
- package/deps/xz/src/liblzma/check/crc32_tablegen.c +0 -117
- package/deps/xz/src/liblzma/check/crc32_x86.S +0 -304
- package/deps/xz/src/liblzma/check/crc64_fast.c +0 -72
- package/deps/xz/src/liblzma/check/crc64_small.c +0 -53
- package/deps/xz/src/liblzma/check/crc64_table.c +0 -19
- package/deps/xz/src/liblzma/check/crc64_table_be.h +0 -521
- package/deps/xz/src/liblzma/check/crc64_table_le.h +0 -521
- package/deps/xz/src/liblzma/check/crc64_tablegen.c +0 -88
- package/deps/xz/src/liblzma/check/crc64_x86.S +0 -287
- package/deps/xz/src/liblzma/check/crc_macros.h +0 -30
- package/deps/xz/src/liblzma/check/sha256.c +0 -196
- package/deps/xz/src/liblzma/common/Makefile.inc +0 -76
- package/deps/xz/src/liblzma/common/alone_decoder.c +0 -238
- package/deps/xz/src/liblzma/common/alone_decoder.h +0 -23
- package/deps/xz/src/liblzma/common/alone_encoder.c +0 -157
- package/deps/xz/src/liblzma/common/auto_decoder.c +0 -186
- package/deps/xz/src/liblzma/common/block_buffer_decoder.c +0 -80
- package/deps/xz/src/liblzma/common/block_buffer_encoder.c +0 -337
- package/deps/xz/src/liblzma/common/block_buffer_encoder.h +0 -24
- package/deps/xz/src/liblzma/common/block_decoder.c +0 -252
- package/deps/xz/src/liblzma/common/block_decoder.h +0 -22
- package/deps/xz/src/liblzma/common/block_encoder.c +0 -217
- package/deps/xz/src/liblzma/common/block_encoder.h +0 -47
- package/deps/xz/src/liblzma/common/block_header_decoder.c +0 -124
- package/deps/xz/src/liblzma/common/block_header_encoder.c +0 -132
- package/deps/xz/src/liblzma/common/block_util.c +0 -90
- package/deps/xz/src/liblzma/common/common.c +0 -443
- package/deps/xz/src/liblzma/common/common.h +0 -318
- package/deps/xz/src/liblzma/common/easy_buffer_encoder.c +0 -27
- package/deps/xz/src/liblzma/common/easy_decoder_memusage.c +0 -24
- package/deps/xz/src/liblzma/common/easy_encoder.c +0 -24
- package/deps/xz/src/liblzma/common/easy_encoder_memusage.c +0 -24
- package/deps/xz/src/liblzma/common/easy_preset.c +0 -27
- package/deps/xz/src/liblzma/common/easy_preset.h +0 -32
- package/deps/xz/src/liblzma/common/filter_buffer_decoder.c +0 -88
- package/deps/xz/src/liblzma/common/filter_buffer_encoder.c +0 -55
- package/deps/xz/src/liblzma/common/filter_common.c +0 -337
- package/deps/xz/src/liblzma/common/filter_common.h +0 -48
- package/deps/xz/src/liblzma/common/filter_decoder.c +0 -184
- package/deps/xz/src/liblzma/common/filter_decoder.h +0 -23
- package/deps/xz/src/liblzma/common/filter_encoder.c +0 -286
- package/deps/xz/src/liblzma/common/filter_encoder.h +0 -27
- package/deps/xz/src/liblzma/common/filter_flags_decoder.c +0 -46
- package/deps/xz/src/liblzma/common/filter_flags_encoder.c +0 -56
- package/deps/xz/src/liblzma/common/hardware_cputhreads.c +0 -22
- package/deps/xz/src/liblzma/common/hardware_physmem.c +0 -25
- package/deps/xz/src/liblzma/common/index.c +0 -1246
- package/deps/xz/src/liblzma/common/index.h +0 -73
- package/deps/xz/src/liblzma/common/index_decoder.c +0 -345
- package/deps/xz/src/liblzma/common/index_encoder.c +0 -254
- package/deps/xz/src/liblzma/common/index_encoder.h +0 -23
- package/deps/xz/src/liblzma/common/index_hash.c +0 -334
- package/deps/xz/src/liblzma/common/memcmplen.h +0 -175
- package/deps/xz/src/liblzma/common/outqueue.c +0 -184
- package/deps/xz/src/liblzma/common/outqueue.h +0 -156
- package/deps/xz/src/liblzma/common/stream_buffer_decoder.c +0 -91
- package/deps/xz/src/liblzma/common/stream_buffer_encoder.c +0 -141
- package/deps/xz/src/liblzma/common/stream_decoder.c +0 -462
- package/deps/xz/src/liblzma/common/stream_decoder.h +0 -22
- package/deps/xz/src/liblzma/common/stream_encoder.c +0 -332
- package/deps/xz/src/liblzma/common/stream_encoder_mt.c +0 -1131
- package/deps/xz/src/liblzma/common/stream_flags_common.c +0 -47
- package/deps/xz/src/liblzma/common/stream_flags_common.h +0 -33
- package/deps/xz/src/liblzma/common/stream_flags_decoder.c +0 -82
- package/deps/xz/src/liblzma/common/stream_flags_encoder.c +0 -86
- package/deps/xz/src/liblzma/common/vli_decoder.c +0 -86
- package/deps/xz/src/liblzma/common/vli_encoder.c +0 -69
- package/deps/xz/src/liblzma/common/vli_size.c +0 -30
- package/deps/xz/src/liblzma/delta/Makefile.inc +0 -23
- package/deps/xz/src/liblzma/delta/delta_common.c +0 -70
- package/deps/xz/src/liblzma/delta/delta_common.h +0 -20
- package/deps/xz/src/liblzma/delta/delta_decoder.c +0 -76
- package/deps/xz/src/liblzma/delta/delta_decoder.h +0 -26
- package/deps/xz/src/liblzma/delta/delta_encoder.c +0 -121
- package/deps/xz/src/liblzma/delta/delta_encoder.h +0 -24
- package/deps/xz/src/liblzma/delta/delta_private.h +0 -37
- package/deps/xz/src/liblzma/liblzma.la +0 -41
- package/deps/xz/src/liblzma/liblzma.map +0 -108
- package/deps/xz/src/liblzma/liblzma.pc +0 -19
- package/deps/xz/src/liblzma/liblzma.pc.in +0 -19
- package/deps/xz/src/liblzma/liblzma_la-alone_decoder.lo +0 -12
- package/deps/xz/src/liblzma/liblzma_la-alone_decoder.o +0 -0
- package/deps/xz/src/liblzma/liblzma_la-alone_encoder.lo +0 -12
- package/deps/xz/src/liblzma/liblzma_la-alone_encoder.o +0 -0
- package/deps/xz/src/liblzma/liblzma_la-arm.lo +0 -12
- package/deps/xz/src/liblzma/liblzma_la-arm.o +0 -0
- package/deps/xz/src/liblzma/liblzma_la-armthumb.lo +0 -12
- package/deps/xz/src/liblzma/liblzma_la-armthumb.o +0 -0
- package/deps/xz/src/liblzma/liblzma_la-auto_decoder.lo +0 -12
- package/deps/xz/src/liblzma/liblzma_la-auto_decoder.o +0 -0
- package/deps/xz/src/liblzma/liblzma_la-block_buffer_decoder.lo +0 -12
- package/deps/xz/src/liblzma/liblzma_la-block_buffer_decoder.o +0 -0
- package/deps/xz/src/liblzma/liblzma_la-block_buffer_encoder.lo +0 -12
- package/deps/xz/src/liblzma/liblzma_la-block_buffer_encoder.o +0 -0
- package/deps/xz/src/liblzma/liblzma_la-block_decoder.lo +0 -12
- package/deps/xz/src/liblzma/liblzma_la-block_decoder.o +0 -0
- package/deps/xz/src/liblzma/liblzma_la-block_encoder.lo +0 -12
- package/deps/xz/src/liblzma/liblzma_la-block_encoder.o +0 -0
- package/deps/xz/src/liblzma/liblzma_la-block_header_decoder.lo +0 -12
- package/deps/xz/src/liblzma/liblzma_la-block_header_decoder.o +0 -0
- package/deps/xz/src/liblzma/liblzma_la-block_header_encoder.lo +0 -12
- package/deps/xz/src/liblzma/liblzma_la-block_header_encoder.o +0 -0
- package/deps/xz/src/liblzma/liblzma_la-block_util.lo +0 -12
- package/deps/xz/src/liblzma/liblzma_la-block_util.o +0 -0
- package/deps/xz/src/liblzma/liblzma_la-check.lo +0 -12
- package/deps/xz/src/liblzma/liblzma_la-check.o +0 -0
- package/deps/xz/src/liblzma/liblzma_la-common.lo +0 -12
- package/deps/xz/src/liblzma/liblzma_la-common.o +0 -0
- package/deps/xz/src/liblzma/liblzma_la-crc32_fast.lo +0 -12
- package/deps/xz/src/liblzma/liblzma_la-crc32_fast.o +0 -0
- package/deps/xz/src/liblzma/liblzma_la-crc32_table.lo +0 -12
- package/deps/xz/src/liblzma/liblzma_la-crc32_table.o +0 -0
- package/deps/xz/src/liblzma/liblzma_la-crc64_fast.lo +0 -12
- package/deps/xz/src/liblzma/liblzma_la-crc64_fast.o +0 -0
- package/deps/xz/src/liblzma/liblzma_la-crc64_table.lo +0 -12
- package/deps/xz/src/liblzma/liblzma_la-crc64_table.o +0 -0
- package/deps/xz/src/liblzma/liblzma_la-delta_common.lo +0 -12
- package/deps/xz/src/liblzma/liblzma_la-delta_common.o +0 -0
- package/deps/xz/src/liblzma/liblzma_la-delta_decoder.lo +0 -12
- package/deps/xz/src/liblzma/liblzma_la-delta_decoder.o +0 -0
- package/deps/xz/src/liblzma/liblzma_la-delta_encoder.lo +0 -12
- package/deps/xz/src/liblzma/liblzma_la-delta_encoder.o +0 -0
- package/deps/xz/src/liblzma/liblzma_la-easy_buffer_encoder.lo +0 -12
- package/deps/xz/src/liblzma/liblzma_la-easy_buffer_encoder.o +0 -0
- package/deps/xz/src/liblzma/liblzma_la-easy_decoder_memusage.lo +0 -12
- package/deps/xz/src/liblzma/liblzma_la-easy_decoder_memusage.o +0 -0
- package/deps/xz/src/liblzma/liblzma_la-easy_encoder.lo +0 -12
- package/deps/xz/src/liblzma/liblzma_la-easy_encoder.o +0 -0
- package/deps/xz/src/liblzma/liblzma_la-easy_encoder_memusage.lo +0 -12
- package/deps/xz/src/liblzma/liblzma_la-easy_encoder_memusage.o +0 -0
- package/deps/xz/src/liblzma/liblzma_la-easy_preset.lo +0 -12
- package/deps/xz/src/liblzma/liblzma_la-easy_preset.o +0 -0
- package/deps/xz/src/liblzma/liblzma_la-fastpos_table.lo +0 -12
- package/deps/xz/src/liblzma/liblzma_la-fastpos_table.o +0 -0
- package/deps/xz/src/liblzma/liblzma_la-filter_buffer_decoder.lo +0 -12
- package/deps/xz/src/liblzma/liblzma_la-filter_buffer_decoder.o +0 -0
- package/deps/xz/src/liblzma/liblzma_la-filter_buffer_encoder.lo +0 -12
- package/deps/xz/src/liblzma/liblzma_la-filter_buffer_encoder.o +0 -0
- package/deps/xz/src/liblzma/liblzma_la-filter_common.lo +0 -12
- package/deps/xz/src/liblzma/liblzma_la-filter_common.o +0 -0
- package/deps/xz/src/liblzma/liblzma_la-filter_decoder.lo +0 -12
- package/deps/xz/src/liblzma/liblzma_la-filter_decoder.o +0 -0
- package/deps/xz/src/liblzma/liblzma_la-filter_encoder.lo +0 -12
- package/deps/xz/src/liblzma/liblzma_la-filter_encoder.o +0 -0
- package/deps/xz/src/liblzma/liblzma_la-filter_flags_decoder.lo +0 -12
- package/deps/xz/src/liblzma/liblzma_la-filter_flags_decoder.o +0 -0
- package/deps/xz/src/liblzma/liblzma_la-filter_flags_encoder.lo +0 -12
- package/deps/xz/src/liblzma/liblzma_la-filter_flags_encoder.o +0 -0
- package/deps/xz/src/liblzma/liblzma_la-hardware_cputhreads.lo +0 -12
- package/deps/xz/src/liblzma/liblzma_la-hardware_cputhreads.o +0 -0
- package/deps/xz/src/liblzma/liblzma_la-hardware_physmem.lo +0 -12
- package/deps/xz/src/liblzma/liblzma_la-hardware_physmem.o +0 -0
- package/deps/xz/src/liblzma/liblzma_la-ia64.lo +0 -12
- package/deps/xz/src/liblzma/liblzma_la-ia64.o +0 -0
- package/deps/xz/src/liblzma/liblzma_la-index.lo +0 -12
- package/deps/xz/src/liblzma/liblzma_la-index.o +0 -0
- package/deps/xz/src/liblzma/liblzma_la-index_decoder.lo +0 -12
- package/deps/xz/src/liblzma/liblzma_la-index_decoder.o +0 -0
- package/deps/xz/src/liblzma/liblzma_la-index_encoder.lo +0 -12
- package/deps/xz/src/liblzma/liblzma_la-index_encoder.o +0 -0
- package/deps/xz/src/liblzma/liblzma_la-index_hash.lo +0 -12
- package/deps/xz/src/liblzma/liblzma_la-index_hash.o +0 -0
- package/deps/xz/src/liblzma/liblzma_la-lz_decoder.lo +0 -12
- package/deps/xz/src/liblzma/liblzma_la-lz_decoder.o +0 -0
- package/deps/xz/src/liblzma/liblzma_la-lz_encoder.lo +0 -12
- package/deps/xz/src/liblzma/liblzma_la-lz_encoder.o +0 -0
- package/deps/xz/src/liblzma/liblzma_la-lz_encoder_mf.lo +0 -12
- package/deps/xz/src/liblzma/liblzma_la-lz_encoder_mf.o +0 -0
- package/deps/xz/src/liblzma/liblzma_la-lzma2_decoder.lo +0 -12
- package/deps/xz/src/liblzma/liblzma_la-lzma2_decoder.o +0 -0
- package/deps/xz/src/liblzma/liblzma_la-lzma2_encoder.lo +0 -12
- package/deps/xz/src/liblzma/liblzma_la-lzma2_encoder.o +0 -0
- package/deps/xz/src/liblzma/liblzma_la-lzma_decoder.lo +0 -12
- package/deps/xz/src/liblzma/liblzma_la-lzma_decoder.o +0 -0
- package/deps/xz/src/liblzma/liblzma_la-lzma_encoder.lo +0 -12
- package/deps/xz/src/liblzma/liblzma_la-lzma_encoder.o +0 -0
- package/deps/xz/src/liblzma/liblzma_la-lzma_encoder_optimum_fast.lo +0 -12
- package/deps/xz/src/liblzma/liblzma_la-lzma_encoder_optimum_fast.o +0 -0
- package/deps/xz/src/liblzma/liblzma_la-lzma_encoder_optimum_normal.lo +0 -12
- package/deps/xz/src/liblzma/liblzma_la-lzma_encoder_optimum_normal.o +0 -0
- package/deps/xz/src/liblzma/liblzma_la-lzma_encoder_presets.lo +0 -12
- package/deps/xz/src/liblzma/liblzma_la-lzma_encoder_presets.o +0 -0
- package/deps/xz/src/liblzma/liblzma_la-outqueue.lo +0 -12
- package/deps/xz/src/liblzma/liblzma_la-outqueue.o +0 -0
- package/deps/xz/src/liblzma/liblzma_la-powerpc.lo +0 -12
- package/deps/xz/src/liblzma/liblzma_la-powerpc.o +0 -0
- package/deps/xz/src/liblzma/liblzma_la-price_table.lo +0 -12
- package/deps/xz/src/liblzma/liblzma_la-price_table.o +0 -0
- package/deps/xz/src/liblzma/liblzma_la-sha256.lo +0 -12
- package/deps/xz/src/liblzma/liblzma_la-sha256.o +0 -0
- package/deps/xz/src/liblzma/liblzma_la-simple_coder.lo +0 -12
- package/deps/xz/src/liblzma/liblzma_la-simple_coder.o +0 -0
- package/deps/xz/src/liblzma/liblzma_la-simple_decoder.lo +0 -12
- package/deps/xz/src/liblzma/liblzma_la-simple_decoder.o +0 -0
- package/deps/xz/src/liblzma/liblzma_la-simple_encoder.lo +0 -12
- package/deps/xz/src/liblzma/liblzma_la-simple_encoder.o +0 -0
- package/deps/xz/src/liblzma/liblzma_la-sparc.lo +0 -12
- package/deps/xz/src/liblzma/liblzma_la-sparc.o +0 -0
- package/deps/xz/src/liblzma/liblzma_la-stream_buffer_decoder.lo +0 -12
- package/deps/xz/src/liblzma/liblzma_la-stream_buffer_decoder.o +0 -0
- package/deps/xz/src/liblzma/liblzma_la-stream_buffer_encoder.lo +0 -12
- package/deps/xz/src/liblzma/liblzma_la-stream_buffer_encoder.o +0 -0
- package/deps/xz/src/liblzma/liblzma_la-stream_decoder.lo +0 -12
- package/deps/xz/src/liblzma/liblzma_la-stream_decoder.o +0 -0
- package/deps/xz/src/liblzma/liblzma_la-stream_encoder.lo +0 -12
- package/deps/xz/src/liblzma/liblzma_la-stream_encoder.o +0 -0
- package/deps/xz/src/liblzma/liblzma_la-stream_encoder_mt.lo +0 -12
- package/deps/xz/src/liblzma/liblzma_la-stream_encoder_mt.o +0 -0
- package/deps/xz/src/liblzma/liblzma_la-stream_flags_common.lo +0 -12
- package/deps/xz/src/liblzma/liblzma_la-stream_flags_common.o +0 -0
- package/deps/xz/src/liblzma/liblzma_la-stream_flags_decoder.lo +0 -12
- package/deps/xz/src/liblzma/liblzma_la-stream_flags_decoder.o +0 -0
- package/deps/xz/src/liblzma/liblzma_la-stream_flags_encoder.lo +0 -12
- package/deps/xz/src/liblzma/liblzma_la-stream_flags_encoder.o +0 -0
- package/deps/xz/src/liblzma/liblzma_la-tuklib_cpucores.lo +0 -12
- package/deps/xz/src/liblzma/liblzma_la-tuklib_cpucores.o +0 -0
- package/deps/xz/src/liblzma/liblzma_la-tuklib_physmem.lo +0 -12
- package/deps/xz/src/liblzma/liblzma_la-tuklib_physmem.o +0 -0
- package/deps/xz/src/liblzma/liblzma_la-vli_decoder.lo +0 -12
- package/deps/xz/src/liblzma/liblzma_la-vli_decoder.o +0 -0
- package/deps/xz/src/liblzma/liblzma_la-vli_encoder.lo +0 -12
- package/deps/xz/src/liblzma/liblzma_la-vli_encoder.o +0 -0
- package/deps/xz/src/liblzma/liblzma_la-vli_size.lo +0 -12
- package/deps/xz/src/liblzma/liblzma_la-vli_size.o +0 -0
- package/deps/xz/src/liblzma/liblzma_la-x86.lo +0 -12
- package/deps/xz/src/liblzma/liblzma_la-x86.o +0 -0
- package/deps/xz/src/liblzma/liblzma_w32res.rc +0 -12
- package/deps/xz/src/liblzma/lz/Makefile.inc +0 -22
- package/deps/xz/src/liblzma/lz/lz_decoder.c +0 -300
- package/deps/xz/src/liblzma/lz/lz_decoder.h +0 -235
- package/deps/xz/src/liblzma/lz/lz_encoder.c +0 -605
- package/deps/xz/src/liblzma/lz/lz_encoder.h +0 -328
- package/deps/xz/src/liblzma/lz/lz_encoder_hash.h +0 -108
- package/deps/xz/src/liblzma/lz/lz_encoder_hash_table.h +0 -68
- package/deps/xz/src/liblzma/lz/lz_encoder_mf.c +0 -744
- package/deps/xz/src/liblzma/lzma/Makefile.inc +0 -43
- package/deps/xz/src/liblzma/lzma/fastpos.h +0 -141
- package/deps/xz/src/liblzma/lzma/fastpos_table.c +0 -519
- package/deps/xz/src/liblzma/lzma/fastpos_tablegen.c +0 -56
- package/deps/xz/src/liblzma/lzma/lzma2_decoder.c +0 -304
- package/deps/xz/src/liblzma/lzma/lzma2_decoder.h +0 -29
- package/deps/xz/src/liblzma/lzma/lzma2_encoder.c +0 -403
- package/deps/xz/src/liblzma/lzma/lzma2_encoder.h +0 -43
- package/deps/xz/src/liblzma/lzma/lzma_common.h +0 -224
- package/deps/xz/src/liblzma/lzma/lzma_decoder.c +0 -1061
- package/deps/xz/src/liblzma/lzma/lzma_decoder.h +0 -53
- package/deps/xz/src/liblzma/lzma/lzma_encoder.c +0 -676
- package/deps/xz/src/liblzma/lzma/lzma_encoder.h +0 -55
- package/deps/xz/src/liblzma/lzma/lzma_encoder_optimum_fast.c +0 -169
- package/deps/xz/src/liblzma/lzma/lzma_encoder_optimum_normal.c +0 -854
- package/deps/xz/src/liblzma/lzma/lzma_encoder_presets.c +0 -63
- package/deps/xz/src/liblzma/lzma/lzma_encoder_private.h +0 -148
- package/deps/xz/src/liblzma/rangecoder/Makefile.inc +0 -21
- package/deps/xz/src/liblzma/rangecoder/price.h +0 -92
- package/deps/xz/src/liblzma/rangecoder/price_table.c +0 -22
- package/deps/xz/src/liblzma/rangecoder/price_tablegen.c +0 -87
- package/deps/xz/src/liblzma/rangecoder/range_common.h +0 -73
- package/deps/xz/src/liblzma/rangecoder/range_decoder.h +0 -185
- package/deps/xz/src/liblzma/rangecoder/range_encoder.h +0 -231
- package/deps/xz/src/liblzma/simple/Makefile.inc +0 -47
- package/deps/xz/src/liblzma/simple/arm.c +0 -71
- package/deps/xz/src/liblzma/simple/armthumb.c +0 -76
- package/deps/xz/src/liblzma/simple/ia64.c +0 -112
- package/deps/xz/src/liblzma/simple/powerpc.c +0 -75
- package/deps/xz/src/liblzma/simple/simple_coder.c +0 -277
- package/deps/xz/src/liblzma/simple/simple_coder.h +0 -72
- package/deps/xz/src/liblzma/simple/simple_decoder.c +0 -40
- package/deps/xz/src/liblzma/simple/simple_decoder.h +0 -22
- package/deps/xz/src/liblzma/simple/simple_encoder.c +0 -38
- package/deps/xz/src/liblzma/simple/simple_encoder.h +0 -23
- package/deps/xz/src/liblzma/simple/simple_private.h +0 -76
- package/deps/xz/src/liblzma/simple/sparc.c +0 -83
- package/deps/xz/src/liblzma/simple/x86.c +0 -156
- package/deps/xz/src/liblzma/validate_map.sh +0 -68
- package/deps/xz/src/lzmainfo/.deps/lzmainfo-lzmainfo.Po +0 -1
- package/deps/xz/src/lzmainfo/.deps/lzmainfo-tuklib_exit.Po +0 -1
- package/deps/xz/src/lzmainfo/.deps/lzmainfo-tuklib_progname.Po +0 -1
- package/deps/xz/src/lzmainfo/Makefile +0 -802
- package/deps/xz/src/lzmainfo/Makefile.am +0 -39
- package/deps/xz/src/lzmainfo/Makefile.in +0 -802
- package/deps/xz/src/lzmainfo/lzmainfo.1 +0 -60
- package/deps/xz/src/lzmainfo/lzmainfo.c +0 -219
- package/deps/xz/src/lzmainfo/lzmainfo_w32res.rc +0 -12
- package/deps/xz/src/scripts/Makefile +0 -642
- package/deps/xz/src/scripts/Makefile.am +0 -55
- package/deps/xz/src/scripts/Makefile.in +0 -642
- package/deps/xz/src/scripts/xzdiff +0 -200
- package/deps/xz/src/scripts/xzdiff.1 +0 -77
- package/deps/xz/src/scripts/xzdiff.in +0 -200
- package/deps/xz/src/scripts/xzgrep +0 -215
- package/deps/xz/src/scripts/xzgrep.1 +0 -98
- package/deps/xz/src/scripts/xzgrep.in +0 -215
- package/deps/xz/src/scripts/xzless +0 -58
- package/deps/xz/src/scripts/xzless.1 +0 -69
- package/deps/xz/src/scripts/xzless.in +0 -58
- package/deps/xz/src/scripts/xzmore +0 -78
- package/deps/xz/src/scripts/xzmore.1 +0 -55
- package/deps/xz/src/scripts/xzmore.in +0 -78
- package/deps/xz/src/xz/.deps/xz-args.Po +0 -1
- package/deps/xz/src/xz/.deps/xz-coder.Po +0 -1
- package/deps/xz/src/xz/.deps/xz-file_io.Po +0 -1
- package/deps/xz/src/xz/.deps/xz-hardware.Po +0 -1
- package/deps/xz/src/xz/.deps/xz-list.Po +0 -1
- package/deps/xz/src/xz/.deps/xz-main.Po +0 -1
- package/deps/xz/src/xz/.deps/xz-message.Po +0 -1
- package/deps/xz/src/xz/.deps/xz-mytime.Po +0 -1
- package/deps/xz/src/xz/.deps/xz-options.Po +0 -1
- package/deps/xz/src/xz/.deps/xz-signals.Po +0 -1
- package/deps/xz/src/xz/.deps/xz-suffix.Po +0 -1
- package/deps/xz/src/xz/.deps/xz-tuklib_exit.Po +0 -1
- package/deps/xz/src/xz/.deps/xz-tuklib_mbstr_fw.Po +0 -1
- package/deps/xz/src/xz/.deps/xz-tuklib_mbstr_width.Po +0 -1
- package/deps/xz/src/xz/.deps/xz-tuklib_open_stdxxx.Po +0 -1
- package/deps/xz/src/xz/.deps/xz-tuklib_progname.Po +0 -1
- package/deps/xz/src/xz/.deps/xz-util.Po +0 -1
- package/deps/xz/src/xz/Makefile +0 -1066
- package/deps/xz/src/xz/Makefile.am +0 -107
- package/deps/xz/src/xz/Makefile.in +0 -1066
- package/deps/xz/src/xz/args.c +0 -684
- package/deps/xz/src/xz/args.h +0 -44
- package/deps/xz/src/xz/coder.c +0 -919
- package/deps/xz/src/xz/coder.h +0 -76
- package/deps/xz/src/xz/file_io.c +0 -1184
- package/deps/xz/src/xz/file_io.h +0 -150
- package/deps/xz/src/xz/hardware.c +0 -150
- package/deps/xz/src/xz/hardware.h +0 -37
- package/deps/xz/src/xz/list.c +0 -1186
- package/deps/xz/src/xz/list.h +0 -18
- package/deps/xz/src/xz/main.c +0 -307
- package/deps/xz/src/xz/main.h +0 -30
- package/deps/xz/src/xz/message.c +0 -1258
- package/deps/xz/src/xz/message.h +0 -167
- package/deps/xz/src/xz/mytime.c +0 -89
- package/deps/xz/src/xz/mytime.h +0 -47
- package/deps/xz/src/xz/options.c +0 -363
- package/deps/xz/src/xz/options.h +0 -31
- package/deps/xz/src/xz/private.h +0 -59
- package/deps/xz/src/xz/signals.c +0 -209
- package/deps/xz/src/xz/signals.h +0 -43
- package/deps/xz/src/xz/suffix.c +0 -399
- package/deps/xz/src/xz/suffix.h +0 -28
- package/deps/xz/src/xz/util.c +0 -288
- package/deps/xz/src/xz/util.h +0 -123
- package/deps/xz/src/xz/xz.1 +0 -2786
- package/deps/xz/src/xz/xz_w32res.rc +0 -12
- package/deps/xz/src/xzdec/.deps/lzmadec-tuklib_exit.Po +0 -1
- package/deps/xz/src/xzdec/.deps/lzmadec-tuklib_progname.Po +0 -1
- package/deps/xz/src/xzdec/.deps/lzmadec-xzdec.Po +0 -1
- package/deps/xz/src/xzdec/.deps/xzdec-tuklib_exit.Po +0 -1
- package/deps/xz/src/xzdec/.deps/xzdec-tuklib_progname.Po +0 -1
- package/deps/xz/src/xzdec/.deps/xzdec-xzdec.Po +0 -1
- package/deps/xz/src/xzdec/Makefile +0 -901
- package/deps/xz/src/xzdec/Makefile.am +0 -82
- package/deps/xz/src/xzdec/Makefile.in +0 -901
- package/deps/xz/src/xzdec/lzmadec_w32res.rc +0 -12
- package/deps/xz/src/xzdec/xzdec.1 +0 -146
- package/deps/xz/src/xzdec/xzdec.c +0 -323
- package/deps/xz/src/xzdec/xzdec_w32res.rc +0 -12
- package/deps/xz/stamp-h1 +0 -1
- package/deps/xz/tests/.deps/create_compress_files.Po +0 -1
- package/deps/xz/tests/.deps/test_bcj_exact_size.Po +0 -1
- package/deps/xz/tests/.deps/test_block_header.Po +0 -1
- package/deps/xz/tests/.deps/test_check.Po +0 -1
- package/deps/xz/tests/.deps/test_filter_flags.Po +0 -1
- package/deps/xz/tests/.deps/test_index.Po +0 -1
- package/deps/xz/tests/.deps/test_stream_flags.Po +0 -1
- package/deps/xz/tests/Makefile +0 -832
- package/deps/xz/tests/Makefile.am +0 -57
- package/deps/xz/tests/Makefile.in +0 -832
- package/deps/xz/tests/bcj_test.c +0 -65
- package/deps/xz/tests/compress_prepared_bcj_sparc +0 -0
- package/deps/xz/tests/compress_prepared_bcj_x86 +0 -0
- package/deps/xz/tests/create_compress_files.c +0 -158
- package/deps/xz/tests/files/README +0 -240
- package/deps/xz/tests/files/bad-0-backward_size.xz +0 -0
- package/deps/xz/tests/files/bad-0-empty-truncated.xz +0 -0
- package/deps/xz/tests/files/bad-0-footer_magic.xz +0 -0
- package/deps/xz/tests/files/bad-0-header_magic.xz +0 -0
- package/deps/xz/tests/files/bad-0-nonempty_index.xz +0 -0
- package/deps/xz/tests/files/bad-0cat-alone.xz +0 -0
- package/deps/xz/tests/files/bad-0cat-header_magic.xz +0 -0
- package/deps/xz/tests/files/bad-0catpad-empty.xz +0 -0
- package/deps/xz/tests/files/bad-0pad-empty.xz +0 -0
- package/deps/xz/tests/files/bad-1-block_header-1.xz +0 -0
- package/deps/xz/tests/files/bad-1-block_header-2.xz +0 -0
- package/deps/xz/tests/files/bad-1-block_header-3.xz +0 -0
- package/deps/xz/tests/files/bad-1-block_header-4.xz +0 -0
- package/deps/xz/tests/files/bad-1-block_header-5.xz +0 -0
- package/deps/xz/tests/files/bad-1-block_header-6.xz +0 -0
- package/deps/xz/tests/files/bad-1-check-crc32.xz +0 -0
- package/deps/xz/tests/files/bad-1-check-crc64.xz +0 -0
- package/deps/xz/tests/files/bad-1-check-sha256.xz +0 -0
- package/deps/xz/tests/files/bad-1-lzma2-1.xz +0 -0
- package/deps/xz/tests/files/bad-1-lzma2-2.xz +0 -0
- package/deps/xz/tests/files/bad-1-lzma2-3.xz +0 -0
- package/deps/xz/tests/files/bad-1-lzma2-4.xz +0 -0
- package/deps/xz/tests/files/bad-1-lzma2-5.xz +0 -0
- package/deps/xz/tests/files/bad-1-lzma2-6.xz +0 -0
- package/deps/xz/tests/files/bad-1-lzma2-7.xz +0 -0
- package/deps/xz/tests/files/bad-1-lzma2-8.xz +0 -0
- package/deps/xz/tests/files/bad-1-stream_flags-1.xz +0 -0
- package/deps/xz/tests/files/bad-1-stream_flags-2.xz +0 -0
- package/deps/xz/tests/files/bad-1-stream_flags-3.xz +0 -0
- package/deps/xz/tests/files/bad-1-vli-1.xz +0 -0
- package/deps/xz/tests/files/bad-1-vli-2.xz +0 -0
- package/deps/xz/tests/files/bad-2-compressed_data_padding.xz +0 -0
- package/deps/xz/tests/files/bad-2-index-1.xz +0 -0
- package/deps/xz/tests/files/bad-2-index-2.xz +0 -0
- package/deps/xz/tests/files/bad-2-index-3.xz +0 -0
- package/deps/xz/tests/files/bad-2-index-4.xz +0 -0
- package/deps/xz/tests/files/bad-2-index-5.xz +0 -0
- package/deps/xz/tests/files/good-0-empty.xz +0 -0
- package/deps/xz/tests/files/good-0cat-empty.xz +0 -0
- package/deps/xz/tests/files/good-0catpad-empty.xz +0 -0
- package/deps/xz/tests/files/good-0pad-empty.xz +0 -0
- package/deps/xz/tests/files/good-1-3delta-lzma2.xz +0 -0
- package/deps/xz/tests/files/good-1-block_header-1.xz +0 -0
- package/deps/xz/tests/files/good-1-block_header-2.xz +0 -0
- package/deps/xz/tests/files/good-1-block_header-3.xz +0 -0
- package/deps/xz/tests/files/good-1-check-crc32.xz +0 -0
- package/deps/xz/tests/files/good-1-check-crc64.xz +0 -0
- package/deps/xz/tests/files/good-1-check-none.xz +0 -0
- package/deps/xz/tests/files/good-1-check-sha256.xz +0 -0
- package/deps/xz/tests/files/good-1-delta-lzma2.tiff.xz +0 -0
- package/deps/xz/tests/files/good-1-lzma2-1.xz +0 -0
- package/deps/xz/tests/files/good-1-lzma2-2.xz +0 -0
- package/deps/xz/tests/files/good-1-lzma2-3.xz +0 -0
- package/deps/xz/tests/files/good-1-lzma2-4.xz +0 -0
- package/deps/xz/tests/files/good-1-lzma2-5.xz +0 -0
- package/deps/xz/tests/files/good-1-sparc-lzma2.xz +0 -0
- package/deps/xz/tests/files/good-1-x86-lzma2.xz +0 -0
- package/deps/xz/tests/files/good-2-lzma2.xz +0 -0
- package/deps/xz/tests/files/unsupported-block_header.xz +0 -0
- package/deps/xz/tests/files/unsupported-check.xz +0 -0
- package/deps/xz/tests/files/unsupported-filter_flags-1.xz +0 -0
- package/deps/xz/tests/files/unsupported-filter_flags-2.xz +0 -0
- package/deps/xz/tests/files/unsupported-filter_flags-3.xz +0 -0
- package/deps/xz/tests/test_bcj_exact_size.c +0 -113
- package/deps/xz/tests/test_block_header.c +0 -240
- package/deps/xz/tests/test_check.c +0 -83
- package/deps/xz/tests/test_compress.sh +0 -142
- package/deps/xz/tests/test_files.sh +0 -57
- package/deps/xz/tests/test_filter_flags.c +0 -258
- package/deps/xz/tests/test_index.c +0 -659
- package/deps/xz/tests/test_scripts.sh +0 -76
- package/deps/xz/tests/test_stream_flags.c +0 -180
- package/deps/xz/tests/tests.h +0 -124
- package/deps/xz/tests/xzgrep_expected_output +0 -39
- package/deps/xz/windows/INSTALL-MSVC.txt +0 -47
- package/deps/xz/windows/INSTALL-MinGW.txt +0 -138
- package/deps/xz/windows/README-Windows.txt +0 -122
- package/deps/xz/windows/build.bash +0 -203
- package/deps/xz/windows/config.h +0 -142
- package/deps/xz/windows/liblzma.vcxproj +0 -354
- package/deps/xz/windows/liblzma_dll.vcxproj +0 -383
- package/deps/xz/windows/xz_win.sln +0 -48
- package/lib/lzma.js +0 -377
- package/node_modules/node-pre-gyp/CHANGELOG.md +0 -319
- package/node_modules/node-pre-gyp/LICENSE +0 -27
- package/node_modules/node-pre-gyp/README.md +0 -570
- package/node_modules/node-pre-gyp/appveyor.yml +0 -30
- package/node_modules/node-pre-gyp/bin/node-pre-gyp +0 -131
- package/node_modules/node-pre-gyp/bin/node-pre-gyp.cmd +0 -2
- package/node_modules/node-pre-gyp/lib/build.js +0 -43
- package/node_modules/node-pre-gyp/lib/clean.js +0 -23
- package/node_modules/node-pre-gyp/lib/configure.js +0 -48
- package/node_modules/node-pre-gyp/lib/info.js +0 -40
- package/node_modules/node-pre-gyp/lib/install.js +0 -215
- package/node_modules/node-pre-gyp/lib/node-pre-gyp.js +0 -192
- package/node_modules/node-pre-gyp/lib/package.js +0 -46
- package/node_modules/node-pre-gyp/lib/pre-binding.js +0 -25
- package/node_modules/node-pre-gyp/lib/publish.js +0 -77
- package/node_modules/node-pre-gyp/lib/rebuild.js +0 -13
- package/node_modules/node-pre-gyp/lib/reinstall.js +0 -13
- package/node_modules/node-pre-gyp/lib/reveal.js +0 -31
- package/node_modules/node-pre-gyp/lib/testbinary.js +0 -73
- package/node_modules/node-pre-gyp/lib/testpackage.js +0 -49
- package/node_modules/node-pre-gyp/lib/unpublish.js +0 -41
- package/node_modules/node-pre-gyp/lib/util/abi_crosswalk.json +0 -1222
- package/node_modules/node-pre-gyp/lib/util/compile.js +0 -87
- package/node_modules/node-pre-gyp/lib/util/handle_gyp_opts.js +0 -94
- package/node_modules/node-pre-gyp/lib/util/nw-pre-gyp/index.html +0 -26
- package/node_modules/node-pre-gyp/lib/util/nw-pre-gyp/package.json +0 -9
- package/node_modules/node-pre-gyp/lib/util/s3_setup.js +0 -27
- package/node_modules/node-pre-gyp/lib/util/versioning.js +0 -308
- package/node_modules/node-pre-gyp/package.json +0 -136
package/deps/xz/src/xz/list.c
DELETED
|
@@ -1,1186 +0,0 @@
|
|
|
1
|
-
///////////////////////////////////////////////////////////////////////////////
|
|
2
|
-
//
|
|
3
|
-
/// \file list.c
|
|
4
|
-
/// \brief Listing information about .xz files
|
|
5
|
-
//
|
|
6
|
-
// Author: Lasse Collin
|
|
7
|
-
//
|
|
8
|
-
// This file has been put into the public domain.
|
|
9
|
-
// You can do whatever you want with this file.
|
|
10
|
-
//
|
|
11
|
-
///////////////////////////////////////////////////////////////////////////////
|
|
12
|
-
|
|
13
|
-
#include "private.h"
|
|
14
|
-
#include "tuklib_integer.h"
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
/// Information about a .xz file
|
|
18
|
-
typedef struct {
|
|
19
|
-
/// Combined Index of all Streams in the file
|
|
20
|
-
lzma_index *idx;
|
|
21
|
-
|
|
22
|
-
/// Total amount of Stream Padding
|
|
23
|
-
uint64_t stream_padding;
|
|
24
|
-
|
|
25
|
-
/// Highest memory usage so far
|
|
26
|
-
uint64_t memusage_max;
|
|
27
|
-
|
|
28
|
-
/// True if all Blocks so far have Compressed Size and
|
|
29
|
-
/// Uncompressed Size fields
|
|
30
|
-
bool all_have_sizes;
|
|
31
|
-
|
|
32
|
-
/// Oldest XZ Utils version that will decompress the file
|
|
33
|
-
uint32_t min_version;
|
|
34
|
-
|
|
35
|
-
} xz_file_info;
|
|
36
|
-
|
|
37
|
-
#define XZ_FILE_INFO_INIT { NULL, 0, 0, true, 50000002 }
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
/// Information about a .xz Block
|
|
41
|
-
typedef struct {
|
|
42
|
-
/// Size of the Block Header
|
|
43
|
-
uint32_t header_size;
|
|
44
|
-
|
|
45
|
-
/// A few of the Block Flags as a string
|
|
46
|
-
char flags[3];
|
|
47
|
-
|
|
48
|
-
/// Size of the Compressed Data field in the Block
|
|
49
|
-
lzma_vli compressed_size;
|
|
50
|
-
|
|
51
|
-
/// Decoder memory usage for this Block
|
|
52
|
-
uint64_t memusage;
|
|
53
|
-
|
|
54
|
-
/// The filter chain of this Block in human-readable form
|
|
55
|
-
char filter_chain[FILTERS_STR_SIZE];
|
|
56
|
-
|
|
57
|
-
} block_header_info;
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
/// Check ID to string mapping
|
|
61
|
-
static const char check_names[LZMA_CHECK_ID_MAX + 1][12] = {
|
|
62
|
-
// TRANSLATORS: Indicates that there is no integrity check.
|
|
63
|
-
// This string is used in tables, so the width must not
|
|
64
|
-
// exceed ten columns with a fixed-width font.
|
|
65
|
-
N_("None"),
|
|
66
|
-
"CRC32",
|
|
67
|
-
// TRANSLATORS: Indicates that integrity check name is not known,
|
|
68
|
-
// but the Check ID is known (here 2). This and other "Unknown-N"
|
|
69
|
-
// strings are used in tables, so the width must not exceed ten
|
|
70
|
-
// columns with a fixed-width font. It's OK to omit the dash if
|
|
71
|
-
// you need space for one extra letter, but don't use spaces.
|
|
72
|
-
N_("Unknown-2"),
|
|
73
|
-
N_("Unknown-3"),
|
|
74
|
-
"CRC64",
|
|
75
|
-
N_("Unknown-5"),
|
|
76
|
-
N_("Unknown-6"),
|
|
77
|
-
N_("Unknown-7"),
|
|
78
|
-
N_("Unknown-8"),
|
|
79
|
-
N_("Unknown-9"),
|
|
80
|
-
"SHA-256",
|
|
81
|
-
N_("Unknown-11"),
|
|
82
|
-
N_("Unknown-12"),
|
|
83
|
-
N_("Unknown-13"),
|
|
84
|
-
N_("Unknown-14"),
|
|
85
|
-
N_("Unknown-15"),
|
|
86
|
-
};
|
|
87
|
-
|
|
88
|
-
/// Buffer size for get_check_names(). This may be a bit ridiculous,
|
|
89
|
-
/// but at least it's enough if some language needs many multibyte chars.
|
|
90
|
-
#define CHECKS_STR_SIZE 1024
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
/// Value of the Check field as hexadecimal string.
|
|
94
|
-
/// This is set by parse_check_value().
|
|
95
|
-
static char check_value[2 * LZMA_CHECK_SIZE_MAX + 1];
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
/// Totals that are displayed if there was more than one file.
|
|
99
|
-
/// The "files" counter is also used in print_info_adv() to show
|
|
100
|
-
/// the file number.
|
|
101
|
-
static struct {
|
|
102
|
-
uint64_t files;
|
|
103
|
-
uint64_t streams;
|
|
104
|
-
uint64_t blocks;
|
|
105
|
-
uint64_t compressed_size;
|
|
106
|
-
uint64_t uncompressed_size;
|
|
107
|
-
uint64_t stream_padding;
|
|
108
|
-
uint64_t memusage_max;
|
|
109
|
-
uint32_t checks;
|
|
110
|
-
uint32_t min_version;
|
|
111
|
-
bool all_have_sizes;
|
|
112
|
-
} totals = { 0, 0, 0, 0, 0, 0, 0, 0, 0, true };
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
/// Convert XZ Utils version number to a string.
|
|
116
|
-
static const char *
|
|
117
|
-
xz_ver_to_str(uint32_t ver)
|
|
118
|
-
{
|
|
119
|
-
static char buf[32];
|
|
120
|
-
|
|
121
|
-
unsigned int major = ver / 10000000U;
|
|
122
|
-
ver -= major * 10000000U;
|
|
123
|
-
|
|
124
|
-
unsigned int minor = ver / 10000U;
|
|
125
|
-
ver -= minor * 10000U;
|
|
126
|
-
|
|
127
|
-
unsigned int patch = ver / 10U;
|
|
128
|
-
ver -= patch * 10U;
|
|
129
|
-
|
|
130
|
-
const char *stability = ver == 0 ? "alpha" : ver == 1 ? "beta" : "";
|
|
131
|
-
|
|
132
|
-
snprintf(buf, sizeof(buf), "%u.%u.%u%s",
|
|
133
|
-
major, minor, patch, stability);
|
|
134
|
-
return buf;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
/// \brief Parse the Index(es) from the given .xz file
|
|
139
|
-
///
|
|
140
|
-
/// \param xfi Pointer to structure where the decoded information
|
|
141
|
-
/// is stored.
|
|
142
|
-
/// \param pair Input file
|
|
143
|
-
///
|
|
144
|
-
/// \return On success, false is returned. On error, true is returned.
|
|
145
|
-
///
|
|
146
|
-
// TODO: This function is pretty big. liblzma should have a function that
|
|
147
|
-
// takes a callback function to parse the Index(es) from a .xz file to make
|
|
148
|
-
// it easy for applications.
|
|
149
|
-
static bool
|
|
150
|
-
parse_indexes(xz_file_info *xfi, file_pair *pair)
|
|
151
|
-
{
|
|
152
|
-
if (pair->src_st.st_size <= 0) {
|
|
153
|
-
message_error(_("%s: File is empty"), pair->src_name);
|
|
154
|
-
return true;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
if (pair->src_st.st_size < 2 * LZMA_STREAM_HEADER_SIZE) {
|
|
158
|
-
message_error(_("%s: Too small to be a valid .xz file"),
|
|
159
|
-
pair->src_name);
|
|
160
|
-
return true;
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
io_buf buf;
|
|
164
|
-
lzma_stream_flags header_flags;
|
|
165
|
-
lzma_stream_flags footer_flags;
|
|
166
|
-
lzma_ret ret;
|
|
167
|
-
|
|
168
|
-
// lzma_stream for the Index decoder
|
|
169
|
-
lzma_stream strm = LZMA_STREAM_INIT;
|
|
170
|
-
|
|
171
|
-
// All Indexes decoded so far
|
|
172
|
-
lzma_index *combined_index = NULL;
|
|
173
|
-
|
|
174
|
-
// The Index currently being decoded
|
|
175
|
-
lzma_index *this_index = NULL;
|
|
176
|
-
|
|
177
|
-
// Current position in the file. We parse the file backwards so
|
|
178
|
-
// initialize it to point to the end of the file.
|
|
179
|
-
off_t pos = pair->src_st.st_size;
|
|
180
|
-
|
|
181
|
-
// Each loop iteration decodes one Index.
|
|
182
|
-
do {
|
|
183
|
-
// Check that there is enough data left to contain at least
|
|
184
|
-
// the Stream Header and Stream Footer. This check cannot
|
|
185
|
-
// fail in the first pass of this loop.
|
|
186
|
-
if (pos < 2 * LZMA_STREAM_HEADER_SIZE) {
|
|
187
|
-
message_error("%s: %s", pair->src_name,
|
|
188
|
-
message_strm(LZMA_DATA_ERROR));
|
|
189
|
-
goto error;
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
pos -= LZMA_STREAM_HEADER_SIZE;
|
|
193
|
-
lzma_vli stream_padding = 0;
|
|
194
|
-
|
|
195
|
-
// Locate the Stream Footer. There may be Stream Padding which
|
|
196
|
-
// we must skip when reading backwards.
|
|
197
|
-
while (true) {
|
|
198
|
-
if (pos < LZMA_STREAM_HEADER_SIZE) {
|
|
199
|
-
message_error("%s: %s", pair->src_name,
|
|
200
|
-
message_strm(
|
|
201
|
-
LZMA_DATA_ERROR));
|
|
202
|
-
goto error;
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
if (io_pread(pair, &buf,
|
|
206
|
-
LZMA_STREAM_HEADER_SIZE, pos))
|
|
207
|
-
goto error;
|
|
208
|
-
|
|
209
|
-
// Stream Padding is always a multiple of four bytes.
|
|
210
|
-
int i = 2;
|
|
211
|
-
if (buf.u32[i] != 0)
|
|
212
|
-
break;
|
|
213
|
-
|
|
214
|
-
// To avoid calling io_pread() for every four bytes
|
|
215
|
-
// of Stream Padding, take advantage that we read
|
|
216
|
-
// 12 bytes (LZMA_STREAM_HEADER_SIZE) already and
|
|
217
|
-
// check them too before calling io_pread() again.
|
|
218
|
-
do {
|
|
219
|
-
stream_padding += 4;
|
|
220
|
-
pos -= 4;
|
|
221
|
-
--i;
|
|
222
|
-
} while (i >= 0 && buf.u32[i] == 0);
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
// Decode the Stream Footer.
|
|
226
|
-
ret = lzma_stream_footer_decode(&footer_flags, buf.u8);
|
|
227
|
-
if (ret != LZMA_OK) {
|
|
228
|
-
message_error("%s: %s", pair->src_name,
|
|
229
|
-
message_strm(ret));
|
|
230
|
-
goto error;
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
// Check that the Stream Footer doesn't specify something
|
|
234
|
-
// that we don't support. This can only happen if the xz
|
|
235
|
-
// version is older than liblzma and liblzma supports
|
|
236
|
-
// something new.
|
|
237
|
-
//
|
|
238
|
-
// It is enough to check Stream Footer. Stream Header must
|
|
239
|
-
// match when it is compared against Stream Footer with
|
|
240
|
-
// lzma_stream_flags_compare().
|
|
241
|
-
if (footer_flags.version != 0) {
|
|
242
|
-
message_error("%s: %s", pair->src_name,
|
|
243
|
-
message_strm(LZMA_OPTIONS_ERROR));
|
|
244
|
-
goto error;
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
// Check that the size of the Index field looks sane.
|
|
248
|
-
lzma_vli index_size = footer_flags.backward_size;
|
|
249
|
-
if ((lzma_vli)(pos) < index_size + LZMA_STREAM_HEADER_SIZE) {
|
|
250
|
-
message_error("%s: %s", pair->src_name,
|
|
251
|
-
message_strm(LZMA_DATA_ERROR));
|
|
252
|
-
goto error;
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
// Set pos to the beginning of the Index.
|
|
256
|
-
pos -= index_size;
|
|
257
|
-
|
|
258
|
-
// See how much memory we can use for decoding this Index.
|
|
259
|
-
uint64_t memlimit = hardware_memlimit_get(MODE_LIST);
|
|
260
|
-
uint64_t memused = 0;
|
|
261
|
-
if (combined_index != NULL) {
|
|
262
|
-
memused = lzma_index_memused(combined_index);
|
|
263
|
-
if (memused > memlimit)
|
|
264
|
-
message_bug();
|
|
265
|
-
|
|
266
|
-
memlimit -= memused;
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
// Decode the Index.
|
|
270
|
-
ret = lzma_index_decoder(&strm, &this_index, memlimit);
|
|
271
|
-
if (ret != LZMA_OK) {
|
|
272
|
-
message_error("%s: %s", pair->src_name,
|
|
273
|
-
message_strm(ret));
|
|
274
|
-
goto error;
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
do {
|
|
278
|
-
// Don't give the decoder more input than the
|
|
279
|
-
// Index size.
|
|
280
|
-
strm.avail_in = my_min(IO_BUFFER_SIZE, index_size);
|
|
281
|
-
if (io_pread(pair, &buf, strm.avail_in, pos))
|
|
282
|
-
goto error;
|
|
283
|
-
|
|
284
|
-
pos += strm.avail_in;
|
|
285
|
-
index_size -= strm.avail_in;
|
|
286
|
-
|
|
287
|
-
strm.next_in = buf.u8;
|
|
288
|
-
ret = lzma_code(&strm, LZMA_RUN);
|
|
289
|
-
|
|
290
|
-
} while (ret == LZMA_OK);
|
|
291
|
-
|
|
292
|
-
// If the decoding seems to be successful, check also that
|
|
293
|
-
// the Index decoder consumed as much input as indicated
|
|
294
|
-
// by the Backward Size field.
|
|
295
|
-
if (ret == LZMA_STREAM_END)
|
|
296
|
-
if (index_size != 0 || strm.avail_in != 0)
|
|
297
|
-
ret = LZMA_DATA_ERROR;
|
|
298
|
-
|
|
299
|
-
if (ret != LZMA_STREAM_END) {
|
|
300
|
-
// LZMA_BUFFER_ERROR means that the Index decoder
|
|
301
|
-
// would have liked more input than what the Index
|
|
302
|
-
// size should be according to Stream Footer.
|
|
303
|
-
// The message for LZMA_DATA_ERROR makes more
|
|
304
|
-
// sense in that case.
|
|
305
|
-
if (ret == LZMA_BUF_ERROR)
|
|
306
|
-
ret = LZMA_DATA_ERROR;
|
|
307
|
-
|
|
308
|
-
message_error("%s: %s", pair->src_name,
|
|
309
|
-
message_strm(ret));
|
|
310
|
-
|
|
311
|
-
// If the error was too low memory usage limit,
|
|
312
|
-
// show also how much memory would have been needed.
|
|
313
|
-
if (ret == LZMA_MEMLIMIT_ERROR) {
|
|
314
|
-
uint64_t needed = lzma_memusage(&strm);
|
|
315
|
-
if (UINT64_MAX - needed < memused)
|
|
316
|
-
needed = UINT64_MAX;
|
|
317
|
-
else
|
|
318
|
-
needed += memused;
|
|
319
|
-
|
|
320
|
-
message_mem_needed(V_ERROR, needed);
|
|
321
|
-
}
|
|
322
|
-
|
|
323
|
-
goto error;
|
|
324
|
-
}
|
|
325
|
-
|
|
326
|
-
// Decode the Stream Header and check that its Stream Flags
|
|
327
|
-
// match the Stream Footer.
|
|
328
|
-
pos -= footer_flags.backward_size + LZMA_STREAM_HEADER_SIZE;
|
|
329
|
-
if ((lzma_vli)(pos) < lzma_index_total_size(this_index)) {
|
|
330
|
-
message_error("%s: %s", pair->src_name,
|
|
331
|
-
message_strm(LZMA_DATA_ERROR));
|
|
332
|
-
goto error;
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
pos -= lzma_index_total_size(this_index);
|
|
336
|
-
if (io_pread(pair, &buf, LZMA_STREAM_HEADER_SIZE, pos))
|
|
337
|
-
goto error;
|
|
338
|
-
|
|
339
|
-
ret = lzma_stream_header_decode(&header_flags, buf.u8);
|
|
340
|
-
if (ret != LZMA_OK) {
|
|
341
|
-
message_error("%s: %s", pair->src_name,
|
|
342
|
-
message_strm(ret));
|
|
343
|
-
goto error;
|
|
344
|
-
}
|
|
345
|
-
|
|
346
|
-
ret = lzma_stream_flags_compare(&header_flags, &footer_flags);
|
|
347
|
-
if (ret != LZMA_OK) {
|
|
348
|
-
message_error("%s: %s", pair->src_name,
|
|
349
|
-
message_strm(ret));
|
|
350
|
-
goto error;
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
// Store the decoded Stream Flags into this_index. This is
|
|
354
|
-
// needed so that we can print which Check is used in each
|
|
355
|
-
// Stream.
|
|
356
|
-
ret = lzma_index_stream_flags(this_index, &footer_flags);
|
|
357
|
-
if (ret != LZMA_OK)
|
|
358
|
-
message_bug();
|
|
359
|
-
|
|
360
|
-
// Store also the size of the Stream Padding field. It is
|
|
361
|
-
// needed to show the offsets of the Streams correctly.
|
|
362
|
-
ret = lzma_index_stream_padding(this_index, stream_padding);
|
|
363
|
-
if (ret != LZMA_OK)
|
|
364
|
-
message_bug();
|
|
365
|
-
|
|
366
|
-
if (combined_index != NULL) {
|
|
367
|
-
// Append the earlier decoded Indexes
|
|
368
|
-
// after this_index.
|
|
369
|
-
ret = lzma_index_cat(
|
|
370
|
-
this_index, combined_index, NULL);
|
|
371
|
-
if (ret != LZMA_OK) {
|
|
372
|
-
message_error("%s: %s", pair->src_name,
|
|
373
|
-
message_strm(ret));
|
|
374
|
-
goto error;
|
|
375
|
-
}
|
|
376
|
-
}
|
|
377
|
-
|
|
378
|
-
combined_index = this_index;
|
|
379
|
-
this_index = NULL;
|
|
380
|
-
|
|
381
|
-
xfi->stream_padding += stream_padding;
|
|
382
|
-
|
|
383
|
-
} while (pos > 0);
|
|
384
|
-
|
|
385
|
-
lzma_end(&strm);
|
|
386
|
-
|
|
387
|
-
// All OK. Make combined_index available to the caller.
|
|
388
|
-
xfi->idx = combined_index;
|
|
389
|
-
return false;
|
|
390
|
-
|
|
391
|
-
error:
|
|
392
|
-
// Something went wrong, free the allocated memory.
|
|
393
|
-
lzma_end(&strm);
|
|
394
|
-
lzma_index_end(combined_index, NULL);
|
|
395
|
-
lzma_index_end(this_index, NULL);
|
|
396
|
-
return true;
|
|
397
|
-
}
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
/// \brief Parse the Block Header
|
|
401
|
-
///
|
|
402
|
-
/// The result is stored into *bhi. The caller takes care of initializing it.
|
|
403
|
-
///
|
|
404
|
-
/// \return False on success, true on error.
|
|
405
|
-
static bool
|
|
406
|
-
parse_block_header(file_pair *pair, const lzma_index_iter *iter,
|
|
407
|
-
block_header_info *bhi, xz_file_info *xfi)
|
|
408
|
-
{
|
|
409
|
-
#if IO_BUFFER_SIZE < LZMA_BLOCK_HEADER_SIZE_MAX
|
|
410
|
-
# error IO_BUFFER_SIZE < LZMA_BLOCK_HEADER_SIZE_MAX
|
|
411
|
-
#endif
|
|
412
|
-
|
|
413
|
-
// Get the whole Block Header with one read, but don't read past
|
|
414
|
-
// the end of the Block (or even its Check field).
|
|
415
|
-
const uint32_t size = my_min(iter->block.total_size
|
|
416
|
-
- lzma_check_size(iter->stream.flags->check),
|
|
417
|
-
LZMA_BLOCK_HEADER_SIZE_MAX);
|
|
418
|
-
io_buf buf;
|
|
419
|
-
if (io_pread(pair, &buf, size, iter->block.compressed_file_offset))
|
|
420
|
-
return true;
|
|
421
|
-
|
|
422
|
-
// Zero would mean Index Indicator and thus not a valid Block.
|
|
423
|
-
if (buf.u8[0] == 0)
|
|
424
|
-
goto data_error;
|
|
425
|
-
|
|
426
|
-
// Initialize the block structure and decode Block Header Size.
|
|
427
|
-
lzma_filter filters[LZMA_FILTERS_MAX + 1];
|
|
428
|
-
lzma_block block;
|
|
429
|
-
block.version = 0;
|
|
430
|
-
block.check = iter->stream.flags->check;
|
|
431
|
-
block.filters = filters;
|
|
432
|
-
|
|
433
|
-
block.header_size = lzma_block_header_size_decode(buf.u8[0]);
|
|
434
|
-
if (block.header_size > size)
|
|
435
|
-
goto data_error;
|
|
436
|
-
|
|
437
|
-
// Decode the Block Header.
|
|
438
|
-
switch (lzma_block_header_decode(&block, NULL, buf.u8)) {
|
|
439
|
-
case LZMA_OK:
|
|
440
|
-
break;
|
|
441
|
-
|
|
442
|
-
case LZMA_OPTIONS_ERROR:
|
|
443
|
-
message_error("%s: %s", pair->src_name,
|
|
444
|
-
message_strm(LZMA_OPTIONS_ERROR));
|
|
445
|
-
return true;
|
|
446
|
-
|
|
447
|
-
case LZMA_DATA_ERROR:
|
|
448
|
-
goto data_error;
|
|
449
|
-
|
|
450
|
-
default:
|
|
451
|
-
message_bug();
|
|
452
|
-
}
|
|
453
|
-
|
|
454
|
-
// Check the Block Flags. These must be done before calling
|
|
455
|
-
// lzma_block_compressed_size(), because it overwrites
|
|
456
|
-
// block.compressed_size.
|
|
457
|
-
bhi->flags[0] = block.compressed_size != LZMA_VLI_UNKNOWN
|
|
458
|
-
? 'c' : '-';
|
|
459
|
-
bhi->flags[1] = block.uncompressed_size != LZMA_VLI_UNKNOWN
|
|
460
|
-
? 'u' : '-';
|
|
461
|
-
bhi->flags[2] = '\0';
|
|
462
|
-
|
|
463
|
-
// Collect information if all Blocks have both Compressed Size
|
|
464
|
-
// and Uncompressed Size fields. They can be useful e.g. for
|
|
465
|
-
// multi-threaded decompression so it can be useful to know it.
|
|
466
|
-
xfi->all_have_sizes &= block.compressed_size != LZMA_VLI_UNKNOWN
|
|
467
|
-
&& block.uncompressed_size != LZMA_VLI_UNKNOWN;
|
|
468
|
-
|
|
469
|
-
// Validate or set block.compressed_size.
|
|
470
|
-
switch (lzma_block_compressed_size(&block,
|
|
471
|
-
iter->block.unpadded_size)) {
|
|
472
|
-
case LZMA_OK:
|
|
473
|
-
// Validate also block.uncompressed_size if it is present.
|
|
474
|
-
// If it isn't present, there's no need to set it since
|
|
475
|
-
// we aren't going to actually decompress the Block; if
|
|
476
|
-
// we were decompressing, then we should set it so that
|
|
477
|
-
// the Block decoder could validate the Uncompressed Size
|
|
478
|
-
// that was stored in the Index.
|
|
479
|
-
if (block.uncompressed_size == LZMA_VLI_UNKNOWN
|
|
480
|
-
|| block.uncompressed_size
|
|
481
|
-
== iter->block.uncompressed_size)
|
|
482
|
-
break;
|
|
483
|
-
|
|
484
|
-
// If the above fails, the file is corrupt so
|
|
485
|
-
// LZMA_DATA_ERROR is a good error code.
|
|
486
|
-
|
|
487
|
-
case LZMA_DATA_ERROR:
|
|
488
|
-
// Free the memory allocated by lzma_block_header_decode().
|
|
489
|
-
for (size_t i = 0; filters[i].id != LZMA_VLI_UNKNOWN; ++i)
|
|
490
|
-
free(filters[i].options);
|
|
491
|
-
|
|
492
|
-
goto data_error;
|
|
493
|
-
|
|
494
|
-
default:
|
|
495
|
-
message_bug();
|
|
496
|
-
}
|
|
497
|
-
|
|
498
|
-
// Copy the known sizes.
|
|
499
|
-
bhi->header_size = block.header_size;
|
|
500
|
-
bhi->compressed_size = block.compressed_size;
|
|
501
|
-
|
|
502
|
-
// Calculate the decoder memory usage and update the maximum
|
|
503
|
-
// memory usage of this Block.
|
|
504
|
-
bhi->memusage = lzma_raw_decoder_memusage(filters);
|
|
505
|
-
if (xfi->memusage_max < bhi->memusage)
|
|
506
|
-
xfi->memusage_max = bhi->memusage;
|
|
507
|
-
|
|
508
|
-
// Determine the minimum XZ Utils version that supports this Block.
|
|
509
|
-
//
|
|
510
|
-
// Currently the only thing that 5.0.0 doesn't support is empty
|
|
511
|
-
// LZMA2 Block. This decoder bug was fixed in 5.0.2.
|
|
512
|
-
{
|
|
513
|
-
size_t i = 0;
|
|
514
|
-
while (filters[i + 1].id != LZMA_VLI_UNKNOWN)
|
|
515
|
-
++i;
|
|
516
|
-
|
|
517
|
-
if (filters[i].id == LZMA_FILTER_LZMA2
|
|
518
|
-
&& iter->block.uncompressed_size == 0
|
|
519
|
-
&& xfi->min_version < 50000022U)
|
|
520
|
-
xfi->min_version = 50000022U;
|
|
521
|
-
}
|
|
522
|
-
|
|
523
|
-
// Convert the filter chain to human readable form.
|
|
524
|
-
message_filters_to_str(bhi->filter_chain, filters, false);
|
|
525
|
-
|
|
526
|
-
// Free the memory allocated by lzma_block_header_decode().
|
|
527
|
-
for (size_t i = 0; filters[i].id != LZMA_VLI_UNKNOWN; ++i)
|
|
528
|
-
free(filters[i].options);
|
|
529
|
-
|
|
530
|
-
return false;
|
|
531
|
-
|
|
532
|
-
data_error:
|
|
533
|
-
// Show the error message.
|
|
534
|
-
message_error("%s: %s", pair->src_name,
|
|
535
|
-
message_strm(LZMA_DATA_ERROR));
|
|
536
|
-
return true;
|
|
537
|
-
}
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
/// \brief Parse the Check field and put it into check_value[]
|
|
541
|
-
///
|
|
542
|
-
/// \return False on success, true on error.
|
|
543
|
-
static bool
|
|
544
|
-
parse_check_value(file_pair *pair, const lzma_index_iter *iter)
|
|
545
|
-
{
|
|
546
|
-
// Don't read anything from the file if there is no integrity Check.
|
|
547
|
-
if (iter->stream.flags->check == LZMA_CHECK_NONE) {
|
|
548
|
-
snprintf(check_value, sizeof(check_value), "---");
|
|
549
|
-
return false;
|
|
550
|
-
}
|
|
551
|
-
|
|
552
|
-
// Locate and read the Check field.
|
|
553
|
-
const uint32_t size = lzma_check_size(iter->stream.flags->check);
|
|
554
|
-
const off_t offset = iter->block.compressed_file_offset
|
|
555
|
-
+ iter->block.total_size - size;
|
|
556
|
-
io_buf buf;
|
|
557
|
-
if (io_pread(pair, &buf, size, offset))
|
|
558
|
-
return true;
|
|
559
|
-
|
|
560
|
-
// CRC32 and CRC64 are in little endian. Guess that all the future
|
|
561
|
-
// 32-bit and 64-bit Check values are little endian too. It shouldn't
|
|
562
|
-
// be a too big problem if this guess is wrong.
|
|
563
|
-
if (size == 4)
|
|
564
|
-
snprintf(check_value, sizeof(check_value),
|
|
565
|
-
"%08" PRIx32, conv32le(buf.u32[0]));
|
|
566
|
-
else if (size == 8)
|
|
567
|
-
snprintf(check_value, sizeof(check_value),
|
|
568
|
-
"%016" PRIx64, conv64le(buf.u64[0]));
|
|
569
|
-
else
|
|
570
|
-
for (size_t i = 0; i < size; ++i)
|
|
571
|
-
snprintf(check_value + i * 2, 3, "%02x", buf.u8[i]);
|
|
572
|
-
|
|
573
|
-
return false;
|
|
574
|
-
}
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
/// \brief Parse detailed information about a Block
|
|
578
|
-
///
|
|
579
|
-
/// Since this requires seek(s), listing information about all Blocks can
|
|
580
|
-
/// be slow.
|
|
581
|
-
///
|
|
582
|
-
/// \param pair Input file
|
|
583
|
-
/// \param iter Location of the Block whose Check value should
|
|
584
|
-
/// be printed.
|
|
585
|
-
/// \param bhi Pointer to structure where to store the information
|
|
586
|
-
/// about the Block Header field.
|
|
587
|
-
///
|
|
588
|
-
/// \return False on success, true on error. If an error occurs,
|
|
589
|
-
/// the error message is printed too so the caller doesn't
|
|
590
|
-
/// need to worry about that.
|
|
591
|
-
static bool
|
|
592
|
-
parse_details(file_pair *pair, const lzma_index_iter *iter,
|
|
593
|
-
block_header_info *bhi, xz_file_info *xfi)
|
|
594
|
-
{
|
|
595
|
-
if (parse_block_header(pair, iter, bhi, xfi))
|
|
596
|
-
return true;
|
|
597
|
-
|
|
598
|
-
if (parse_check_value(pair, iter))
|
|
599
|
-
return true;
|
|
600
|
-
|
|
601
|
-
return false;
|
|
602
|
-
}
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
/// \brief Get the compression ratio
|
|
606
|
-
///
|
|
607
|
-
/// This has slightly different format than that is used in message.c.
|
|
608
|
-
static const char *
|
|
609
|
-
get_ratio(uint64_t compressed_size, uint64_t uncompressed_size)
|
|
610
|
-
{
|
|
611
|
-
if (uncompressed_size == 0)
|
|
612
|
-
return "---";
|
|
613
|
-
|
|
614
|
-
const double ratio = (double)(compressed_size)
|
|
615
|
-
/ (double)(uncompressed_size);
|
|
616
|
-
if (ratio > 9.999)
|
|
617
|
-
return "---";
|
|
618
|
-
|
|
619
|
-
static char buf[16];
|
|
620
|
-
snprintf(buf, sizeof(buf), "%.3f", ratio);
|
|
621
|
-
return buf;
|
|
622
|
-
}
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
/// \brief Get a comma-separated list of Check names
|
|
626
|
-
///
|
|
627
|
-
/// The check names are translated with gettext except when in robot mode.
|
|
628
|
-
///
|
|
629
|
-
/// \param buf Buffer to hold the resulting string
|
|
630
|
-
/// \param checks Bit mask of Checks to print
|
|
631
|
-
/// \param space_after_comma
|
|
632
|
-
/// It's better to not use spaces in table-like listings,
|
|
633
|
-
/// but in more verbose formats a space after a comma
|
|
634
|
-
/// is good for readability.
|
|
635
|
-
static void
|
|
636
|
-
get_check_names(char buf[CHECKS_STR_SIZE],
|
|
637
|
-
uint32_t checks, bool space_after_comma)
|
|
638
|
-
{
|
|
639
|
-
assert(checks != 0);
|
|
640
|
-
|
|
641
|
-
char *pos = buf;
|
|
642
|
-
size_t left = CHECKS_STR_SIZE;
|
|
643
|
-
|
|
644
|
-
const char *sep = space_after_comma ? ", " : ",";
|
|
645
|
-
bool comma = false;
|
|
646
|
-
|
|
647
|
-
for (size_t i = 0; i <= LZMA_CHECK_ID_MAX; ++i) {
|
|
648
|
-
if (checks & (UINT32_C(1) << i)) {
|
|
649
|
-
my_snprintf(&pos, &left, "%s%s",
|
|
650
|
-
comma ? sep : "",
|
|
651
|
-
opt_robot ? check_names[i]
|
|
652
|
-
: _(check_names[i]));
|
|
653
|
-
comma = true;
|
|
654
|
-
}
|
|
655
|
-
}
|
|
656
|
-
|
|
657
|
-
return;
|
|
658
|
-
}
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
static bool
|
|
662
|
-
print_info_basic(const xz_file_info *xfi, file_pair *pair)
|
|
663
|
-
{
|
|
664
|
-
static bool headings_displayed = false;
|
|
665
|
-
if (!headings_displayed) {
|
|
666
|
-
headings_displayed = true;
|
|
667
|
-
// TRANSLATORS: These are column headings. From Strms (Streams)
|
|
668
|
-
// to Ratio, the columns are right aligned. Check and Filename
|
|
669
|
-
// are left aligned. If you need longer words, it's OK to
|
|
670
|
-
// use two lines here. Test with "xz -l foo.xz".
|
|
671
|
-
puts(_("Strms Blocks Compressed Uncompressed Ratio "
|
|
672
|
-
"Check Filename"));
|
|
673
|
-
}
|
|
674
|
-
|
|
675
|
-
char checks[CHECKS_STR_SIZE];
|
|
676
|
-
get_check_names(checks, lzma_index_checks(xfi->idx), false);
|
|
677
|
-
|
|
678
|
-
const char *cols[7] = {
|
|
679
|
-
uint64_to_str(lzma_index_stream_count(xfi->idx), 0),
|
|
680
|
-
uint64_to_str(lzma_index_block_count(xfi->idx), 1),
|
|
681
|
-
uint64_to_nicestr(lzma_index_file_size(xfi->idx),
|
|
682
|
-
NICESTR_B, NICESTR_TIB, false, 2),
|
|
683
|
-
uint64_to_nicestr(lzma_index_uncompressed_size(xfi->idx),
|
|
684
|
-
NICESTR_B, NICESTR_TIB, false, 3),
|
|
685
|
-
get_ratio(lzma_index_file_size(xfi->idx),
|
|
686
|
-
lzma_index_uncompressed_size(xfi->idx)),
|
|
687
|
-
checks,
|
|
688
|
-
pair->src_name,
|
|
689
|
-
};
|
|
690
|
-
printf("%*s %*s %*s %*s %*s %-*s %s\n",
|
|
691
|
-
tuklib_mbstr_fw(cols[0], 5), cols[0],
|
|
692
|
-
tuklib_mbstr_fw(cols[1], 7), cols[1],
|
|
693
|
-
tuklib_mbstr_fw(cols[2], 11), cols[2],
|
|
694
|
-
tuklib_mbstr_fw(cols[3], 11), cols[3],
|
|
695
|
-
tuklib_mbstr_fw(cols[4], 5), cols[4],
|
|
696
|
-
tuklib_mbstr_fw(cols[5], 7), cols[5],
|
|
697
|
-
cols[6]);
|
|
698
|
-
|
|
699
|
-
return false;
|
|
700
|
-
}
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
static void
|
|
704
|
-
print_adv_helper(uint64_t stream_count, uint64_t block_count,
|
|
705
|
-
uint64_t compressed_size, uint64_t uncompressed_size,
|
|
706
|
-
uint32_t checks, uint64_t stream_padding)
|
|
707
|
-
{
|
|
708
|
-
char checks_str[CHECKS_STR_SIZE];
|
|
709
|
-
get_check_names(checks_str, checks, true);
|
|
710
|
-
|
|
711
|
-
printf(_(" Streams: %s\n"),
|
|
712
|
-
uint64_to_str(stream_count, 0));
|
|
713
|
-
printf(_(" Blocks: %s\n"),
|
|
714
|
-
uint64_to_str(block_count, 0));
|
|
715
|
-
printf(_(" Compressed size: %s\n"),
|
|
716
|
-
uint64_to_nicestr(compressed_size,
|
|
717
|
-
NICESTR_B, NICESTR_TIB, true, 0));
|
|
718
|
-
printf(_(" Uncompressed size: %s\n"),
|
|
719
|
-
uint64_to_nicestr(uncompressed_size,
|
|
720
|
-
NICESTR_B, NICESTR_TIB, true, 0));
|
|
721
|
-
printf(_(" Ratio: %s\n"),
|
|
722
|
-
get_ratio(compressed_size, uncompressed_size));
|
|
723
|
-
printf(_(" Check: %s\n"), checks_str);
|
|
724
|
-
printf(_(" Stream padding: %s\n"),
|
|
725
|
-
uint64_to_nicestr(stream_padding,
|
|
726
|
-
NICESTR_B, NICESTR_TIB, true, 0));
|
|
727
|
-
return;
|
|
728
|
-
}
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
static bool
|
|
732
|
-
print_info_adv(xz_file_info *xfi, file_pair *pair)
|
|
733
|
-
{
|
|
734
|
-
// Print the overall information.
|
|
735
|
-
print_adv_helper(lzma_index_stream_count(xfi->idx),
|
|
736
|
-
lzma_index_block_count(xfi->idx),
|
|
737
|
-
lzma_index_file_size(xfi->idx),
|
|
738
|
-
lzma_index_uncompressed_size(xfi->idx),
|
|
739
|
-
lzma_index_checks(xfi->idx),
|
|
740
|
-
xfi->stream_padding);
|
|
741
|
-
|
|
742
|
-
// Size of the biggest Check. This is used to calculate the width
|
|
743
|
-
// of the CheckVal field. The table would get insanely wide if
|
|
744
|
-
// we always reserved space for 64-byte Check (128 chars as hex).
|
|
745
|
-
uint32_t check_max = 0;
|
|
746
|
-
|
|
747
|
-
// Print information about the Streams.
|
|
748
|
-
//
|
|
749
|
-
// TRANSLATORS: The second line is column headings. All except
|
|
750
|
-
// Check are right aligned; Check is left aligned. Test with
|
|
751
|
-
// "xz -lv foo.xz".
|
|
752
|
-
puts(_(" Streams:\n Stream Blocks"
|
|
753
|
-
" CompOffset UncompOffset"
|
|
754
|
-
" CompSize UncompSize Ratio"
|
|
755
|
-
" Check Padding"));
|
|
756
|
-
|
|
757
|
-
lzma_index_iter iter;
|
|
758
|
-
lzma_index_iter_init(&iter, xfi->idx);
|
|
759
|
-
|
|
760
|
-
while (!lzma_index_iter_next(&iter, LZMA_INDEX_ITER_STREAM)) {
|
|
761
|
-
const char *cols1[4] = {
|
|
762
|
-
uint64_to_str(iter.stream.number, 0),
|
|
763
|
-
uint64_to_str(iter.stream.block_count, 1),
|
|
764
|
-
uint64_to_str(iter.stream.compressed_offset, 2),
|
|
765
|
-
uint64_to_str(iter.stream.uncompressed_offset, 3),
|
|
766
|
-
};
|
|
767
|
-
printf(" %*s %*s %*s %*s ",
|
|
768
|
-
tuklib_mbstr_fw(cols1[0], 6), cols1[0],
|
|
769
|
-
tuklib_mbstr_fw(cols1[1], 9), cols1[1],
|
|
770
|
-
tuklib_mbstr_fw(cols1[2], 15), cols1[2],
|
|
771
|
-
tuklib_mbstr_fw(cols1[3], 15), cols1[3]);
|
|
772
|
-
|
|
773
|
-
const char *cols2[5] = {
|
|
774
|
-
uint64_to_str(iter.stream.compressed_size, 0),
|
|
775
|
-
uint64_to_str(iter.stream.uncompressed_size, 1),
|
|
776
|
-
get_ratio(iter.stream.compressed_size,
|
|
777
|
-
iter.stream.uncompressed_size),
|
|
778
|
-
_(check_names[iter.stream.flags->check]),
|
|
779
|
-
uint64_to_str(iter.stream.padding, 2),
|
|
780
|
-
};
|
|
781
|
-
printf("%*s %*s %*s %-*s %*s\n",
|
|
782
|
-
tuklib_mbstr_fw(cols2[0], 15), cols2[0],
|
|
783
|
-
tuklib_mbstr_fw(cols2[1], 15), cols2[1],
|
|
784
|
-
tuklib_mbstr_fw(cols2[2], 5), cols2[2],
|
|
785
|
-
tuklib_mbstr_fw(cols2[3], 10), cols2[3],
|
|
786
|
-
tuklib_mbstr_fw(cols2[4], 7), cols2[4]);
|
|
787
|
-
|
|
788
|
-
// Update the maximum Check size.
|
|
789
|
-
if (lzma_check_size(iter.stream.flags->check) > check_max)
|
|
790
|
-
check_max = lzma_check_size(iter.stream.flags->check);
|
|
791
|
-
}
|
|
792
|
-
|
|
793
|
-
// Cache the verbosity level to a local variable.
|
|
794
|
-
const bool detailed = message_verbosity_get() >= V_DEBUG;
|
|
795
|
-
|
|
796
|
-
// Information collected from Block Headers
|
|
797
|
-
block_header_info bhi;
|
|
798
|
-
|
|
799
|
-
// Print information about the Blocks but only if there is
|
|
800
|
-
// at least one Block.
|
|
801
|
-
if (lzma_index_block_count(xfi->idx) > 0) {
|
|
802
|
-
// Calculate the width of the CheckVal field.
|
|
803
|
-
const int checkval_width = my_max(8, 2 * check_max);
|
|
804
|
-
|
|
805
|
-
// TRANSLATORS: The second line is column headings. All
|
|
806
|
-
// except Check are right aligned; Check is left aligned.
|
|
807
|
-
printf(_(" Blocks:\n Stream Block"
|
|
808
|
-
" CompOffset UncompOffset"
|
|
809
|
-
" TotalSize UncompSize Ratio Check"));
|
|
810
|
-
|
|
811
|
-
if (detailed) {
|
|
812
|
-
// TRANSLATORS: These are additional column headings
|
|
813
|
-
// for the most verbose listing mode. CheckVal
|
|
814
|
-
// (Check value), Flags, and Filters are left aligned.
|
|
815
|
-
// Header (Block Header Size), CompSize, and MemUsage
|
|
816
|
-
// are right aligned. %*s is replaced with 0-120
|
|
817
|
-
// spaces to make the CheckVal column wide enough.
|
|
818
|
-
// Test with "xz -lvv foo.xz".
|
|
819
|
-
printf(_(" CheckVal %*s Header Flags "
|
|
820
|
-
"CompSize MemUsage Filters"),
|
|
821
|
-
checkval_width - 8, "");
|
|
822
|
-
}
|
|
823
|
-
|
|
824
|
-
putchar('\n');
|
|
825
|
-
|
|
826
|
-
lzma_index_iter_init(&iter, xfi->idx);
|
|
827
|
-
|
|
828
|
-
// Iterate over the Blocks.
|
|
829
|
-
while (!lzma_index_iter_next(&iter, LZMA_INDEX_ITER_BLOCK)) {
|
|
830
|
-
if (detailed && parse_details(pair, &iter, &bhi, xfi))
|
|
831
|
-
return true;
|
|
832
|
-
|
|
833
|
-
const char *cols1[4] = {
|
|
834
|
-
uint64_to_str(iter.stream.number, 0),
|
|
835
|
-
uint64_to_str(
|
|
836
|
-
iter.block.number_in_stream, 1),
|
|
837
|
-
uint64_to_str(
|
|
838
|
-
iter.block.compressed_file_offset, 2),
|
|
839
|
-
uint64_to_str(
|
|
840
|
-
iter.block.uncompressed_file_offset, 3)
|
|
841
|
-
};
|
|
842
|
-
printf(" %*s %*s %*s %*s ",
|
|
843
|
-
tuklib_mbstr_fw(cols1[0], 6), cols1[0],
|
|
844
|
-
tuklib_mbstr_fw(cols1[1], 9), cols1[1],
|
|
845
|
-
tuklib_mbstr_fw(cols1[2], 15), cols1[2],
|
|
846
|
-
tuklib_mbstr_fw(cols1[3], 15), cols1[3]);
|
|
847
|
-
|
|
848
|
-
const char *cols2[4] = {
|
|
849
|
-
uint64_to_str(iter.block.total_size, 0),
|
|
850
|
-
uint64_to_str(iter.block.uncompressed_size,
|
|
851
|
-
1),
|
|
852
|
-
get_ratio(iter.block.total_size,
|
|
853
|
-
iter.block.uncompressed_size),
|
|
854
|
-
_(check_names[iter.stream.flags->check])
|
|
855
|
-
};
|
|
856
|
-
printf("%*s %*s %*s %-*s",
|
|
857
|
-
tuklib_mbstr_fw(cols2[0], 15), cols2[0],
|
|
858
|
-
tuklib_mbstr_fw(cols2[1], 15), cols2[1],
|
|
859
|
-
tuklib_mbstr_fw(cols2[2], 5), cols2[2],
|
|
860
|
-
tuklib_mbstr_fw(cols2[3], detailed ? 11 : 1),
|
|
861
|
-
cols2[3]);
|
|
862
|
-
|
|
863
|
-
if (detailed) {
|
|
864
|
-
const lzma_vli compressed_size
|
|
865
|
-
= iter.block.unpadded_size
|
|
866
|
-
- bhi.header_size
|
|
867
|
-
- lzma_check_size(
|
|
868
|
-
iter.stream.flags->check);
|
|
869
|
-
|
|
870
|
-
const char *cols3[6] = {
|
|
871
|
-
check_value,
|
|
872
|
-
uint64_to_str(bhi.header_size, 0),
|
|
873
|
-
bhi.flags,
|
|
874
|
-
uint64_to_str(compressed_size, 1),
|
|
875
|
-
uint64_to_str(
|
|
876
|
-
round_up_to_mib(bhi.memusage),
|
|
877
|
-
2),
|
|
878
|
-
bhi.filter_chain
|
|
879
|
-
};
|
|
880
|
-
// Show MiB for memory usage, because it
|
|
881
|
-
// is the only size which is not in bytes.
|
|
882
|
-
printf("%-*s %*s %-5s %*s %*s MiB %s",
|
|
883
|
-
checkval_width, cols3[0],
|
|
884
|
-
tuklib_mbstr_fw(cols3[1], 6), cols3[1],
|
|
885
|
-
cols3[2],
|
|
886
|
-
tuklib_mbstr_fw(cols3[3], 15),
|
|
887
|
-
cols3[3],
|
|
888
|
-
tuklib_mbstr_fw(cols3[4], 7), cols3[4],
|
|
889
|
-
cols3[5]);
|
|
890
|
-
}
|
|
891
|
-
|
|
892
|
-
putchar('\n');
|
|
893
|
-
}
|
|
894
|
-
}
|
|
895
|
-
|
|
896
|
-
if (detailed) {
|
|
897
|
-
printf(_(" Memory needed: %s MiB\n"), uint64_to_str(
|
|
898
|
-
round_up_to_mib(xfi->memusage_max), 0));
|
|
899
|
-
printf(_(" Sizes in headers: %s\n"),
|
|
900
|
-
xfi->all_have_sizes ? _("Yes") : _("No"));
|
|
901
|
-
printf(_(" Minimum XZ Utils version: %s\n"),
|
|
902
|
-
xz_ver_to_str(xfi->min_version));
|
|
903
|
-
}
|
|
904
|
-
|
|
905
|
-
return false;
|
|
906
|
-
}
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
static bool
|
|
910
|
-
print_info_robot(xz_file_info *xfi, file_pair *pair)
|
|
911
|
-
{
|
|
912
|
-
char checks[CHECKS_STR_SIZE];
|
|
913
|
-
get_check_names(checks, lzma_index_checks(xfi->idx), false);
|
|
914
|
-
|
|
915
|
-
printf("name\t%s\n", pair->src_name);
|
|
916
|
-
|
|
917
|
-
printf("file\t%" PRIu64 "\t%" PRIu64 "\t%" PRIu64 "\t%" PRIu64
|
|
918
|
-
"\t%s\t%s\t%" PRIu64 "\n",
|
|
919
|
-
lzma_index_stream_count(xfi->idx),
|
|
920
|
-
lzma_index_block_count(xfi->idx),
|
|
921
|
-
lzma_index_file_size(xfi->idx),
|
|
922
|
-
lzma_index_uncompressed_size(xfi->idx),
|
|
923
|
-
get_ratio(lzma_index_file_size(xfi->idx),
|
|
924
|
-
lzma_index_uncompressed_size(xfi->idx)),
|
|
925
|
-
checks,
|
|
926
|
-
xfi->stream_padding);
|
|
927
|
-
|
|
928
|
-
if (message_verbosity_get() >= V_VERBOSE) {
|
|
929
|
-
lzma_index_iter iter;
|
|
930
|
-
lzma_index_iter_init(&iter, xfi->idx);
|
|
931
|
-
|
|
932
|
-
while (!lzma_index_iter_next(&iter, LZMA_INDEX_ITER_STREAM))
|
|
933
|
-
printf("stream\t%" PRIu64 "\t%" PRIu64 "\t%" PRIu64
|
|
934
|
-
"\t%" PRIu64 "\t%" PRIu64 "\t%" PRIu64
|
|
935
|
-
"\t%s\t%s\t%" PRIu64 "\n",
|
|
936
|
-
iter.stream.number,
|
|
937
|
-
iter.stream.block_count,
|
|
938
|
-
iter.stream.compressed_offset,
|
|
939
|
-
iter.stream.uncompressed_offset,
|
|
940
|
-
iter.stream.compressed_size,
|
|
941
|
-
iter.stream.uncompressed_size,
|
|
942
|
-
get_ratio(iter.stream.compressed_size,
|
|
943
|
-
iter.stream.uncompressed_size),
|
|
944
|
-
check_names[iter.stream.flags->check],
|
|
945
|
-
iter.stream.padding);
|
|
946
|
-
|
|
947
|
-
lzma_index_iter_rewind(&iter);
|
|
948
|
-
block_header_info bhi;
|
|
949
|
-
|
|
950
|
-
while (!lzma_index_iter_next(&iter, LZMA_INDEX_ITER_BLOCK)) {
|
|
951
|
-
if (message_verbosity_get() >= V_DEBUG
|
|
952
|
-
&& parse_details(
|
|
953
|
-
pair, &iter, &bhi, xfi))
|
|
954
|
-
return true;
|
|
955
|
-
|
|
956
|
-
printf("block\t%" PRIu64 "\t%" PRIu64 "\t%" PRIu64
|
|
957
|
-
"\t%" PRIu64 "\t%" PRIu64
|
|
958
|
-
"\t%" PRIu64 "\t%" PRIu64 "\t%s\t%s",
|
|
959
|
-
iter.stream.number,
|
|
960
|
-
iter.block.number_in_stream,
|
|
961
|
-
iter.block.number_in_file,
|
|
962
|
-
iter.block.compressed_file_offset,
|
|
963
|
-
iter.block.uncompressed_file_offset,
|
|
964
|
-
iter.block.total_size,
|
|
965
|
-
iter.block.uncompressed_size,
|
|
966
|
-
get_ratio(iter.block.total_size,
|
|
967
|
-
iter.block.uncompressed_size),
|
|
968
|
-
check_names[iter.stream.flags->check]);
|
|
969
|
-
|
|
970
|
-
if (message_verbosity_get() >= V_DEBUG)
|
|
971
|
-
printf("\t%s\t%" PRIu32 "\t%s\t%" PRIu64
|
|
972
|
-
"\t%" PRIu64 "\t%s",
|
|
973
|
-
check_value,
|
|
974
|
-
bhi.header_size,
|
|
975
|
-
bhi.flags,
|
|
976
|
-
bhi.compressed_size,
|
|
977
|
-
bhi.memusage,
|
|
978
|
-
bhi.filter_chain);
|
|
979
|
-
|
|
980
|
-
putchar('\n');
|
|
981
|
-
}
|
|
982
|
-
}
|
|
983
|
-
|
|
984
|
-
if (message_verbosity_get() >= V_DEBUG)
|
|
985
|
-
printf("summary\t%" PRIu64 "\t%s\t%" PRIu32 "\n",
|
|
986
|
-
xfi->memusage_max,
|
|
987
|
-
xfi->all_have_sizes ? "yes" : "no",
|
|
988
|
-
xfi->min_version);
|
|
989
|
-
|
|
990
|
-
return false;
|
|
991
|
-
}
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
static void
|
|
995
|
-
update_totals(const xz_file_info *xfi)
|
|
996
|
-
{
|
|
997
|
-
// TODO: Integer overflow checks
|
|
998
|
-
++totals.files;
|
|
999
|
-
totals.streams += lzma_index_stream_count(xfi->idx);
|
|
1000
|
-
totals.blocks += lzma_index_block_count(xfi->idx);
|
|
1001
|
-
totals.compressed_size += lzma_index_file_size(xfi->idx);
|
|
1002
|
-
totals.uncompressed_size += lzma_index_uncompressed_size(xfi->idx);
|
|
1003
|
-
totals.stream_padding += xfi->stream_padding;
|
|
1004
|
-
totals.checks |= lzma_index_checks(xfi->idx);
|
|
1005
|
-
|
|
1006
|
-
if (totals.memusage_max < xfi->memusage_max)
|
|
1007
|
-
totals.memusage_max = xfi->memusage_max;
|
|
1008
|
-
|
|
1009
|
-
if (totals.min_version < xfi->min_version)
|
|
1010
|
-
totals.min_version = xfi->min_version;
|
|
1011
|
-
|
|
1012
|
-
totals.all_have_sizes &= xfi->all_have_sizes;
|
|
1013
|
-
|
|
1014
|
-
return;
|
|
1015
|
-
}
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
static void
|
|
1019
|
-
print_totals_basic(void)
|
|
1020
|
-
{
|
|
1021
|
-
// Print a separator line.
|
|
1022
|
-
char line[80];
|
|
1023
|
-
memset(line, '-', sizeof(line));
|
|
1024
|
-
line[sizeof(line) - 1] = '\0';
|
|
1025
|
-
puts(line);
|
|
1026
|
-
|
|
1027
|
-
// Get the check names.
|
|
1028
|
-
char checks[CHECKS_STR_SIZE];
|
|
1029
|
-
get_check_names(checks, totals.checks, false);
|
|
1030
|
-
|
|
1031
|
-
// Print the totals except the file count, which needs
|
|
1032
|
-
// special handling.
|
|
1033
|
-
printf("%5s %7s %11s %11s %5s %-7s ",
|
|
1034
|
-
uint64_to_str(totals.streams, 0),
|
|
1035
|
-
uint64_to_str(totals.blocks, 1),
|
|
1036
|
-
uint64_to_nicestr(totals.compressed_size,
|
|
1037
|
-
NICESTR_B, NICESTR_TIB, false, 2),
|
|
1038
|
-
uint64_to_nicestr(totals.uncompressed_size,
|
|
1039
|
-
NICESTR_B, NICESTR_TIB, false, 3),
|
|
1040
|
-
get_ratio(totals.compressed_size,
|
|
1041
|
-
totals.uncompressed_size),
|
|
1042
|
-
checks);
|
|
1043
|
-
|
|
1044
|
-
// Since we print totals only when there are at least two files,
|
|
1045
|
-
// the English message will always use "%s files". But some other
|
|
1046
|
-
// languages need different forms for different plurals so we
|
|
1047
|
-
// have to translate this with ngettext().
|
|
1048
|
-
//
|
|
1049
|
-
// TRANSLATORS: %s is an integer. Only the plural form of this
|
|
1050
|
-
// message is used (e.g. "2 files"). Test with "xz -l foo.xz bar.xz".
|
|
1051
|
-
printf(ngettext("%s file\n", "%s files\n",
|
|
1052
|
-
totals.files <= ULONG_MAX ? totals.files
|
|
1053
|
-
: (totals.files % 1000000) + 1000000),
|
|
1054
|
-
uint64_to_str(totals.files, 0));
|
|
1055
|
-
|
|
1056
|
-
return;
|
|
1057
|
-
}
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
static void
|
|
1061
|
-
print_totals_adv(void)
|
|
1062
|
-
{
|
|
1063
|
-
putchar('\n');
|
|
1064
|
-
puts(_("Totals:"));
|
|
1065
|
-
printf(_(" Number of files: %s\n"),
|
|
1066
|
-
uint64_to_str(totals.files, 0));
|
|
1067
|
-
print_adv_helper(totals.streams, totals.blocks,
|
|
1068
|
-
totals.compressed_size, totals.uncompressed_size,
|
|
1069
|
-
totals.checks, totals.stream_padding);
|
|
1070
|
-
|
|
1071
|
-
if (message_verbosity_get() >= V_DEBUG) {
|
|
1072
|
-
printf(_(" Memory needed: %s MiB\n"), uint64_to_str(
|
|
1073
|
-
round_up_to_mib(totals.memusage_max), 0));
|
|
1074
|
-
printf(_(" Sizes in headers: %s\n"),
|
|
1075
|
-
totals.all_have_sizes ? _("Yes") : _("No"));
|
|
1076
|
-
printf(_(" Minimum XZ Utils version: %s\n"),
|
|
1077
|
-
xz_ver_to_str(totals.min_version));
|
|
1078
|
-
}
|
|
1079
|
-
|
|
1080
|
-
return;
|
|
1081
|
-
}
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
static void
|
|
1085
|
-
print_totals_robot(void)
|
|
1086
|
-
{
|
|
1087
|
-
char checks[CHECKS_STR_SIZE];
|
|
1088
|
-
get_check_names(checks, totals.checks, false);
|
|
1089
|
-
|
|
1090
|
-
printf("totals\t%" PRIu64 "\t%" PRIu64 "\t%" PRIu64 "\t%" PRIu64
|
|
1091
|
-
"\t%s\t%s\t%" PRIu64 "\t%" PRIu64,
|
|
1092
|
-
totals.streams,
|
|
1093
|
-
totals.blocks,
|
|
1094
|
-
totals.compressed_size,
|
|
1095
|
-
totals.uncompressed_size,
|
|
1096
|
-
get_ratio(totals.compressed_size,
|
|
1097
|
-
totals.uncompressed_size),
|
|
1098
|
-
checks,
|
|
1099
|
-
totals.stream_padding,
|
|
1100
|
-
totals.files);
|
|
1101
|
-
|
|
1102
|
-
if (message_verbosity_get() >= V_DEBUG)
|
|
1103
|
-
printf("\t%" PRIu64 "\t%s\t%" PRIu32,
|
|
1104
|
-
totals.memusage_max,
|
|
1105
|
-
totals.all_have_sizes ? "yes" : "no",
|
|
1106
|
-
totals.min_version);
|
|
1107
|
-
|
|
1108
|
-
putchar('\n');
|
|
1109
|
-
|
|
1110
|
-
return;
|
|
1111
|
-
}
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
extern void
|
|
1115
|
-
list_totals(void)
|
|
1116
|
-
{
|
|
1117
|
-
if (opt_robot) {
|
|
1118
|
-
// Always print totals in --robot mode. It can be convenient
|
|
1119
|
-
// in some cases and doesn't complicate usage of the
|
|
1120
|
-
// single-file case much.
|
|
1121
|
-
print_totals_robot();
|
|
1122
|
-
|
|
1123
|
-
} else if (totals.files > 1) {
|
|
1124
|
-
// For non-robot mode, totals are printed only if there
|
|
1125
|
-
// is more than one file.
|
|
1126
|
-
if (message_verbosity_get() <= V_WARNING)
|
|
1127
|
-
print_totals_basic();
|
|
1128
|
-
else
|
|
1129
|
-
print_totals_adv();
|
|
1130
|
-
}
|
|
1131
|
-
|
|
1132
|
-
return;
|
|
1133
|
-
}
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
extern void
|
|
1137
|
-
list_file(const char *filename)
|
|
1138
|
-
{
|
|
1139
|
-
if (opt_format != FORMAT_XZ && opt_format != FORMAT_AUTO)
|
|
1140
|
-
message_fatal(_("--list works only on .xz files "
|
|
1141
|
-
"(--format=xz or --format=auto)"));
|
|
1142
|
-
|
|
1143
|
-
message_filename(filename);
|
|
1144
|
-
|
|
1145
|
-
if (filename == stdin_filename) {
|
|
1146
|
-
message_error(_("--list does not support reading from "
|
|
1147
|
-
"standard input"));
|
|
1148
|
-
return;
|
|
1149
|
-
}
|
|
1150
|
-
|
|
1151
|
-
// Unset opt_stdout so that io_open_src() won't accept special files.
|
|
1152
|
-
// Set opt_force so that io_open_src() will follow symlinks.
|
|
1153
|
-
opt_stdout = false;
|
|
1154
|
-
opt_force = true;
|
|
1155
|
-
file_pair *pair = io_open_src(filename);
|
|
1156
|
-
if (pair == NULL)
|
|
1157
|
-
return;
|
|
1158
|
-
|
|
1159
|
-
xz_file_info xfi = XZ_FILE_INFO_INIT;
|
|
1160
|
-
if (!parse_indexes(&xfi, pair)) {
|
|
1161
|
-
bool fail;
|
|
1162
|
-
|
|
1163
|
-
// We have three main modes:
|
|
1164
|
-
// - --robot, which has submodes if --verbose is specified
|
|
1165
|
-
// once or twice
|
|
1166
|
-
// - Normal --list without --verbose
|
|
1167
|
-
// - --list with one or two --verbose
|
|
1168
|
-
if (opt_robot)
|
|
1169
|
-
fail = print_info_robot(&xfi, pair);
|
|
1170
|
-
else if (message_verbosity_get() <= V_WARNING)
|
|
1171
|
-
fail = print_info_basic(&xfi, pair);
|
|
1172
|
-
else
|
|
1173
|
-
fail = print_info_adv(&xfi, pair);
|
|
1174
|
-
|
|
1175
|
-
// Update the totals that are displayed after all
|
|
1176
|
-
// the individual files have been listed. Don't count
|
|
1177
|
-
// broken files.
|
|
1178
|
-
if (!fail)
|
|
1179
|
-
update_totals(&xfi);
|
|
1180
|
-
|
|
1181
|
-
lzma_index_end(xfi.idx, NULL);
|
|
1182
|
-
}
|
|
1183
|
-
|
|
1184
|
-
io_close(pair, false);
|
|
1185
|
-
return;
|
|
1186
|
-
}
|