zstd-native-ruby 1.0.0 → 1.0.2
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.
- checksums.yaml +4 -4
- data/LICENSE +4 -2
- data/README.md +50 -23
- data/ext/zstd_native/Makefile +269 -0
- data/ext/zstd_native/extconf.rb +37 -0
- data/{vendor → ext/zstd_native}/zstd/CONTRIBUTING.md +1 -6
- data/{vendor → ext/zstd_native}/zstd/Makefile +6 -5
- data/{vendor → ext/zstd_native}/zstd/README.md +35 -42
- data/ext/zstd_native/zstd/build/cmake/CMakeLists.txt +228 -0
- data/{vendor → ext/zstd_native}/zstd/build/cmake/CMakeModules/AddZstdCompilationFlags.cmake +19 -21
- data/{vendor → ext/zstd_native}/zstd/build/cmake/README.md +0 -9
- data/{vendor → ext/zstd_native}/zstd/build/cmake/lib/CMakeLists.txt +6 -9
- data/{vendor → ext/zstd_native}/zstd/build/meson/lib/meson.build +0 -4
- data/{vendor → ext/zstd_native}/zstd/build/meson/meson.build +2 -1
- data/{vendor → ext/zstd_native}/zstd/contrib/externalSequenceProducer/main.c +2 -3
- data/{vendor → ext/zstd_native}/zstd/contrib/largeNbDicts/largeNbDicts.c +0 -2
- data/{vendor → ext/zstd_native}/zstd/contrib/linux-kernel/linux_zstd.h +0 -166
- data/{vendor → ext/zstd_native}/zstd/contrib/linux-kernel/zstd_compress_module.c +0 -49
- data/{vendor → ext/zstd_native}/zstd/contrib/linux-kernel/zstd_decompress_module.c +0 -36
- data/{vendor → ext/zstd_native}/zstd/contrib/premake/zstd.lua +0 -1
- data/{vendor → ext/zstd_native}/zstd/contrib/pzstd/Logging.h +0 -1
- data/{vendor → ext/zstd_native}/zstd/contrib/seekable_format/examples/Makefile +1 -3
- data/{vendor → ext/zstd_native}/zstd/contrib/seekable_format/examples/parallel_compression.c +84 -124
- data/{vendor → ext/zstd_native}/zstd/contrib/seekable_format/examples/parallel_processing.c +5 -2
- data/{vendor → ext/zstd_native}/zstd/contrib/seekable_format/tests/Makefile +2 -22
- data/{vendor → ext/zstd_native}/zstd/contrib/seekable_format/tests/seekable_tests.c +0 -12
- data/{vendor → ext/zstd_native}/zstd/doc/zstd_compression_format.md +2 -3
- data/{vendor → ext/zstd_native}/zstd/doc/zstd_manual.html +24 -31
- data/{vendor → ext/zstd_native}/zstd/lib/Makefile +9 -9
- data/{vendor → ext/zstd_native}/zstd/lib/README.md +4 -23
- data/{vendor → ext/zstd_native}/zstd/lib/common/bits.h +1 -1
- data/{vendor → ext/zstd_native}/zstd/lib/common/compiler.h +6 -24
- data/ext/zstd_native/zstd/lib/common/debug.o +0 -0
- data/{vendor → ext/zstd_native}/zstd/lib/common/entropy_common.o +0 -0
- data/{vendor → ext/zstd_native}/zstd/lib/common/error_private.o +0 -0
- data/{vendor → ext/zstd_native}/zstd/lib/common/fse_decompress.o +0 -0
- data/ext/zstd_native/zstd/lib/common/pool.o +0 -0
- data/{vendor → ext/zstd_native}/zstd/lib/common/portability_macros.h +0 -19
- data/{vendor → ext/zstd_native}/zstd/lib/common/threading.c +2 -16
- data/ext/zstd_native/zstd/lib/common/threading.o +0 -0
- data/{vendor → ext/zstd_native}/zstd/lib/common/xxhash.o +0 -0
- data/{vendor → ext/zstd_native}/zstd/lib/common/zstd_common.c +0 -9
- data/ext/zstd_native/zstd/lib/common/zstd_common.o +0 -0
- data/{vendor → ext/zstd_native}/zstd/lib/common/zstd_internal.h +2 -4
- data/{vendor → ext/zstd_native}/zstd/lib/compress/fse_compress.o +0 -0
- data/ext/zstd_native/zstd/lib/compress/hist.c +191 -0
- data/{vendor → ext/zstd_native}/zstd/lib/compress/hist.h +0 -4
- data/ext/zstd_native/zstd/lib/compress/hist.o +0 -0
- data/{vendor → ext/zstd_native}/zstd/lib/compress/huf_compress.c +0 -1
- data/{vendor → ext/zstd_native}/zstd/lib/compress/huf_compress.o +0 -0
- data/{vendor → ext/zstd_native}/zstd/lib/compress/zstd_compress.c +16 -535
- data/ext/zstd_native/zstd/lib/compress/zstd_compress.o +0 -0
- data/{vendor → ext/zstd_native}/zstd/lib/compress/zstd_compress_internal.h +3 -3
- data/{vendor → ext/zstd_native}/zstd/lib/compress/zstd_compress_literals.o +0 -0
- data/{vendor → ext/zstd_native}/zstd/lib/compress/zstd_compress_sequences.o +0 -0
- data/ext/zstd_native/zstd/lib/compress/zstd_compress_superblock.o +0 -0
- data/ext/zstd_native/zstd/lib/compress/zstd_double_fast.o +0 -0
- data/ext/zstd_native/zstd/lib/compress/zstd_fast.o +0 -0
- data/{vendor → ext/zstd_native}/zstd/lib/compress/zstd_lazy.c +3 -47
- data/ext/zstd_native/zstd/lib/compress/zstd_lazy.o +0 -0
- data/ext/zstd_native/zstd/lib/compress/zstd_ldm.o +0 -0
- data/{vendor → ext/zstd_native}/zstd/lib/compress/zstd_opt.c +10 -2
- data/ext/zstd_native/zstd/lib/compress/zstd_opt.o +0 -0
- data/{vendor → ext/zstd_native}/zstd/lib/compress/zstd_preSplit.o +0 -0
- data/{vendor → ext/zstd_native}/zstd/lib/compress/zstdmt_compress.c +14 -15
- data/ext/zstd_native/zstd/lib/compress/zstdmt_compress.o +0 -0
- data/{vendor → ext/zstd_native}/zstd/lib/decompress/huf_decompress.c +48 -57
- data/ext/zstd_native/zstd/lib/decompress/huf_decompress.o +0 -0
- data/{vendor → ext/zstd_native}/zstd/lib/decompress/huf_decompress_amd64.S +18 -182
- data/{vendor → ext/zstd_native}/zstd/lib/decompress/zstd_ddict.o +0 -0
- data/{vendor → ext/zstd_native}/zstd/lib/decompress/zstd_decompress.o +0 -0
- data/{vendor → ext/zstd_native}/zstd/lib/decompress/zstd_decompress_block.c +65 -167
- data/ext/zstd_native/zstd/lib/decompress/zstd_decompress_block.o +0 -0
- data/{vendor → ext/zstd_native}/zstd/lib/dictBuilder/cover.c +67 -98
- data/ext/zstd_native/zstd/lib/dictBuilder/cover.o +0 -0
- data/{vendor → ext/zstd_native}/zstd/lib/dictBuilder/divsufsort.c +4 -4
- data/ext/zstd_native/zstd/lib/dictBuilder/divsufsort.o +0 -0
- data/{vendor → ext/zstd_native}/zstd/lib/dictBuilder/fastcover.c +40 -39
- data/ext/zstd_native/zstd/lib/dictBuilder/fastcover.o +0 -0
- data/{vendor → ext/zstd_native}/zstd/lib/dictBuilder/zdict.c +14 -18
- data/ext/zstd_native/zstd/lib/dictBuilder/zdict.o +0 -0
- data/ext/zstd_native/zstd/lib/dll/example/build_package.bat +20 -0
- data/{vendor → ext/zstd_native}/zstd/lib/legacy/zstd_v01.c +5 -6
- data/{vendor → ext/zstd_native}/zstd/lib/legacy/zstd_v03.c +1 -1
- data/{vendor → ext/zstd_native}/zstd/lib/legacy/zstd_v04.c +1 -1
- data/{vendor → ext/zstd_native}/zstd/lib/legacy/zstd_v05.c +1 -1
- data/{vendor → ext/zstd_native}/zstd/lib/legacy/zstd_v06.c +1 -1
- data/{vendor → ext/zstd_native}/zstd/lib/libzstd.mk +1 -4
- data/{vendor → ext/zstd_native}/zstd/lib/libzstd.pc.in +0 -1
- data/{vendor → ext/zstd_native}/zstd/lib/zstd.h +30 -41
- data/{vendor → ext/zstd_native}/zstd/programs/Makefile +8 -8
- data/{vendor → ext/zstd_native}/zstd/programs/README.md +1 -1
- data/{vendor → ext/zstd_native}/zstd/programs/benchzstd.c +62 -51
- data/{vendor → ext/zstd_native}/zstd/programs/benchzstd.h +2 -2
- data/{vendor → ext/zstd_native}/zstd/programs/dibio.c +5 -12
- data/{vendor → ext/zstd_native}/zstd/programs/fileio.c +152 -405
- data/{vendor → ext/zstd_native}/zstd/programs/fileio.h +1 -1
- data/{vendor → ext/zstd_native}/zstd/programs/fileio_types.h +1 -1
- data/{vendor → ext/zstd_native}/zstd/programs/timefn.c +1 -3
- data/{vendor → ext/zstd_native}/zstd/programs/util.c +65 -153
- data/{vendor → ext/zstd_native}/zstd/programs/util.h +2 -4
- data/{vendor → ext/zstd_native}/zstd/programs/zstd.1 +37 -225
- data/{vendor → ext/zstd_native}/zstd/programs/zstd.1.md +14 -14
- data/{vendor → ext/zstd_native}/zstd/programs/zstdcli.c +65 -82
- data/{vendor → ext/zstd_native}/zstd/programs/zstdcli_trace.c +1 -2
- data/{vendor → ext/zstd_native}/zstd/programs/zstdgrep.1 +1 -1
- data/{vendor → ext/zstd_native}/zstd/programs/zstdless.1 +1 -1
- data/{vendor → ext/zstd_native}/zstd/tests/Makefile +4 -8
- data/{vendor → ext/zstd_native}/zstd/tests/automated_benchmarking.py +2 -2
- data/{vendor/zstd/tests/largeDictionary.c → ext/zstd_native/zstd/tests/bigdict.c} +18 -16
- data/{vendor → ext/zstd_native}/zstd/tests/cli-tests/basic/help.sh.stdout.glob +1 -1
- data/{vendor → ext/zstd_native}/zstd/tests/cli-tests/common/platform.sh +0 -11
- data/{vendor → ext/zstd_native}/zstd/tests/cli-tests/compression/multi-threaded.sh +0 -7
- data/{vendor → ext/zstd_native}/zstd/tests/cli-tests/compression/multi-threaded.sh.stderr.exact +0 -10
- data/ext/zstd_native/zstd/tests/cli-tests/dict-builder/no-inputs.sh.stderr.exact +5 -0
- data/{vendor → ext/zstd_native}/zstd/tests/cli-tests/file-stat/compress-file-to-dir-without-write-perm.sh.stderr.exact +0 -4
- data/{vendor/zstd/tests/cli-tests/file-stat/compress-file-to-file.sh.stderr.glob → ext/zstd_native/zstd/tests/cli-tests/file-stat/compress-file-to-file.sh.stderr.exact} +0 -4
- data/{vendor/zstd/tests/cli-tests/file-stat/compress-stdin-to-file.sh.stderr.glob → ext/zstd_native/zstd/tests/cli-tests/file-stat/compress-stdin-to-file.sh.stderr.exact} +0 -4
- data/{vendor/zstd/tests/cli-tests/file-stat/decompress-file-to-file.sh.stderr.glob → ext/zstd_native/zstd/tests/cli-tests/file-stat/decompress-file-to-file.sh.stderr.exact} +0 -4
- data/{vendor/zstd/tests/cli-tests/file-stat/decompress-stdin-to-file.sh.stderr.glob → ext/zstd_native/zstd/tests/cli-tests/file-stat/decompress-stdin-to-file.sh.stderr.exact} +0 -4
- data/{vendor → ext/zstd_native}/zstd/tests/cli-tests/run.py +1 -2
- data/{vendor → ext/zstd_native}/zstd/tests/fullbench.c +0 -1
- data/{vendor → ext/zstd_native}/zstd/tests/fuzz/fuzz_helpers.c +3 -2
- data/{vendor → ext/zstd_native}/zstd/tests/fuzz/fuzz_helpers.h +0 -1
- data/{vendor → ext/zstd_native}/zstd/tests/fuzzer.c +0 -335
- data/ext/zstd_native/zstd/tests/largeDictionary.c +128 -0
- data/{vendor → ext/zstd_native}/zstd/tests/legacy.c +0 -2
- data/{vendor → ext/zstd_native}/zstd/tests/longmatch.c +17 -38
- data/{vendor → ext/zstd_native}/zstd/tests/paramgrill.c +3 -3
- data/{vendor → ext/zstd_native}/zstd/tests/playTests.sh +34 -35
- data/{vendor → ext/zstd_native}/zstd/tests/regression/method.c +3 -3
- data/{vendor → ext/zstd_native}/zstd/tests/zstreamtest.c +1 -1
- data/ext/zstd_native/zstd_native.c +852 -0
- data/ext/zstd_native/zstd_native.o +0 -0
- data/ext/zstd_native/zstd_native.so +0 -0
- data/lib/zstd_native/version.rb +3 -0
- data/lib/zstd_native/zstd_native.so +0 -0
- data/lib/zstd_native.rb +6 -0
- metadata +647 -657
- data/CLAUDE.md +0 -101
- data/ext/zstd_ruby/extconf.rb +0 -35
- data/ext/zstd_ruby/zstd_ruby.c +0 -221
- data/lib/zstd_ruby.rb +0 -68
- data/vendor/zstd/CMakeLists.txt +0 -11
- data/vendor/zstd/build/cmake/CMakeLists.txt +0 -81
- data/vendor/zstd/build/cmake/CMakeModules/ZstdBuild.cmake +0 -42
- data/vendor/zstd/build/cmake/CMakeModules/ZstdDependencies.cmake +0 -30
- data/vendor/zstd/build/cmake/CMakeModules/ZstdOptions.cmake +0 -68
- data/vendor/zstd/build/cmake/CMakeModules/ZstdPackage.cmake +0 -42
- data/vendor/zstd/build/cmake/CMakeModules/ZstdVersion.cmake +0 -31
- data/vendor/zstd/lib/common/debug.o +0 -0
- data/vendor/zstd/lib/common/pool.o +0 -0
- data/vendor/zstd/lib/common/threading.o +0 -0
- data/vendor/zstd/lib/common/zstd_common.o +0 -0
- data/vendor/zstd/lib/compress/hist.c +0 -446
- data/vendor/zstd/lib/compress/hist.o +0 -0
- data/vendor/zstd/lib/compress/zstd_compress.o +0 -0
- data/vendor/zstd/lib/compress/zstd_compress_superblock.o +0 -0
- data/vendor/zstd/lib/compress/zstd_double_fast.o +0 -0
- data/vendor/zstd/lib/compress/zstd_fast.o +0 -0
- data/vendor/zstd/lib/compress/zstd_lazy.o +0 -0
- data/vendor/zstd/lib/compress/zstd_ldm.o +0 -0
- data/vendor/zstd/lib/compress/zstd_opt.o +0 -0
- data/vendor/zstd/lib/compress/zstdmt_compress.o +0 -0
- data/vendor/zstd/lib/decompress/huf_decompress.o +0 -0
- data/vendor/zstd/lib/decompress/zstd_decompress_block.o +0 -0
- data/vendor/zstd/lib/dll/example/build_package.bat +0 -55
- data/vendor/zstd/lib/install_oses.mk +0 -17
- data/vendor/zstd/tests/cli-tests/bin/unzstd +0 -1
- data/vendor/zstd/tests/cli-tests/bin/zstdcat +0 -1
- data/vendor/zstd/tests/cli-tests/determinism/basic.sh +0 -36
- data/vendor/zstd/tests/cli-tests/determinism/basic.sh.stderr.exact +0 -0
- data/vendor/zstd/tests/cli-tests/determinism/basic.sh.stdout.exact +0 -880
- data/vendor/zstd/tests/cli-tests/determinism/multithread.sh +0 -45
- data/vendor/zstd/tests/cli-tests/determinism/multithread.sh.stderr.exact +0 -0
- data/vendor/zstd/tests/cli-tests/determinism/multithread.sh.stdout.exact +0 -260
- data/vendor/zstd/tests/cli-tests/determinism/reuse.sh +0 -44
- data/vendor/zstd/tests/cli-tests/determinism/reuse.sh.stderr.exact +0 -0
- data/vendor/zstd/tests/cli-tests/determinism/reuse.sh.stdout.exact +0 -19
- data/vendor/zstd/tests/cli-tests/determinism/setup +0 -5
- data/vendor/zstd/tests/cli-tests/determinism/setup_once +0 -30
- data/vendor/zstd/tests/cli-tests/dict-builder/no-inputs.sh.stderr.exact +0 -5
- data/vendor/zstd/tests/test_process_substitution.bash +0 -92
- /data/{vendor → ext/zstd_native}/zstd/CHANGELOG +0 -0
- /data/{vendor → ext/zstd_native}/zstd/CODE_OF_CONDUCT.md +0 -0
- /data/{vendor → ext/zstd_native}/zstd/COPYING +0 -0
- /data/{vendor → ext/zstd_native}/zstd/LICENSE +0 -0
- /data/{vendor → ext/zstd_native}/zstd/Package.swift +0 -0
- /data/{vendor → ext/zstd_native}/zstd/SECURITY.md +0 -0
- /data/{vendor → ext/zstd_native}/zstd/TESTING.md +0 -0
- /data/{vendor → ext/zstd_native}/zstd/build/LICENSE +0 -0
- /data/{vendor → ext/zstd_native}/zstd/build/README.md +0 -0
- /data/{vendor → ext/zstd_native}/zstd/build/VS2008/fullbench/fullbench.vcproj +0 -0
- /data/{vendor → ext/zstd_native}/zstd/build/VS2008/fuzzer/fuzzer.vcproj +0 -0
- /data/{vendor → ext/zstd_native}/zstd/build/VS2008/zstd/zstd.vcproj +0 -0
- /data/{vendor → ext/zstd_native}/zstd/build/VS2008/zstd.sln +0 -0
- /data/{vendor → ext/zstd_native}/zstd/build/VS2008/zstdlib/zstdlib.vcproj +0 -0
- /data/{vendor → ext/zstd_native}/zstd/build/VS2010/CompileAsCpp.props +0 -0
- /data/{vendor → ext/zstd_native}/zstd/build/VS2010/datagen/datagen.vcxproj +0 -0
- /data/{vendor → ext/zstd_native}/zstd/build/VS2010/fullbench/fullbench.vcxproj +0 -0
- /data/{vendor → ext/zstd_native}/zstd/build/VS2010/fuzzer/fuzzer.vcxproj +0 -0
- /data/{vendor → ext/zstd_native}/zstd/build/VS2010/libzstd/libzstd.vcxproj +0 -0
- /data/{vendor → ext/zstd_native}/zstd/build/VS2010/libzstd-dll/libzstd-dll.rc +0 -0
- /data/{vendor → ext/zstd_native}/zstd/build/VS2010/libzstd-dll/libzstd-dll.vcxproj +0 -0
- /data/{vendor → ext/zstd_native}/zstd/build/VS2010/zstd/zstd.rc +0 -0
- /data/{vendor → ext/zstd_native}/zstd/build/VS2010/zstd/zstd.vcxproj +0 -0
- /data/{vendor → ext/zstd_native}/zstd/build/VS2010/zstd.sln +0 -0
- /data/{vendor → ext/zstd_native}/zstd/build/VS_scripts/README.md +0 -0
- /data/{vendor → ext/zstd_native}/zstd/build/VS_scripts/build.VS2010.cmd +0 -0
- /data/{vendor → ext/zstd_native}/zstd/build/VS_scripts/build.VS2012.cmd +0 -0
- /data/{vendor → ext/zstd_native}/zstd/build/VS_scripts/build.VS2013.cmd +0 -0
- /data/{vendor → ext/zstd_native}/zstd/build/VS_scripts/build.VS2015.cmd +0 -0
- /data/{vendor → ext/zstd_native}/zstd/build/VS_scripts/build.VS2017.cmd +0 -0
- /data/{vendor → ext/zstd_native}/zstd/build/VS_scripts/build.VS2017Community.cmd +0 -0
- /data/{vendor → ext/zstd_native}/zstd/build/VS_scripts/build.VS2017Enterprise.cmd +0 -0
- /data/{vendor → ext/zstd_native}/zstd/build/VS_scripts/build.VS2017Professional.cmd +0 -0
- /data/{vendor → ext/zstd_native}/zstd/build/VS_scripts/build.VSPreview.cmd +0 -0
- /data/{vendor → ext/zstd_native}/zstd/build/VS_scripts/build.generic.cmd +0 -0
- /data/{vendor → ext/zstd_native}/zstd/build/cmake/CMakeModules/FindLibLZ4.cmake +0 -0
- /data/{vendor → ext/zstd_native}/zstd/build/cmake/CMakeModules/GetZstdLibraryVersion.cmake +0 -0
- /data/{vendor → ext/zstd_native}/zstd/build/cmake/CMakeModules/JoinPaths.cmake +0 -0
- /data/{vendor → ext/zstd_native}/zstd/build/cmake/contrib/CMakeLists.txt +0 -0
- /data/{vendor → ext/zstd_native}/zstd/build/cmake/contrib/gen_html/CMakeLists.txt +0 -0
- /data/{vendor → ext/zstd_native}/zstd/build/cmake/contrib/pzstd/CMakeLists.txt +0 -0
- /data/{vendor → ext/zstd_native}/zstd/build/cmake/lib/cmake_uninstall.cmake.in +0 -0
- /data/{vendor → ext/zstd_native}/zstd/build/cmake/programs/CMakeLists.txt +0 -0
- /data/{vendor → ext/zstd_native}/zstd/build/cmake/tests/CMakeLists.txt +0 -0
- /data/{vendor → ext/zstd_native}/zstd/build/cmake/zstdConfig.cmake.in +0 -0
- /data/{vendor → ext/zstd_native}/zstd/build/meson/GetZstdLibraryVersion.py +0 -0
- /data/{vendor → ext/zstd_native}/zstd/build/meson/InstallSymlink.py +0 -0
- /data/{vendor → ext/zstd_native}/zstd/build/meson/README.md +0 -0
- /data/{vendor → ext/zstd_native}/zstd/build/meson/contrib/gen_html/meson.build +0 -0
- /data/{vendor → ext/zstd_native}/zstd/build/meson/contrib/meson.build +0 -0
- /data/{vendor → ext/zstd_native}/zstd/build/meson/contrib/pzstd/meson.build +0 -0
- /data/{vendor → ext/zstd_native}/zstd/build/meson/meson_options.txt +0 -0
- /data/{vendor → ext/zstd_native}/zstd/build/meson/programs/meson.build +0 -0
- /data/{vendor → ext/zstd_native}/zstd/build/meson/tests/meson.build +0 -0
- /data/{vendor → ext/zstd_native}/zstd/build/meson/tests/valgrindTest.py +0 -0
- /data/{vendor → ext/zstd_native}/zstd/build/single_file_libs/README.md +0 -0
- /data/{vendor → ext/zstd_native}/zstd/build/single_file_libs/build_decoder_test.sh +0 -0
- /data/{vendor → ext/zstd_native}/zstd/build/single_file_libs/build_library_test.sh +0 -0
- /data/{vendor → ext/zstd_native}/zstd/build/single_file_libs/combine.py +0 -0
- /data/{vendor → ext/zstd_native}/zstd/build/single_file_libs/combine.sh +0 -0
- /data/{vendor → ext/zstd_native}/zstd/build/single_file_libs/create_single_file_decoder.sh +0 -0
- /data/{vendor → ext/zstd_native}/zstd/build/single_file_libs/create_single_file_library.sh +0 -0
- /data/{vendor → ext/zstd_native}/zstd/build/single_file_libs/examples/README.md +0 -0
- /data/{vendor → ext/zstd_native}/zstd/build/single_file_libs/examples/emscripten.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/build/single_file_libs/examples/roundtrip.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/build/single_file_libs/examples/shell.html +0 -0
- /data/{vendor → ext/zstd_native}/zstd/build/single_file_libs/examples/simple.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/build/single_file_libs/examples/testcard-dxt1.inl +0 -0
- /data/{vendor → ext/zstd_native}/zstd/build/single_file_libs/examples/testcard-zstd.inl +0 -0
- /data/{vendor → ext/zstd_native}/zstd/build/single_file_libs/examples/testcard.png +0 -0
- /data/{vendor → ext/zstd_native}/zstd/build/single_file_libs/zstd-in.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/build/single_file_libs/zstddeclib-in.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/contrib/VS2005/README.md +0 -0
- /data/{vendor → ext/zstd_native}/zstd/contrib/VS2005/fullbench/fullbench.vcproj +0 -0
- /data/{vendor → ext/zstd_native}/zstd/contrib/VS2005/fuzzer/fuzzer.vcproj +0 -0
- /data/{vendor → ext/zstd_native}/zstd/contrib/VS2005/zstd/zstd.vcproj +0 -0
- /data/{vendor → ext/zstd_native}/zstd/contrib/VS2005/zstd.sln +0 -0
- /data/{vendor → ext/zstd_native}/zstd/contrib/VS2005/zstdlib/zstdlib.vcproj +0 -0
- /data/{vendor → ext/zstd_native}/zstd/contrib/cleanTabs +0 -0
- /data/{vendor → ext/zstd_native}/zstd/contrib/diagnose_corruption/Makefile +0 -0
- /data/{vendor → ext/zstd_native}/zstd/contrib/diagnose_corruption/check_flipped_bits.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/contrib/docker/Dockerfile +0 -0
- /data/{vendor → ext/zstd_native}/zstd/contrib/docker/README.md +0 -0
- /data/{vendor → ext/zstd_native}/zstd/contrib/externalSequenceProducer/Makefile +0 -0
- /data/{vendor → ext/zstd_native}/zstd/contrib/externalSequenceProducer/README.md +0 -0
- /data/{vendor → ext/zstd_native}/zstd/contrib/externalSequenceProducer/sequence_producer.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/contrib/externalSequenceProducer/sequence_producer.h +0 -0
- /data/{vendor → ext/zstd_native}/zstd/contrib/freestanding_lib/freestanding.py +0 -0
- /data/{vendor → ext/zstd_native}/zstd/contrib/gen_html/Makefile +0 -0
- /data/{vendor → ext/zstd_native}/zstd/contrib/gen_html/README.md +0 -0
- /data/{vendor → ext/zstd_native}/zstd/contrib/gen_html/gen-zstd-manual.sh +0 -0
- /data/{vendor → ext/zstd_native}/zstd/contrib/gen_html/gen_html.cpp +0 -0
- /data/{vendor → ext/zstd_native}/zstd/contrib/largeNbDicts/Makefile +0 -0
- /data/{vendor → ext/zstd_native}/zstd/contrib/largeNbDicts/README.md +0 -0
- /data/{vendor → ext/zstd_native}/zstd/contrib/linux-kernel/Makefile +0 -0
- /data/{vendor → ext/zstd_native}/zstd/contrib/linux-kernel/README.md +0 -0
- /data/{vendor → ext/zstd_native}/zstd/contrib/linux-kernel/btrfs-benchmark.sh +0 -0
- /data/{vendor → ext/zstd_native}/zstd/contrib/linux-kernel/btrfs-extract-benchmark.sh +0 -0
- /data/{vendor → ext/zstd_native}/zstd/contrib/linux-kernel/decompress_sources.h +0 -0
- /data/{vendor → ext/zstd_native}/zstd/contrib/linux-kernel/linux.mk +0 -0
- /data/{vendor → ext/zstd_native}/zstd/contrib/linux-kernel/mem.h +0 -0
- /data/{vendor → ext/zstd_native}/zstd/contrib/linux-kernel/squashfs-benchmark.sh +0 -0
- /data/{vendor → ext/zstd_native}/zstd/contrib/linux-kernel/test/Makefile +0 -0
- /data/{vendor → ext/zstd_native}/zstd/contrib/linux-kernel/test/include/linux/compiler.h +0 -0
- /data/{vendor → ext/zstd_native}/zstd/contrib/linux-kernel/test/include/linux/errno.h +0 -0
- /data/{vendor → ext/zstd_native}/zstd/contrib/linux-kernel/test/include/linux/kernel.h +0 -0
- /data/{vendor → ext/zstd_native}/zstd/contrib/linux-kernel/test/include/linux/limits.h +0 -0
- /data/{vendor → ext/zstd_native}/zstd/contrib/linux-kernel/test/include/linux/math64.h +0 -0
- /data/{vendor → ext/zstd_native}/zstd/contrib/linux-kernel/test/include/linux/module.h +0 -0
- /data/{vendor → ext/zstd_native}/zstd/contrib/linux-kernel/test/include/linux/printk.h +0 -0
- /data/{vendor → ext/zstd_native}/zstd/contrib/linux-kernel/test/include/linux/stddef.h +0 -0
- /data/{vendor → ext/zstd_native}/zstd/contrib/linux-kernel/test/include/linux/swab.h +0 -0
- /data/{vendor → ext/zstd_native}/zstd/contrib/linux-kernel/test/include/linux/types.h +0 -0
- /data/{vendor → ext/zstd_native}/zstd/contrib/linux-kernel/test/include/linux/unaligned.h +0 -0
- /data/{vendor → ext/zstd_native}/zstd/contrib/linux-kernel/test/include/linux/xxhash.h +0 -0
- /data/{vendor → ext/zstd_native}/zstd/contrib/linux-kernel/test/macro-test.sh +0 -0
- /data/{vendor → ext/zstd_native}/zstd/contrib/linux-kernel/test/static_test.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/contrib/linux-kernel/test/test.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/contrib/linux-kernel/zstd_common_module.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/contrib/linux-kernel/zstd_deps.h +0 -0
- /data/{vendor → ext/zstd_native}/zstd/contrib/match_finders/README.md +0 -0
- /data/{vendor → ext/zstd_native}/zstd/contrib/match_finders/zstd_edist.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/contrib/match_finders/zstd_edist.h +0 -0
- /data/{vendor → ext/zstd_native}/zstd/contrib/premake/premake4.lua +0 -0
- /data/{vendor → ext/zstd_native}/zstd/contrib/pzstd/BUCK +0 -0
- /data/{vendor → ext/zstd_native}/zstd/contrib/pzstd/ErrorHolder.h +0 -0
- /data/{vendor → ext/zstd_native}/zstd/contrib/pzstd/Makefile +0 -0
- /data/{vendor → ext/zstd_native}/zstd/contrib/pzstd/Options.cpp +0 -0
- /data/{vendor → ext/zstd_native}/zstd/contrib/pzstd/Options.h +0 -0
- /data/{vendor → ext/zstd_native}/zstd/contrib/pzstd/Pzstd.cpp +0 -0
- /data/{vendor → ext/zstd_native}/zstd/contrib/pzstd/Pzstd.h +0 -0
- /data/{vendor → ext/zstd_native}/zstd/contrib/pzstd/README.md +0 -0
- /data/{vendor → ext/zstd_native}/zstd/contrib/pzstd/SkippableFrame.cpp +0 -0
- /data/{vendor → ext/zstd_native}/zstd/contrib/pzstd/SkippableFrame.h +0 -0
- /data/{vendor → ext/zstd_native}/zstd/contrib/pzstd/images/Cspeed.png +0 -0
- /data/{vendor → ext/zstd_native}/zstd/contrib/pzstd/images/Dspeed.png +0 -0
- /data/{vendor → ext/zstd_native}/zstd/contrib/pzstd/main.cpp +0 -0
- /data/{vendor → ext/zstd_native}/zstd/contrib/pzstd/test/BUCK +0 -0
- /data/{vendor → ext/zstd_native}/zstd/contrib/pzstd/test/OptionsTest.cpp +0 -0
- /data/{vendor → ext/zstd_native}/zstd/contrib/pzstd/test/PzstdTest.cpp +0 -0
- /data/{vendor → ext/zstd_native}/zstd/contrib/pzstd/test/RoundTrip.h +0 -0
- /data/{vendor → ext/zstd_native}/zstd/contrib/pzstd/test/RoundTripTest.cpp +0 -0
- /data/{vendor → ext/zstd_native}/zstd/contrib/pzstd/utils/BUCK +0 -0
- /data/{vendor → ext/zstd_native}/zstd/contrib/pzstd/utils/Buffer.h +0 -0
- /data/{vendor → ext/zstd_native}/zstd/contrib/pzstd/utils/FileSystem.h +0 -0
- /data/{vendor → ext/zstd_native}/zstd/contrib/pzstd/utils/Likely.h +0 -0
- /data/{vendor → ext/zstd_native}/zstd/contrib/pzstd/utils/Portability.h +0 -0
- /data/{vendor → ext/zstd_native}/zstd/contrib/pzstd/utils/Range.h +0 -0
- /data/{vendor → ext/zstd_native}/zstd/contrib/pzstd/utils/ResourcePool.h +0 -0
- /data/{vendor → ext/zstd_native}/zstd/contrib/pzstd/utils/ScopeGuard.h +0 -0
- /data/{vendor → ext/zstd_native}/zstd/contrib/pzstd/utils/ThreadPool.h +0 -0
- /data/{vendor → ext/zstd_native}/zstd/contrib/pzstd/utils/WorkQueue.h +0 -0
- /data/{vendor → ext/zstd_native}/zstd/contrib/pzstd/utils/test/BUCK +0 -0
- /data/{vendor → ext/zstd_native}/zstd/contrib/pzstd/utils/test/BufferTest.cpp +0 -0
- /data/{vendor → ext/zstd_native}/zstd/contrib/pzstd/utils/test/RangeTest.cpp +0 -0
- /data/{vendor → ext/zstd_native}/zstd/contrib/pzstd/utils/test/ResourcePoolTest.cpp +0 -0
- /data/{vendor → ext/zstd_native}/zstd/contrib/pzstd/utils/test/ScopeGuardTest.cpp +0 -0
- /data/{vendor → ext/zstd_native}/zstd/contrib/pzstd/utils/test/ThreadPoolTest.cpp +0 -0
- /data/{vendor → ext/zstd_native}/zstd/contrib/pzstd/utils/test/WorkQueueTest.cpp +0 -0
- /data/{vendor → ext/zstd_native}/zstd/contrib/recovery/Makefile +0 -0
- /data/{vendor → ext/zstd_native}/zstd/contrib/recovery/recover_directory.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/contrib/seekable_format/README.md +0 -0
- /data/{vendor → ext/zstd_native}/zstd/contrib/seekable_format/examples/seekable_compression.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/contrib/seekable_format/examples/seekable_decompression.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/contrib/seekable_format/examples/seekable_decompression_mem.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/contrib/seekable_format/zstd_seekable.h +0 -0
- /data/{vendor → ext/zstd_native}/zstd/contrib/seekable_format/zstd_seekable_compression_format.md +0 -0
- /data/{vendor → ext/zstd_native}/zstd/contrib/seekable_format/zstdseek_compress.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/contrib/seekable_format/zstdseek_decompress.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/contrib/seqBench/Makefile +0 -0
- /data/{vendor → ext/zstd_native}/zstd/contrib/seqBench/seqBench.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/contrib/snap/snapcraft.yaml +0 -0
- /data/{vendor → ext/zstd_native}/zstd/doc/README.md +0 -0
- /data/{vendor → ext/zstd_native}/zstd/doc/decompressor_errata.md +0 -0
- /data/{vendor → ext/zstd_native}/zstd/doc/decompressor_permissive.md +0 -0
- /data/{vendor → ext/zstd_native}/zstd/doc/educational_decoder/Makefile +0 -0
- /data/{vendor → ext/zstd_native}/zstd/doc/educational_decoder/README.md +0 -0
- /data/{vendor → ext/zstd_native}/zstd/doc/educational_decoder/harness.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/doc/educational_decoder/zstd_decompress.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/doc/educational_decoder/zstd_decompress.h +0 -0
- /data/{vendor → ext/zstd_native}/zstd/doc/images/CSpeed2.png +0 -0
- /data/{vendor → ext/zstd_native}/zstd/doc/images/DCspeed5.png +0 -0
- /data/{vendor → ext/zstd_native}/zstd/doc/images/DSpeed3.png +0 -0
- /data/{vendor → ext/zstd_native}/zstd/doc/images/cdict_v136.png +0 -0
- /data/{vendor → ext/zstd_native}/zstd/doc/images/dict-cr.png +0 -0
- /data/{vendor → ext/zstd_native}/zstd/doc/images/dict-cs.png +0 -0
- /data/{vendor → ext/zstd_native}/zstd/doc/images/dict-ds.png +0 -0
- /data/{vendor → ext/zstd_native}/zstd/doc/images/zstd_cdict_v1_3_5.png +0 -0
- /data/{vendor → ext/zstd_native}/zstd/doc/images/zstd_logo86.png +0 -0
- /data/{vendor → ext/zstd_native}/zstd/examples/Makefile +0 -0
- /data/{vendor → ext/zstd_native}/zstd/examples/README.md +0 -0
- /data/{vendor → ext/zstd_native}/zstd/examples/common.h +0 -0
- /data/{vendor → ext/zstd_native}/zstd/examples/dictionary_compression.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/examples/dictionary_decompression.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/examples/multiple_simple_compression.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/examples/multiple_streaming_compression.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/examples/simple_compression.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/examples/simple_decompression.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/examples/streaming_compression.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/examples/streaming_compression_thread_pool.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/examples/streaming_decompression.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/examples/streaming_memory_usage.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/lib/BUCK +0 -0
- /data/{vendor → ext/zstd_native}/zstd/lib/common/allocations.h +0 -0
- /data/{vendor → ext/zstd_native}/zstd/lib/common/bitstream.h +0 -0
- /data/{vendor → ext/zstd_native}/zstd/lib/common/cpu.h +0 -0
- /data/{vendor → ext/zstd_native}/zstd/lib/common/debug.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/lib/common/debug.h +0 -0
- /data/{vendor → ext/zstd_native}/zstd/lib/common/entropy_common.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/lib/common/error_private.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/lib/common/error_private.h +0 -0
- /data/{vendor → ext/zstd_native}/zstd/lib/common/fse.h +0 -0
- /data/{vendor → ext/zstd_native}/zstd/lib/common/fse_decompress.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/lib/common/huf.h +0 -0
- /data/{vendor → ext/zstd_native}/zstd/lib/common/mem.h +0 -0
- /data/{vendor → ext/zstd_native}/zstd/lib/common/pool.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/lib/common/pool.h +0 -0
- /data/{vendor → ext/zstd_native}/zstd/lib/common/threading.h +0 -0
- /data/{vendor → ext/zstd_native}/zstd/lib/common/xxhash.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/lib/common/xxhash.h +0 -0
- /data/{vendor → ext/zstd_native}/zstd/lib/common/zstd_deps.h +0 -0
- /data/{vendor → ext/zstd_native}/zstd/lib/common/zstd_trace.h +0 -0
- /data/{vendor → ext/zstd_native}/zstd/lib/compress/clevels.h +0 -0
- /data/{vendor → ext/zstd_native}/zstd/lib/compress/fse_compress.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/lib/compress/zstd_compress_literals.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/lib/compress/zstd_compress_literals.h +0 -0
- /data/{vendor → ext/zstd_native}/zstd/lib/compress/zstd_compress_sequences.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/lib/compress/zstd_compress_sequences.h +0 -0
- /data/{vendor → ext/zstd_native}/zstd/lib/compress/zstd_compress_superblock.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/lib/compress/zstd_compress_superblock.h +0 -0
- /data/{vendor → ext/zstd_native}/zstd/lib/compress/zstd_cwksp.h +0 -0
- /data/{vendor → ext/zstd_native}/zstd/lib/compress/zstd_double_fast.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/lib/compress/zstd_double_fast.h +0 -0
- /data/{vendor → ext/zstd_native}/zstd/lib/compress/zstd_fast.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/lib/compress/zstd_fast.h +0 -0
- /data/{vendor → ext/zstd_native}/zstd/lib/compress/zstd_lazy.h +0 -0
- /data/{vendor → ext/zstd_native}/zstd/lib/compress/zstd_ldm.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/lib/compress/zstd_ldm.h +0 -0
- /data/{vendor → ext/zstd_native}/zstd/lib/compress/zstd_ldm_geartab.h +0 -0
- /data/{vendor → ext/zstd_native}/zstd/lib/compress/zstd_opt.h +0 -0
- /data/{vendor → ext/zstd_native}/zstd/lib/compress/zstd_preSplit.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/lib/compress/zstd_preSplit.h +0 -0
- /data/{vendor → ext/zstd_native}/zstd/lib/compress/zstdmt_compress.h +0 -0
- /data/{vendor → ext/zstd_native}/zstd/lib/decompress/zstd_ddict.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/lib/decompress/zstd_ddict.h +0 -0
- /data/{vendor → ext/zstd_native}/zstd/lib/decompress/zstd_decompress.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/lib/decompress/zstd_decompress_block.h +0 -0
- /data/{vendor → ext/zstd_native}/zstd/lib/decompress/zstd_decompress_internal.h +0 -0
- /data/{vendor → ext/zstd_native}/zstd/lib/deprecated/zbuff.h +0 -0
- /data/{vendor → ext/zstd_native}/zstd/lib/deprecated/zbuff_common.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/lib/deprecated/zbuff_compress.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/lib/deprecated/zbuff_decompress.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/lib/dictBuilder/cover.h +0 -0
- /data/{vendor → ext/zstd_native}/zstd/lib/dictBuilder/divsufsort.h +0 -0
- /data/{vendor → ext/zstd_native}/zstd/lib/dll/example/Makefile +0 -0
- /data/{vendor → ext/zstd_native}/zstd/lib/dll/example/README.md +0 -0
- /data/{vendor → ext/zstd_native}/zstd/lib/dll/example/fullbench-dll.sln +0 -0
- /data/{vendor → ext/zstd_native}/zstd/lib/dll/example/fullbench-dll.vcxproj +0 -0
- /data/{vendor → ext/zstd_native}/zstd/lib/legacy/zstd_legacy.h +0 -0
- /data/{vendor → ext/zstd_native}/zstd/lib/legacy/zstd_v01.h +0 -0
- /data/{vendor → ext/zstd_native}/zstd/lib/legacy/zstd_v02.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/lib/legacy/zstd_v02.h +0 -0
- /data/{vendor → ext/zstd_native}/zstd/lib/legacy/zstd_v03.h +0 -0
- /data/{vendor → ext/zstd_native}/zstd/lib/legacy/zstd_v04.h +0 -0
- /data/{vendor → ext/zstd_native}/zstd/lib/legacy/zstd_v05.h +0 -0
- /data/{vendor → ext/zstd_native}/zstd/lib/legacy/zstd_v06.h +0 -0
- /data/{vendor → ext/zstd_native}/zstd/lib/legacy/zstd_v07.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/lib/legacy/zstd_v07.h +0 -0
- /data/{vendor → ext/zstd_native}/zstd/lib/module.modulemap +0 -0
- /data/{vendor → ext/zstd_native}/zstd/lib/zdict.h +0 -0
- /data/{vendor → ext/zstd_native}/zstd/lib/zstd_errors.h +0 -0
- /data/{vendor → ext/zstd_native}/zstd/programs/BUCK +0 -0
- /data/{vendor → ext/zstd_native}/zstd/programs/benchfn.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/programs/benchfn.h +0 -0
- /data/{vendor → ext/zstd_native}/zstd/programs/datagen.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/programs/datagen.h +0 -0
- /data/{vendor → ext/zstd_native}/zstd/programs/dibio.h +0 -0
- /data/{vendor → ext/zstd_native}/zstd/programs/fileio_asyncio.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/programs/fileio_asyncio.h +0 -0
- /data/{vendor → ext/zstd_native}/zstd/programs/fileio_common.h +0 -0
- /data/{vendor → ext/zstd_native}/zstd/programs/lorem.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/programs/lorem.h +0 -0
- /data/{vendor → ext/zstd_native}/zstd/programs/platform.h +0 -0
- /data/{vendor → ext/zstd_native}/zstd/programs/timefn.h +0 -0
- /data/{vendor → ext/zstd_native}/zstd/programs/windres/verrsrc.h +0 -0
- /data/{vendor → ext/zstd_native}/zstd/programs/windres/zstd.rc +0 -0
- /data/{vendor → ext/zstd_native}/zstd/programs/windres/zstd32.res +0 -0
- /data/{vendor → ext/zstd_native}/zstd/programs/windres/zstd64.res +0 -0
- /data/{vendor → ext/zstd_native}/zstd/programs/zstdcli_trace.h +0 -0
- /data/{vendor → ext/zstd_native}/zstd/programs/zstdgrep +0 -0
- /data/{vendor → ext/zstd_native}/zstd/programs/zstdgrep.1.md +0 -0
- /data/{vendor → ext/zstd_native}/zstd/programs/zstdless +0 -0
- /data/{vendor → ext/zstd_native}/zstd/programs/zstdless.1.md +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/DEPRECATED-test-zstd-speed.py +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/README.md +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/checkTag.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/check_size.py +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/cli-tests/README.md +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/cli-tests/basic/args.sh +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/cli-tests/basic/args.sh.exit +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/cli-tests/basic/args.sh.stderr.glob +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/cli-tests/basic/help.sh +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/cli-tests/basic/memlimit.sh +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/cli-tests/basic/memlimit.sh.stderr.exact +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/cli-tests/basic/memlimit.sh.stdout.exact +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/cli-tests/basic/output_dir.sh +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/cli-tests/basic/output_dir.sh.stderr.exact +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/cli-tests/basic/output_dir.sh.stdout.exact +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/cli-tests/basic/version.sh +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/cli-tests/basic/version.sh.stdout.glob +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/cli-tests/bin/cmp_size +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/cli-tests/bin/datagen +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/cli-tests/bin/die +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/cli-tests/bin/println +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/cli-tests/bin/zstd +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/cli-tests/bin/zstdgrep +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/cli-tests/bin/zstdless +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/cli-tests/cltools/setup +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/cli-tests/cltools/zstdgrep.sh +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/cli-tests/cltools/zstdgrep.sh.exit +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/cli-tests/cltools/zstdgrep.sh.stderr.exact +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/cli-tests/cltools/zstdgrep.sh.stdout.glob +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/cli-tests/cltools/zstdless.sh +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/cli-tests/cltools/zstdless.sh.stderr.exact +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/cli-tests/cltools/zstdless.sh.stdout.glob +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/cli-tests/common/format.sh +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/cli-tests/common/mtime.sh +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/cli-tests/common/permissions.sh +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/cli-tests/compression/adapt.sh +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/cli-tests/compression/basic.sh +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/cli-tests/compression/compress-literals.sh +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/cli-tests/compression/format.sh +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/cli-tests/compression/golden.sh +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/cli-tests/compression/gzip-compat.sh +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/cli-tests/compression/levels.sh +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/cli-tests/compression/levels.sh.stderr.exact +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/cli-tests/compression/long-distance-matcher.sh +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/cli-tests/compression/multiple-files.sh +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/cli-tests/compression/multiple-files.sh.stdout.exact +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/cli-tests/compression/row-match-finder.sh +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/cli-tests/compression/setup +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/cli-tests/compression/stream-size.sh +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/cli-tests/compression/verbose-wlog.sh +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/cli-tests/compression/verbose-wlog.sh.stderr.glob +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/cli-tests/compression/verbose-wlog.sh.stdout.glob +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/cli-tests/compression/window-resize.sh +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/cli-tests/compression/window-resize.sh.stderr.ignore +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/cli-tests/compression/window-resize.sh.stdout.glob +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/cli-tests/decompression/detectErrors.sh +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/cli-tests/decompression/golden.sh +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/cli-tests/decompression/pass-through.sh +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/cli-tests/decompression/pass-through.sh.stderr.exact +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/cli-tests/decompression/pass-through.sh.stdout.exact +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/cli-tests/dict-builder/empty-input.sh +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/cli-tests/dict-builder/empty-input.sh.stderr.exact +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/cli-tests/dict-builder/no-inputs.sh +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/cli-tests/dict-builder/no-inputs.sh.exit +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/cli-tests/dictionaries/dictionary-mismatch.sh +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/cli-tests/dictionaries/dictionary-mismatch.sh.stderr.exact +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/cli-tests/dictionaries/golden.sh +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/cli-tests/dictionaries/setup +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/cli-tests/dictionaries/setup_once +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/cli-tests/file-handling/directory-mirror.sh +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/cli-tests/file-handling/directory-mirror.sh.stderr.exact +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/cli-tests/file-handling/directory-mirror.sh.stdout.exact +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/cli-tests/file-stat/compress-file-to-dir-without-write-perm.sh +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/cli-tests/file-stat/compress-file-to-file.sh +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/cli-tests/file-stat/compress-file-to-stdout.sh +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/cli-tests/file-stat/compress-file-to-stdout.sh.stderr.exact +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/cli-tests/file-stat/compress-stdin-to-file.sh +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/cli-tests/file-stat/compress-stdin-to-stdout.sh +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/cli-tests/file-stat/compress-stdin-to-stdout.sh.stderr.exact +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/cli-tests/file-stat/decompress-file-to-file.sh +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/cli-tests/file-stat/decompress-file-to-stdout.sh +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/cli-tests/file-stat/decompress-file-to-stdout.sh.stderr.exact +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/cli-tests/file-stat/decompress-stdin-to-file.sh +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/cli-tests/file-stat/decompress-stdin-to-stdout.sh +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/cli-tests/file-stat/decompress-stdin-to-stdout.sh.stderr.exact +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/cli-tests/progress/no-progress.sh +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/cli-tests/progress/no-progress.sh.stderr.glob +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/cli-tests/progress/progress.sh +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/cli-tests/progress/progress.sh.stderr.glob +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/cli-tests/zstd-symlinks/setup +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/cli-tests/zstd-symlinks/zstdcat.sh +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/cli-tests/zstd-symlinks/zstdcat.sh.stdout.exact +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/datagencli.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/decodecorpus.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/dict-files/zero-weight-dict +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/external_matchfinder.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/external_matchfinder.h +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/fuzz/Makefile +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/fuzz/README.md +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/fuzz/block_decompress.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/fuzz/block_round_trip.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/fuzz/decompress_cross_format.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/fuzz/decompress_dstSize_tooSmall.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/fuzz/dictionary_decompress.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/fuzz/dictionary_loader.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/fuzz/dictionary_round_trip.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/fuzz/dictionary_stream_round_trip.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/fuzz/fse_read_ncount.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/fuzz/fuzz.h +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/fuzz/fuzz.py +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/fuzz/fuzz_data_producer.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/fuzz/fuzz_data_producer.h +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/fuzz/fuzz_third_party_seq_prod.h +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/fuzz/generate_sequences.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/fuzz/huf_decompress.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/fuzz/huf_round_trip.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/fuzz/raw_dictionary_round_trip.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/fuzz/regression_driver.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/fuzz/seekable_roundtrip.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/fuzz/seq_prod_fuzz_example/Makefile +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/fuzz/seq_prod_fuzz_example/README.md +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/fuzz/seq_prod_fuzz_example/example_seq_prod.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/fuzz/sequence_compression_api.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/fuzz/simple_compress.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/fuzz/simple_decompress.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/fuzz/simple_round_trip.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/fuzz/stream_decompress.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/fuzz/stream_round_trip.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/fuzz/zstd_frame_info.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/fuzz/zstd_helpers.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/fuzz/zstd_helpers.h +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/golden-compression/PR-3517-block-splitter-corruption-test +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/golden-compression/http +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/golden-compression/huffman-compressed-larger +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/golden-compression/large-literal-and-match-lengths +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/golden-decompression/block-128k.zst +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/golden-decompression/empty-block.zst +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/golden-decompression/rle-first-block.zst +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/golden-decompression/zeroSeq_2B.zst +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/golden-decompression-errors/off0.bin.zst +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/golden-decompression-errors/truncated_huff_state.zst +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/golden-decompression-errors/zeroSeq_extraneous.zst +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/golden-dictionaries/http-dict-missing-symbols +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/gzip/Makefile +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/gzip/gzip-env.sh +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/gzip/helin-segv.sh +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/gzip/help-version.sh +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/gzip/hufts-segv.gz +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/gzip/hufts.sh +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/gzip/init.cfg +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/gzip/init.sh +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/gzip/keep.sh +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/gzip/list.sh +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/gzip/memcpy-abuse.sh +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/gzip/mixed.sh +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/gzip/null-suffix-clobber.sh +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/gzip/stdin.sh +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/gzip/test-driver.sh +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/gzip/trailing-nul.sh +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/gzip/unpack-invalid.sh +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/gzip/z-suffix.sh +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/gzip/zdiff.sh +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/gzip/zgrep-context.sh +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/gzip/zgrep-f.sh +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/gzip/zgrep-signal.sh +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/gzip/znew-k.sh +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/invalidDictionaries.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/libzstd_builds.sh +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/loremOut.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/loremOut.h +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/poolTests.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/rateLimiter.py +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/regression/Makefile +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/regression/README.md +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/regression/config.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/regression/config.h +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/regression/data.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/regression/data.h +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/regression/levels.h +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/regression/method.h +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/regression/result.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/regression/result.h +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/regression/results.csv +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/regression/test.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/roundTripCrash.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/seqgen.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/seqgen.h +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/test-license.py +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/test-variants.sh +0 -0
- /data/{vendor → ext/zstd_native}/zstd/tests/test-zstd-versions.py +0 -0
- /data/{vendor → ext/zstd_native}/zstd/zlibWrapper/BUCK +0 -0
- /data/{vendor → ext/zstd_native}/zstd/zlibWrapper/Makefile +0 -0
- /data/{vendor → ext/zstd_native}/zstd/zlibWrapper/README.md +0 -0
- /data/{vendor → ext/zstd_native}/zstd/zlibWrapper/examples/example.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/zlibWrapper/examples/example_original.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/zlibWrapper/examples/fitblk.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/zlibWrapper/examples/fitblk_original.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/zlibWrapper/examples/minigzip.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/zlibWrapper/examples/zwrapbench.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/zlibWrapper/gzclose.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/zlibWrapper/gzcompatibility.h +0 -0
- /data/{vendor → ext/zstd_native}/zstd/zlibWrapper/gzguts.h +0 -0
- /data/{vendor → ext/zstd_native}/zstd/zlibWrapper/gzlib.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/zlibWrapper/gzread.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/zlibWrapper/gzwrite.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/zlibWrapper/zstd_zlibwrapper.c +0 -0
- /data/{vendor → ext/zstd_native}/zstd/zlibWrapper/zstd_zlibwrapper.h +0 -0
|
@@ -125,271 +125,6 @@ char const* FIO_lzmaVersion(void)
|
|
|
125
125
|
#define TEMPORARY_FILE_PERMISSIONS (0600)
|
|
126
126
|
#endif
|
|
127
127
|
|
|
128
|
-
|
|
129
|
-
#ifndef ZSTD_NOCOMPRESS
|
|
130
|
-
|
|
131
|
-
/* *************************************
|
|
132
|
-
* Synchronous compression IO helpers
|
|
133
|
-
* Lightweight wrapper used by compression paths to manage buffered
|
|
134
|
-
* reads/writes without the async job machinery.
|
|
135
|
-
***************************************/
|
|
136
|
-
typedef struct {
|
|
137
|
-
const FIO_prefs_t* prefs;
|
|
138
|
-
FILE* srcFile;
|
|
139
|
-
FILE* dstFile;
|
|
140
|
-
unsigned storedSkips;
|
|
141
|
-
U8* inBuffer;
|
|
142
|
-
size_t inCapacity;
|
|
143
|
-
U8* srcBuffer;
|
|
144
|
-
size_t srcBufferLoaded;
|
|
145
|
-
U8* outBuffer;
|
|
146
|
-
size_t outCapacity;
|
|
147
|
-
} FIO_SyncCompressIO;
|
|
148
|
-
|
|
149
|
-
static void FIO_SyncCompressIO_init(FIO_SyncCompressIO* io,
|
|
150
|
-
const FIO_prefs_t* prefs,
|
|
151
|
-
size_t inCapacity,
|
|
152
|
-
size_t outCapacity);
|
|
153
|
-
static void FIO_SyncCompressIO_destroy(FIO_SyncCompressIO* io);
|
|
154
|
-
static void FIO_SyncCompressIO_setSrc(FIO_SyncCompressIO* io, FILE* file);
|
|
155
|
-
static void FIO_SyncCompressIO_clearSrc(FIO_SyncCompressIO* io);
|
|
156
|
-
static void FIO_SyncCompressIO_setDst(FIO_SyncCompressIO* io, FILE* file);
|
|
157
|
-
static int FIO_SyncCompressIO_closeDst(FIO_SyncCompressIO* io);
|
|
158
|
-
static size_t FIO_SyncCompressIO_fillBuffer(FIO_SyncCompressIO* io, size_t minToHave);
|
|
159
|
-
static void FIO_SyncCompressIO_consumeBytes(FIO_SyncCompressIO* io, size_t n);
|
|
160
|
-
static void FIO_SyncCompressIO_commitOut(FIO_SyncCompressIO* io, const void* buffer, size_t size);
|
|
161
|
-
static void FIO_SyncCompressIO_finish(FIO_SyncCompressIO* io);
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
static unsigned FIO_sparseWrite(FILE* file,
|
|
165
|
-
const void* buffer, size_t bufferSize,
|
|
166
|
-
const FIO_prefs_t* const prefs,
|
|
167
|
-
unsigned storedSkips)
|
|
168
|
-
{
|
|
169
|
-
const size_t* const bufferT = (const size_t*)buffer; /* Buffer is supposed malloc'ed, hence aligned on size_t */
|
|
170
|
-
size_t bufferSizeT = bufferSize / sizeof(size_t);
|
|
171
|
-
const size_t* const bufferTEnd = bufferT + bufferSizeT;
|
|
172
|
-
const size_t* ptrT = bufferT;
|
|
173
|
-
static const size_t segmentSizeT = (32 KB) / sizeof(size_t); /* check every 32 KB */
|
|
174
|
-
|
|
175
|
-
if (prefs->testMode) return 0; /* do not output anything in test mode */
|
|
176
|
-
|
|
177
|
-
if (!prefs->sparseFileSupport) { /* normal write */
|
|
178
|
-
size_t const sizeCheck = fwrite(buffer, 1, bufferSize, file);
|
|
179
|
-
if (sizeCheck != bufferSize)
|
|
180
|
-
EXM_THROW(70, "Write error : cannot write block : %s",
|
|
181
|
-
strerror(errno));
|
|
182
|
-
return 0;
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
/* avoid int overflow */
|
|
186
|
-
if (storedSkips > 1 GB) {
|
|
187
|
-
if (LONG_SEEK(file, 1 GB, SEEK_CUR) != 0)
|
|
188
|
-
EXM_THROW(91, "1 GB skip error (sparse file support)");
|
|
189
|
-
storedSkips -= 1 GB;
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
while (ptrT < bufferTEnd) {
|
|
193
|
-
size_t nb0T;
|
|
194
|
-
|
|
195
|
-
/* adjust last segment if < 32 KB */
|
|
196
|
-
size_t seg0SizeT = segmentSizeT;
|
|
197
|
-
if (seg0SizeT > bufferSizeT) seg0SizeT = bufferSizeT;
|
|
198
|
-
bufferSizeT -= seg0SizeT;
|
|
199
|
-
|
|
200
|
-
/* count leading zeroes */
|
|
201
|
-
for (nb0T=0; (nb0T < seg0SizeT) && (ptrT[nb0T] == 0); nb0T++) ;
|
|
202
|
-
storedSkips += (unsigned)(nb0T * sizeof(size_t));
|
|
203
|
-
|
|
204
|
-
if (nb0T != seg0SizeT) { /* not all 0s */
|
|
205
|
-
size_t const nbNon0ST = seg0SizeT - nb0T;
|
|
206
|
-
/* skip leading zeros */
|
|
207
|
-
if (LONG_SEEK(file, storedSkips, SEEK_CUR) != 0)
|
|
208
|
-
EXM_THROW(92, "Sparse skip error ; try --no-sparse");
|
|
209
|
-
storedSkips = 0;
|
|
210
|
-
/* write the rest */
|
|
211
|
-
if (fwrite(ptrT + nb0T, sizeof(size_t), nbNon0ST, file) != nbNon0ST)
|
|
212
|
-
EXM_THROW(93, "Write error : cannot write block : %s",
|
|
213
|
-
strerror(errno));
|
|
214
|
-
}
|
|
215
|
-
ptrT += seg0SizeT;
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
{ static size_t const maskT = sizeof(size_t)-1;
|
|
219
|
-
if (bufferSize & maskT) {
|
|
220
|
-
/* size not multiple of sizeof(size_t) : implies end of block */
|
|
221
|
-
const char* const restStart = (const char*)bufferTEnd;
|
|
222
|
-
const char* restPtr = restStart;
|
|
223
|
-
const char* const restEnd = (const char*)buffer + bufferSize;
|
|
224
|
-
assert(restEnd > restStart && restEnd < restStart + sizeof(size_t));
|
|
225
|
-
for ( ; (restPtr < restEnd) && (*restPtr == 0); restPtr++) ;
|
|
226
|
-
storedSkips += (unsigned) (restPtr - restStart);
|
|
227
|
-
if (restPtr != restEnd) {
|
|
228
|
-
/* not all remaining bytes are 0 */
|
|
229
|
-
size_t const restSize = (size_t)(restEnd - restPtr);
|
|
230
|
-
if (LONG_SEEK(file, storedSkips, SEEK_CUR) != 0)
|
|
231
|
-
EXM_THROW(92, "Sparse skip error ; try --no-sparse");
|
|
232
|
-
if (fwrite(restPtr, 1, restSize, file) != restSize)
|
|
233
|
-
EXM_THROW(95, "Write error : cannot write end of decoded block : %s",
|
|
234
|
-
strerror(errno));
|
|
235
|
-
storedSkips = 0;
|
|
236
|
-
} } }
|
|
237
|
-
|
|
238
|
-
return storedSkips;
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
static void FIO_sparseWriteEnd(const FIO_prefs_t* const prefs, FILE* file, unsigned storedSkips)
|
|
242
|
-
{
|
|
243
|
-
if (file == NULL) return;
|
|
244
|
-
if (prefs->testMode) {
|
|
245
|
-
assert(storedSkips == 0);
|
|
246
|
-
return;
|
|
247
|
-
}
|
|
248
|
-
if (storedSkips>0) {
|
|
249
|
-
assert(prefs->sparseFileSupport > 0); /* storedSkips>0 implies sparse support is enabled */
|
|
250
|
-
if (LONG_SEEK(file, storedSkips-1, SEEK_CUR) != 0)
|
|
251
|
-
EXM_THROW(69, "Final skip error (sparse file support)");
|
|
252
|
-
/* last zero must be explicitly written,
|
|
253
|
-
* so that skipped ones get implicitly translated as zero by FS */
|
|
254
|
-
{ const char lastZeroByte[1] = { 0 };
|
|
255
|
-
if (fwrite(lastZeroByte, 1, 1, file) != 1)
|
|
256
|
-
EXM_THROW(69, "Write error : cannot write last zero : %s", strerror(errno));
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
static void FIO_SyncCompressIO_init(FIO_SyncCompressIO* io,
|
|
262
|
-
const FIO_prefs_t* prefs,
|
|
263
|
-
size_t inCapacity,
|
|
264
|
-
size_t outCapacity)
|
|
265
|
-
{
|
|
266
|
-
memset(io, 0, sizeof(*io));
|
|
267
|
-
io->prefs = prefs;
|
|
268
|
-
io->inCapacity = inCapacity;
|
|
269
|
-
io->outCapacity = outCapacity;
|
|
270
|
-
io->inBuffer = (U8*)malloc(inCapacity);
|
|
271
|
-
if (!io->inBuffer)
|
|
272
|
-
EXM_THROW(101, "Allocation error : not enough memory");
|
|
273
|
-
io->outBuffer = (U8*)malloc(outCapacity);
|
|
274
|
-
if (!io->outBuffer) {
|
|
275
|
-
free(io->inBuffer);
|
|
276
|
-
io->inBuffer = NULL;
|
|
277
|
-
EXM_THROW(101, "Allocation error : not enough memory");
|
|
278
|
-
}
|
|
279
|
-
io->srcBuffer = io->inBuffer;
|
|
280
|
-
io->srcBufferLoaded = 0;
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
static void FIO_SyncCompressIO_destroy(FIO_SyncCompressIO* io)
|
|
284
|
-
{
|
|
285
|
-
if (!io) return;
|
|
286
|
-
free(io->inBuffer);
|
|
287
|
-
free(io->outBuffer);
|
|
288
|
-
io->inBuffer = NULL;
|
|
289
|
-
io->outBuffer = NULL;
|
|
290
|
-
io->srcBuffer = NULL;
|
|
291
|
-
io->srcBufferLoaded = 0;
|
|
292
|
-
io->srcFile = NULL;
|
|
293
|
-
io->dstFile = NULL;
|
|
294
|
-
io->storedSkips = 0;
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
static void FIO_SyncCompressIO_setSrc(FIO_SyncCompressIO* io, FILE* file)
|
|
298
|
-
{
|
|
299
|
-
io->srcFile = file;
|
|
300
|
-
io->srcBuffer = io->inBuffer;
|
|
301
|
-
io->srcBufferLoaded = 0;
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
static void FIO_SyncCompressIO_clearSrc(FIO_SyncCompressIO* io)
|
|
305
|
-
{
|
|
306
|
-
io->srcFile = NULL;
|
|
307
|
-
io->srcBuffer = io->inBuffer;
|
|
308
|
-
io->srcBufferLoaded = 0;
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
static void FIO_SyncCompressIO_setDst(FIO_SyncCompressIO* io, FILE* file)
|
|
312
|
-
{
|
|
313
|
-
io->dstFile = file;
|
|
314
|
-
io->storedSkips = 0;
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
static int FIO_SyncCompressIO_closeDst(FIO_SyncCompressIO* io)
|
|
318
|
-
{
|
|
319
|
-
int result = 0;
|
|
320
|
-
if (io->dstFile != NULL) {
|
|
321
|
-
FIO_SyncCompressIO_finish(io);
|
|
322
|
-
result = fclose(io->dstFile);
|
|
323
|
-
io->dstFile = NULL;
|
|
324
|
-
}
|
|
325
|
-
return result;
|
|
326
|
-
}
|
|
327
|
-
|
|
328
|
-
static size_t FIO_SyncCompressIO_fillBuffer(FIO_SyncCompressIO* io, size_t minToHave)
|
|
329
|
-
{
|
|
330
|
-
size_t added = 0;
|
|
331
|
-
if (io->srcFile == NULL)
|
|
332
|
-
return 0;
|
|
333
|
-
|
|
334
|
-
if (minToHave > io->inCapacity)
|
|
335
|
-
minToHave = io->inCapacity;
|
|
336
|
-
|
|
337
|
-
if (io->srcBufferLoaded >= minToHave)
|
|
338
|
-
return 0;
|
|
339
|
-
|
|
340
|
-
if (io->srcBuffer != io->inBuffer) {
|
|
341
|
-
if (io->srcBufferLoaded > 0)
|
|
342
|
-
memmove(io->inBuffer, io->srcBuffer, io->srcBufferLoaded);
|
|
343
|
-
io->srcBuffer = io->inBuffer;
|
|
344
|
-
}
|
|
345
|
-
|
|
346
|
-
while (io->srcBufferLoaded < minToHave) {
|
|
347
|
-
size_t const toRead = io->inCapacity - io->srcBufferLoaded;
|
|
348
|
-
size_t const readBytes = fread(io->inBuffer + io->srcBufferLoaded, 1, toRead, io->srcFile);
|
|
349
|
-
if (readBytes == 0) {
|
|
350
|
-
if (ferror(io->srcFile))
|
|
351
|
-
EXM_THROW(37, "Read error");
|
|
352
|
-
break; /* EOF */
|
|
353
|
-
}
|
|
354
|
-
io->srcBufferLoaded += readBytes;
|
|
355
|
-
added += readBytes;
|
|
356
|
-
if (readBytes < toRead)
|
|
357
|
-
break;
|
|
358
|
-
}
|
|
359
|
-
|
|
360
|
-
return added;
|
|
361
|
-
}
|
|
362
|
-
|
|
363
|
-
static void FIO_SyncCompressIO_consumeBytes(FIO_SyncCompressIO* io, size_t n)
|
|
364
|
-
{
|
|
365
|
-
assert(n <= io->srcBufferLoaded);
|
|
366
|
-
io->srcBuffer += n;
|
|
367
|
-
io->srcBufferLoaded -= n;
|
|
368
|
-
if (io->srcBufferLoaded == 0)
|
|
369
|
-
io->srcBuffer = io->inBuffer;
|
|
370
|
-
}
|
|
371
|
-
|
|
372
|
-
static void FIO_SyncCompressIO_commitOut(FIO_SyncCompressIO* io, const void* buffer, size_t size)
|
|
373
|
-
{
|
|
374
|
-
if (size == 0)
|
|
375
|
-
return;
|
|
376
|
-
if (io->dstFile == NULL) {
|
|
377
|
-
assert(io->prefs->testMode);
|
|
378
|
-
return;
|
|
379
|
-
}
|
|
380
|
-
io->storedSkips = FIO_sparseWrite(io->dstFile, buffer, size, io->prefs, io->storedSkips);
|
|
381
|
-
}
|
|
382
|
-
|
|
383
|
-
static void FIO_SyncCompressIO_finish(FIO_SyncCompressIO* io)
|
|
384
|
-
{
|
|
385
|
-
if (io->dstFile == NULL)
|
|
386
|
-
return;
|
|
387
|
-
FIO_sparseWriteEnd(io->prefs, io->dstFile, io->storedSkips);
|
|
388
|
-
io->storedSkips = 0;
|
|
389
|
-
}
|
|
390
|
-
|
|
391
|
-
#endif /* ZSTD_NOCOMPRESS */
|
|
392
|
-
|
|
393
128
|
/*-************************************
|
|
394
129
|
* Signal (Ctrl-C trapping)
|
|
395
130
|
**************************************/
|
|
@@ -553,7 +288,7 @@ FIO_prefs_t* FIO_createPreferences(void)
|
|
|
553
288
|
ret->removeSrcFile = 0;
|
|
554
289
|
ret->memLimit = 0;
|
|
555
290
|
ret->nbWorkers = 1;
|
|
556
|
-
ret->
|
|
291
|
+
ret->blockSize = 0;
|
|
557
292
|
ret->overlapLog = FIO_OVERLAP_LOG_NOTSET;
|
|
558
293
|
ret->adaptiveMode = 0;
|
|
559
294
|
ret->rsyncable = 0;
|
|
@@ -642,10 +377,10 @@ void FIO_setExcludeCompressedFile(FIO_prefs_t* const prefs, int excludeCompresse
|
|
|
642
377
|
|
|
643
378
|
void FIO_setAllowBlockDevices(FIO_prefs_t* const prefs, int allowBlockDevices) { prefs->allowBlockDevices = allowBlockDevices; }
|
|
644
379
|
|
|
645
|
-
void
|
|
646
|
-
if (
|
|
380
|
+
void FIO_setBlockSize(FIO_prefs_t* const prefs, int blockSize) {
|
|
381
|
+
if (blockSize && prefs->nbWorkers==0)
|
|
647
382
|
DISPLAYLEVEL(2, "Setting block size is useless in single-thread mode \n");
|
|
648
|
-
prefs->
|
|
383
|
+
prefs->blockSize = blockSize;
|
|
649
384
|
}
|
|
650
385
|
|
|
651
386
|
void FIO_setOverlapLog(FIO_prefs_t* const prefs, int overlapLog){
|
|
@@ -803,16 +538,14 @@ static int FIO_removeFile(const char* path)
|
|
|
803
538
|
}
|
|
804
539
|
|
|
805
540
|
/** FIO_openSrcFile() :
|
|
806
|
-
* condition : `srcFileName` must be non-NULL.
|
|
807
|
-
* optional: `prefs` may be NULL.
|
|
541
|
+
* condition : `srcFileName` must be non-NULL. `prefs` may be NULL.
|
|
808
542
|
* @result : FILE* to `srcFileName`, or NULL if it fails */
|
|
809
543
|
static FILE* FIO_openSrcFile(const FIO_prefs_t* const prefs, const char* srcFileName, stat_t* statbuf)
|
|
810
544
|
{
|
|
811
545
|
int allowBlockDevices = prefs != NULL ? prefs->allowBlockDevices : 0;
|
|
812
546
|
assert(srcFileName != NULL);
|
|
813
547
|
assert(statbuf != NULL);
|
|
814
|
-
|
|
815
|
-
if (!strcmp(srcFileName, stdinmark)) {
|
|
548
|
+
if (!strcmp (srcFileName, stdinmark)) {
|
|
816
549
|
DISPLAYLEVEL(4,"Using stdin for input \n");
|
|
817
550
|
SET_BINARY_MODE(stdin);
|
|
818
551
|
return stdin;
|
|
@@ -824,10 +557,8 @@ static FILE* FIO_openSrcFile(const FIO_prefs_t* const prefs, const char* srcFile
|
|
|
824
557
|
return NULL;
|
|
825
558
|
}
|
|
826
559
|
|
|
827
|
-
/* Accept regular files, FIFOs, and process substitution file descriptors */
|
|
828
560
|
if (!UTIL_isRegularFileStat(statbuf)
|
|
829
561
|
&& !UTIL_isFIFOStat(statbuf)
|
|
830
|
-
&& !UTIL_isFileDescriptorPipe(srcFileName) /* Process substitution support */
|
|
831
562
|
&& !(allowBlockDevices && UTIL_isBlockDevStat(statbuf))
|
|
832
563
|
) {
|
|
833
564
|
DISPLAYLEVEL(1, "zstd: %s is not a regular file -- ignored \n",
|
|
@@ -850,6 +581,8 @@ FIO_openDstFile(FIO_ctx_t* fCtx, FIO_prefs_t* const prefs,
|
|
|
850
581
|
const char* srcFileName, const char* dstFileName,
|
|
851
582
|
const int mode)
|
|
852
583
|
{
|
|
584
|
+
int isDstRegFile;
|
|
585
|
+
|
|
853
586
|
if (prefs->testMode) return NULL; /* do not open file in test mode */
|
|
854
587
|
|
|
855
588
|
assert(dstFileName != NULL);
|
|
@@ -869,7 +602,16 @@ FIO_openDstFile(FIO_ctx_t* fCtx, FIO_prefs_t* const prefs,
|
|
|
869
602
|
return NULL;
|
|
870
603
|
}
|
|
871
604
|
|
|
872
|
-
|
|
605
|
+
isDstRegFile = UTIL_isRegularFile(dstFileName); /* invoke once */
|
|
606
|
+
if (prefs->sparseFileSupport == 1) {
|
|
607
|
+
prefs->sparseFileSupport = ZSTD_SPARSE_DEFAULT;
|
|
608
|
+
if (!isDstRegFile) {
|
|
609
|
+
prefs->sparseFileSupport = 0;
|
|
610
|
+
DISPLAYLEVEL(4, "Sparse File Support is disabled when output is not a file \n");
|
|
611
|
+
}
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
if (isDstRegFile) {
|
|
873
615
|
/* Check if destination file already exists */
|
|
874
616
|
#if !defined(_WIN32)
|
|
875
617
|
/* this test does not work on Windows :
|
|
@@ -895,7 +637,6 @@ FIO_openDstFile(FIO_ctx_t* fCtx, FIO_prefs_t* const prefs,
|
|
|
895
637
|
}
|
|
896
638
|
|
|
897
639
|
{
|
|
898
|
-
int isDstRegFile;
|
|
899
640
|
#if defined(_WIN32)
|
|
900
641
|
/* Windows requires opening the file as a "binary" file to avoid
|
|
901
642
|
* mangling. This macro doesn't exist on unix. */
|
|
@@ -913,23 +654,8 @@ FIO_openDstFile(FIO_ctx_t* fCtx, FIO_prefs_t* const prefs,
|
|
|
913
654
|
f = fdopen(fd, "wb");
|
|
914
655
|
}
|
|
915
656
|
#endif
|
|
916
|
-
|
|
917
|
-
/* Check regular file after opening with O_CREAT */
|
|
918
|
-
isDstRegFile = UTIL_isFdRegularFile(fd);
|
|
919
|
-
if (prefs->sparseFileSupport == 1) {
|
|
920
|
-
prefs->sparseFileSupport = ZSTD_SPARSE_DEFAULT;
|
|
921
|
-
if (!isDstRegFile) {
|
|
922
|
-
prefs->sparseFileSupport = 0;
|
|
923
|
-
DISPLAYLEVEL(4, "Sparse File Support is disabled when output is not a file \n");
|
|
924
|
-
}
|
|
925
|
-
}
|
|
926
|
-
|
|
927
657
|
if (f == NULL) {
|
|
928
|
-
|
|
929
|
-
DISPLAYLEVEL(1, "zstd: error: no output specified (use -o or -c). \n");
|
|
930
|
-
} else {
|
|
931
|
-
DISPLAYLEVEL(1, "zstd: %s: %s\n", dstFileName, strerror(errno));
|
|
932
|
-
}
|
|
658
|
+
DISPLAYLEVEL(1, "zstd: %s: %s\n", dstFileName, strerror(errno));
|
|
933
659
|
} else {
|
|
934
660
|
/* An increased buffer size can provide a significant performance
|
|
935
661
|
* boost on some platforms. Note that providing a NULL buf with a
|
|
@@ -1343,7 +1069,8 @@ typedef struct {
|
|
|
1343
1069
|
const char* dictFileName;
|
|
1344
1070
|
stat_t dictFileStat;
|
|
1345
1071
|
ZSTD_CStream* cctx;
|
|
1346
|
-
|
|
1072
|
+
WritePoolCtx_t *writeCtx;
|
|
1073
|
+
ReadPoolCtx_t *readCtx;
|
|
1347
1074
|
} cRess_t;
|
|
1348
1075
|
|
|
1349
1076
|
/** ZSTD_cycleLog() :
|
|
@@ -1411,7 +1138,8 @@ static cRess_t FIO_createCResources(FIO_prefs_t* const prefs,
|
|
|
1411
1138
|
dictBufferType = (useMMap && !forceNoUseMMap) ? FIO_mmapDict : FIO_mallocDict;
|
|
1412
1139
|
FIO_initDict(&ress.dict, dictFileName, prefs, &ress.dictFileStat, dictBufferType); /* works with dictFileName==NULL */
|
|
1413
1140
|
|
|
1414
|
-
|
|
1141
|
+
ress.writeCtx = AIO_WritePool_create(prefs, ZSTD_CStreamOutSize());
|
|
1142
|
+
ress.readCtx = AIO_ReadPool_create(prefs, ZSTD_CStreamInSize());
|
|
1415
1143
|
|
|
1416
1144
|
/* Advanced parameters, including dictionary */
|
|
1417
1145
|
if (dictFileName && (ress.dict.dictBuffer==NULL))
|
|
@@ -1455,7 +1183,7 @@ static cRess_t FIO_createCResources(FIO_prefs_t* const prefs,
|
|
|
1455
1183
|
#ifdef ZSTD_MULTITHREAD
|
|
1456
1184
|
DISPLAYLEVEL(5,"set nb workers = %u \n", prefs->nbWorkers);
|
|
1457
1185
|
CHECK( ZSTD_CCtx_setParameter(ress.cctx, ZSTD_c_nbWorkers, prefs->nbWorkers) );
|
|
1458
|
-
CHECK( ZSTD_CCtx_setParameter(ress.cctx, ZSTD_c_jobSize, prefs->
|
|
1186
|
+
CHECK( ZSTD_CCtx_setParameter(ress.cctx, ZSTD_c_jobSize, prefs->blockSize) );
|
|
1459
1187
|
if (prefs->overlapLog != FIO_OVERLAP_LOG_NOTSET) {
|
|
1460
1188
|
DISPLAYLEVEL(3,"set overlapLog = %u \n", prefs->overlapLog);
|
|
1461
1189
|
CHECK( ZSTD_CCtx_setParameter(ress.cctx, ZSTD_c_overlapLog, prefs->overlapLog) );
|
|
@@ -1475,20 +1203,21 @@ static cRess_t FIO_createCResources(FIO_prefs_t* const prefs,
|
|
|
1475
1203
|
static void FIO_freeCResources(cRess_t* const ress)
|
|
1476
1204
|
{
|
|
1477
1205
|
FIO_freeDict(&(ress->dict));
|
|
1478
|
-
|
|
1206
|
+
AIO_WritePool_free(ress->writeCtx);
|
|
1207
|
+
AIO_ReadPool_free(ress->readCtx);
|
|
1479
1208
|
ZSTD_freeCStream(ress->cctx); /* never fails */
|
|
1480
1209
|
}
|
|
1481
1210
|
|
|
1482
1211
|
|
|
1483
1212
|
#ifdef ZSTD_GZCOMPRESS
|
|
1484
1213
|
static unsigned long long
|
|
1485
|
-
FIO_compressGzFrame(cRess_t* ress,
|
|
1214
|
+
FIO_compressGzFrame(const cRess_t* ress, /* buffers & handlers are used, but not changed */
|
|
1486
1215
|
const char* srcFileName, U64 const srcFileSize,
|
|
1487
1216
|
int compressionLevel, U64* readsize)
|
|
1488
1217
|
{
|
|
1489
|
-
FIO_SyncCompressIO* const syncIO = &ress->io;
|
|
1490
1218
|
unsigned long long inFileSize = 0, outFileSize = 0;
|
|
1491
1219
|
z_stream strm;
|
|
1220
|
+
IOJob_t *writeJob = NULL;
|
|
1492
1221
|
|
|
1493
1222
|
if (compressionLevel > Z_BEST_COMPRESSION)
|
|
1494
1223
|
compressionLevel = Z_BEST_COMPRESSION;
|
|
@@ -1504,36 +1233,37 @@ FIO_compressGzFrame(cRess_t* ress,
|
|
|
1504
1233
|
EXM_THROW(71, "zstd: %s: deflateInit2 error %d \n", srcFileName, ret);
|
|
1505
1234
|
} }
|
|
1506
1235
|
|
|
1236
|
+
writeJob = AIO_WritePool_acquireJob(ress->writeCtx);
|
|
1507
1237
|
strm.next_in = 0;
|
|
1508
1238
|
strm.avail_in = 0;
|
|
1509
|
-
strm.next_out = (Bytef*)
|
|
1510
|
-
strm.avail_out = (uInt)
|
|
1239
|
+
strm.next_out = (Bytef*)writeJob->buffer;
|
|
1240
|
+
strm.avail_out = (uInt)writeJob->bufferSize;
|
|
1511
1241
|
|
|
1512
1242
|
while (1) {
|
|
1513
1243
|
int ret;
|
|
1514
1244
|
if (strm.avail_in == 0) {
|
|
1515
|
-
|
|
1516
|
-
if (
|
|
1517
|
-
inFileSize +=
|
|
1518
|
-
|
|
1519
|
-
strm.
|
|
1520
|
-
strm.avail_in = (uInt)syncIO->srcBufferLoaded;
|
|
1245
|
+
AIO_ReadPool_fillBuffer(ress->readCtx, ZSTD_CStreamInSize());
|
|
1246
|
+
if (ress->readCtx->srcBufferLoaded == 0) break;
|
|
1247
|
+
inFileSize += ress->readCtx->srcBufferLoaded;
|
|
1248
|
+
strm.next_in = (z_const unsigned char*)ress->readCtx->srcBuffer;
|
|
1249
|
+
strm.avail_in = (uInt)ress->readCtx->srcBufferLoaded;
|
|
1521
1250
|
}
|
|
1522
1251
|
|
|
1523
1252
|
{
|
|
1524
1253
|
size_t const availBefore = strm.avail_in;
|
|
1525
1254
|
ret = deflate(&strm, Z_NO_FLUSH);
|
|
1526
|
-
|
|
1255
|
+
AIO_ReadPool_consumeBytes(ress->readCtx, availBefore - strm.avail_in);
|
|
1527
1256
|
}
|
|
1528
1257
|
|
|
1529
1258
|
if (ret != Z_OK)
|
|
1530
1259
|
EXM_THROW(72, "zstd: %s: deflate error %d \n", srcFileName, ret);
|
|
1531
|
-
{ size_t const cSize =
|
|
1260
|
+
{ size_t const cSize = writeJob->bufferSize - strm.avail_out;
|
|
1532
1261
|
if (cSize) {
|
|
1533
|
-
|
|
1262
|
+
writeJob->usedBufferSize = cSize;
|
|
1263
|
+
AIO_WritePool_enqueueAndReacquireWriteJob(&writeJob);
|
|
1534
1264
|
outFileSize += cSize;
|
|
1535
|
-
strm.next_out = (Bytef*)
|
|
1536
|
-
strm.avail_out = (uInt)
|
|
1265
|
+
strm.next_out = (Bytef*)writeJob->buffer;
|
|
1266
|
+
strm.avail_out = (uInt)writeJob->bufferSize;
|
|
1537
1267
|
} }
|
|
1538
1268
|
if (srcFileSize == UTIL_FILESIZE_UNKNOWN) {
|
|
1539
1269
|
DISPLAYUPDATE_PROGRESS(
|
|
@@ -1549,12 +1279,13 @@ FIO_compressGzFrame(cRess_t* ress,
|
|
|
1549
1279
|
|
|
1550
1280
|
while (1) {
|
|
1551
1281
|
int const ret = deflate(&strm, Z_FINISH);
|
|
1552
|
-
{ size_t const cSize =
|
|
1282
|
+
{ size_t const cSize = writeJob->bufferSize - strm.avail_out;
|
|
1553
1283
|
if (cSize) {
|
|
1554
|
-
|
|
1284
|
+
writeJob->usedBufferSize = cSize;
|
|
1285
|
+
AIO_WritePool_enqueueAndReacquireWriteJob(&writeJob);
|
|
1555
1286
|
outFileSize += cSize;
|
|
1556
|
-
strm.next_out = (Bytef*)
|
|
1557
|
-
strm.avail_out = (uInt)
|
|
1287
|
+
strm.next_out = (Bytef*)writeJob->buffer;
|
|
1288
|
+
strm.avail_out = (uInt)writeJob->bufferSize;
|
|
1558
1289
|
} }
|
|
1559
1290
|
if (ret == Z_STREAM_END) break;
|
|
1560
1291
|
if (ret != Z_BUF_ERROR)
|
|
@@ -1566,7 +1297,8 @@ FIO_compressGzFrame(cRess_t* ress,
|
|
|
1566
1297
|
EXM_THROW(79, "zstd: %s: deflateEnd error %d \n", srcFileName, ret);
|
|
1567
1298
|
} }
|
|
1568
1299
|
*readsize = inFileSize;
|
|
1569
|
-
|
|
1300
|
+
AIO_WritePool_releaseIoJob(writeJob);
|
|
1301
|
+
AIO_WritePool_sparseWriteEnd(ress->writeCtx);
|
|
1570
1302
|
return outFileSize;
|
|
1571
1303
|
}
|
|
1572
1304
|
#endif
|
|
@@ -1578,11 +1310,11 @@ FIO_compressLzmaFrame(cRess_t* ress,
|
|
|
1578
1310
|
const char* srcFileName, U64 const srcFileSize,
|
|
1579
1311
|
int compressionLevel, U64* readsize, int plain_lzma)
|
|
1580
1312
|
{
|
|
1581
|
-
FIO_SyncCompressIO* const syncIO = &ress->io;
|
|
1582
1313
|
unsigned long long inFileSize = 0, outFileSize = 0;
|
|
1583
1314
|
lzma_stream strm = LZMA_STREAM_INIT;
|
|
1584
1315
|
lzma_action action = LZMA_RUN;
|
|
1585
1316
|
lzma_ret ret;
|
|
1317
|
+
IOJob_t *writeJob = NULL;
|
|
1586
1318
|
|
|
1587
1319
|
if (compressionLevel < 0) compressionLevel = 0;
|
|
1588
1320
|
if (compressionLevel > 9) compressionLevel = 9;
|
|
@@ -1600,35 +1332,37 @@ FIO_compressLzmaFrame(cRess_t* ress,
|
|
|
1600
1332
|
EXM_THROW(83, "zstd: %s: lzma_easy_encoder error %d", srcFileName, ret);
|
|
1601
1333
|
}
|
|
1602
1334
|
|
|
1603
|
-
|
|
1604
|
-
strm.
|
|
1335
|
+
writeJob =AIO_WritePool_acquireJob(ress->writeCtx);
|
|
1336
|
+
strm.next_out = (BYTE*)writeJob->buffer;
|
|
1337
|
+
strm.avail_out = writeJob->bufferSize;
|
|
1605
1338
|
strm.next_in = 0;
|
|
1606
1339
|
strm.avail_in = 0;
|
|
1607
1340
|
|
|
1608
1341
|
while (1) {
|
|
1609
1342
|
if (strm.avail_in == 0) {
|
|
1610
|
-
size_t const
|
|
1611
|
-
if (
|
|
1612
|
-
inFileSize +=
|
|
1613
|
-
|
|
1614
|
-
strm.
|
|
1615
|
-
strm.avail_in = syncIO->srcBufferLoaded;
|
|
1343
|
+
size_t const inSize = AIO_ReadPool_fillBuffer(ress->readCtx, ZSTD_CStreamInSize());
|
|
1344
|
+
if (ress->readCtx->srcBufferLoaded == 0) action = LZMA_FINISH;
|
|
1345
|
+
inFileSize += inSize;
|
|
1346
|
+
strm.next_in = (BYTE const*)ress->readCtx->srcBuffer;
|
|
1347
|
+
strm.avail_in = ress->readCtx->srcBufferLoaded;
|
|
1616
1348
|
}
|
|
1617
1349
|
|
|
1618
1350
|
{
|
|
1619
1351
|
size_t const availBefore = strm.avail_in;
|
|
1620
1352
|
ret = lzma_code(&strm, action);
|
|
1621
|
-
|
|
1353
|
+
AIO_ReadPool_consumeBytes(ress->readCtx, availBefore - strm.avail_in);
|
|
1622
1354
|
}
|
|
1623
1355
|
|
|
1356
|
+
|
|
1624
1357
|
if (ret != LZMA_OK && ret != LZMA_STREAM_END)
|
|
1625
1358
|
EXM_THROW(84, "zstd: %s: lzma_code encoding error %d", srcFileName, ret);
|
|
1626
|
-
{ size_t const compBytes =
|
|
1359
|
+
{ size_t const compBytes = writeJob->bufferSize - strm.avail_out;
|
|
1627
1360
|
if (compBytes) {
|
|
1628
|
-
|
|
1361
|
+
writeJob->usedBufferSize = compBytes;
|
|
1362
|
+
AIO_WritePool_enqueueAndReacquireWriteJob(&writeJob);
|
|
1629
1363
|
outFileSize += compBytes;
|
|
1630
|
-
strm.next_out = (BYTE*)
|
|
1631
|
-
strm.avail_out =
|
|
1364
|
+
strm.next_out = (BYTE*)writeJob->buffer;
|
|
1365
|
+
strm.avail_out = writeJob->bufferSize;
|
|
1632
1366
|
} }
|
|
1633
1367
|
if (srcFileSize == UTIL_FILESIZE_UNKNOWN)
|
|
1634
1368
|
DISPLAYUPDATE_PROGRESS("\rRead : %u MB ==> %.2f%%",
|
|
@@ -1644,7 +1378,8 @@ FIO_compressLzmaFrame(cRess_t* ress,
|
|
|
1644
1378
|
lzma_end(&strm);
|
|
1645
1379
|
*readsize = inFileSize;
|
|
1646
1380
|
|
|
1647
|
-
|
|
1381
|
+
AIO_WritePool_releaseIoJob(writeJob);
|
|
1382
|
+
AIO_WritePool_sparseWriteEnd(ress->writeCtx);
|
|
1648
1383
|
|
|
1649
1384
|
return outFileSize;
|
|
1650
1385
|
}
|
|
@@ -1665,20 +1400,21 @@ FIO_compressLz4Frame(cRess_t* ress,
|
|
|
1665
1400
|
int compressionLevel, int checksumFlag,
|
|
1666
1401
|
U64* readsize)
|
|
1667
1402
|
{
|
|
1668
|
-
FIO_SyncCompressIO* const syncIO = &ress->io;
|
|
1669
1403
|
const size_t blockSize = FIO_LZ4_GetBlockSize_FromBlockId(LZ4F_max64KB);
|
|
1670
1404
|
unsigned long long inFileSize = 0, outFileSize = 0;
|
|
1671
1405
|
|
|
1672
1406
|
LZ4F_preferences_t prefs;
|
|
1673
1407
|
LZ4F_compressionContext_t ctx;
|
|
1674
1408
|
|
|
1409
|
+
IOJob_t* writeJob = AIO_WritePool_acquireJob(ress->writeCtx);
|
|
1410
|
+
|
|
1675
1411
|
LZ4F_errorCode_t const errorCode = LZ4F_createCompressionContext(&ctx, LZ4F_VERSION);
|
|
1676
1412
|
if (LZ4F_isError(errorCode))
|
|
1677
1413
|
EXM_THROW(31, "zstd: failed to create lz4 compression context");
|
|
1678
1414
|
|
|
1679
1415
|
memset(&prefs, 0, sizeof(prefs));
|
|
1680
1416
|
|
|
1681
|
-
assert(blockSize <=
|
|
1417
|
+
assert(blockSize <= ress->readCtx->base.jobBufferSize);
|
|
1682
1418
|
|
|
1683
1419
|
/* autoflush off to mitigate a bug in lz4<=1.9.3 for compression level 12 */
|
|
1684
1420
|
prefs.autoFlush = 0;
|
|
@@ -1689,26 +1425,25 @@ FIO_compressLz4Frame(cRess_t* ress,
|
|
|
1689
1425
|
#if LZ4_VERSION_NUMBER >= 10600
|
|
1690
1426
|
prefs.frameInfo.contentSize = (srcFileSize==UTIL_FILESIZE_UNKNOWN) ? 0 : srcFileSize;
|
|
1691
1427
|
#endif
|
|
1692
|
-
assert(LZ4F_compressBound(blockSize, &prefs) <=
|
|
1428
|
+
assert(LZ4F_compressBound(blockSize, &prefs) <= writeJob->bufferSize);
|
|
1693
1429
|
|
|
1694
1430
|
{
|
|
1695
|
-
size_t headerSize = LZ4F_compressBegin(ctx,
|
|
1431
|
+
size_t headerSize = LZ4F_compressBegin(ctx, writeJob->buffer, writeJob->bufferSize, &prefs);
|
|
1696
1432
|
if (LZ4F_isError(headerSize))
|
|
1697
1433
|
EXM_THROW(33, "File header generation failed : %s",
|
|
1698
1434
|
LZ4F_getErrorName(headerSize));
|
|
1699
|
-
|
|
1435
|
+
writeJob->usedBufferSize = headerSize;
|
|
1436
|
+
AIO_WritePool_enqueueAndReacquireWriteJob(&writeJob);
|
|
1700
1437
|
outFileSize += headerSize;
|
|
1701
1438
|
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
inFileSize += added;
|
|
1705
|
-
*readsize += added;
|
|
1706
|
-
}
|
|
1439
|
+
/* Read first block */
|
|
1440
|
+
inFileSize += AIO_ReadPool_fillBuffer(ress->readCtx, blockSize);
|
|
1707
1441
|
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
size_t
|
|
1711
|
-
|
|
1442
|
+
/* Main Loop */
|
|
1443
|
+
while (ress->readCtx->srcBufferLoaded) {
|
|
1444
|
+
size_t inSize = MIN(blockSize, ress->readCtx->srcBufferLoaded);
|
|
1445
|
+
size_t const outSize = LZ4F_compressUpdate(ctx, writeJob->buffer, writeJob->bufferSize,
|
|
1446
|
+
ress->readCtx->srcBuffer, inSize, NULL);
|
|
1712
1447
|
if (LZ4F_isError(outSize))
|
|
1713
1448
|
EXM_THROW(35, "zstd: %s: lz4 compression failed : %s",
|
|
1714
1449
|
srcFileName, LZ4F_getErrorName(outSize));
|
|
@@ -1723,27 +1458,30 @@ FIO_compressLz4Frame(cRess_t* ress,
|
|
|
1723
1458
|
(double)outFileSize/(double)inFileSize*100);
|
|
1724
1459
|
}
|
|
1725
1460
|
|
|
1726
|
-
|
|
1461
|
+
/* Write Block */
|
|
1462
|
+
writeJob->usedBufferSize = outSize;
|
|
1463
|
+
AIO_WritePool_enqueueAndReacquireWriteJob(&writeJob);
|
|
1727
1464
|
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
inFileSize += added;
|
|
1732
|
-
*readsize += added;
|
|
1733
|
-
}
|
|
1465
|
+
/* Read next block */
|
|
1466
|
+
AIO_ReadPool_consumeBytes(ress->readCtx, inSize);
|
|
1467
|
+
inFileSize += AIO_ReadPool_fillBuffer(ress->readCtx, blockSize);
|
|
1734
1468
|
}
|
|
1735
1469
|
|
|
1736
|
-
|
|
1470
|
+
/* End of Stream mark */
|
|
1471
|
+
headerSize = LZ4F_compressEnd(ctx, writeJob->buffer, writeJob->bufferSize, NULL);
|
|
1737
1472
|
if (LZ4F_isError(headerSize))
|
|
1738
1473
|
EXM_THROW(38, "zstd: %s: lz4 end of file generation failed : %s",
|
|
1739
1474
|
srcFileName, LZ4F_getErrorName(headerSize));
|
|
1740
1475
|
|
|
1741
|
-
|
|
1476
|
+
writeJob->usedBufferSize = headerSize;
|
|
1477
|
+
AIO_WritePool_enqueueAndReacquireWriteJob(&writeJob);
|
|
1742
1478
|
outFileSize += headerSize;
|
|
1743
1479
|
}
|
|
1744
1480
|
|
|
1481
|
+
*readsize = inFileSize;
|
|
1745
1482
|
LZ4F_freeCompressionContext(ctx);
|
|
1746
|
-
|
|
1483
|
+
AIO_WritePool_releaseIoJob(writeJob);
|
|
1484
|
+
AIO_WritePool_sparseWriteEnd(ress->writeCtx);
|
|
1747
1485
|
|
|
1748
1486
|
return outFileSize;
|
|
1749
1487
|
}
|
|
@@ -1752,11 +1490,12 @@ FIO_compressLz4Frame(cRess_t* ress,
|
|
|
1752
1490
|
static unsigned long long
|
|
1753
1491
|
FIO_compressZstdFrame(FIO_ctx_t* const fCtx,
|
|
1754
1492
|
FIO_prefs_t* const prefs,
|
|
1755
|
-
cRess_t*
|
|
1493
|
+
const cRess_t* ressPtr,
|
|
1756
1494
|
const char* srcFileName, U64 fileSize,
|
|
1757
1495
|
int compressionLevel, U64* readsize)
|
|
1758
1496
|
{
|
|
1759
|
-
|
|
1497
|
+
cRess_t const ress = *ressPtr;
|
|
1498
|
+
IOJob_t* writeJob = AIO_WritePool_acquireJob(ressPtr->writeCtx);
|
|
1760
1499
|
|
|
1761
1500
|
U64 compressedfilesize = 0;
|
|
1762
1501
|
ZSTD_EndDirective directive = ZSTD_e_continue;
|
|
@@ -1781,16 +1520,16 @@ FIO_compressZstdFrame(FIO_ctx_t* const fCtx,
|
|
|
1781
1520
|
/* init */
|
|
1782
1521
|
if (fileSize != UTIL_FILESIZE_UNKNOWN) {
|
|
1783
1522
|
pledgedSrcSize = fileSize;
|
|
1784
|
-
CHECK(ZSTD_CCtx_setPledgedSrcSize(ress
|
|
1523
|
+
CHECK(ZSTD_CCtx_setPledgedSrcSize(ress.cctx, fileSize));
|
|
1785
1524
|
} else if (prefs->streamSrcSize > 0) {
|
|
1786
1525
|
/* unknown source size; use the declared stream size */
|
|
1787
1526
|
pledgedSrcSize = prefs->streamSrcSize;
|
|
1788
|
-
CHECK( ZSTD_CCtx_setPledgedSrcSize(ress
|
|
1527
|
+
CHECK( ZSTD_CCtx_setPledgedSrcSize(ress.cctx, prefs->streamSrcSize) );
|
|
1789
1528
|
}
|
|
1790
1529
|
|
|
1791
1530
|
{ int windowLog;
|
|
1792
1531
|
UTIL_HumanReadableSize_t windowSize;
|
|
1793
|
-
CHECK(ZSTD_CCtx_getParameter(ress
|
|
1532
|
+
CHECK(ZSTD_CCtx_getParameter(ress.cctx, ZSTD_c_windowLog, &windowLog));
|
|
1794
1533
|
if (windowLog == 0) {
|
|
1795
1534
|
if (prefs->ldmFlag) {
|
|
1796
1535
|
/* If long mode is set without a window size libzstd will set this size internally */
|
|
@@ -1808,12 +1547,12 @@ FIO_compressZstdFrame(FIO_ctx_t* const fCtx,
|
|
|
1808
1547
|
do {
|
|
1809
1548
|
size_t stillToFlush;
|
|
1810
1549
|
/* Fill input Buffer */
|
|
1811
|
-
size_t const inSize =
|
|
1812
|
-
ZSTD_inBuffer inBuff = setInBuffer(
|
|
1550
|
+
size_t const inSize = AIO_ReadPool_fillBuffer(ress.readCtx, ZSTD_CStreamInSize());
|
|
1551
|
+
ZSTD_inBuffer inBuff = setInBuffer( ress.readCtx->srcBuffer, ress.readCtx->srcBufferLoaded, 0 );
|
|
1813
1552
|
DISPLAYLEVEL(6, "fread %u bytes from source \n", (unsigned)inSize);
|
|
1814
1553
|
*readsize += inSize;
|
|
1815
1554
|
|
|
1816
|
-
if ((
|
|
1555
|
+
if ((ress.readCtx->srcBufferLoaded == 0) || (*readsize == fileSize))
|
|
1817
1556
|
directive = ZSTD_e_end;
|
|
1818
1557
|
|
|
1819
1558
|
stillToFlush = 1;
|
|
@@ -1821,10 +1560,10 @@ FIO_compressZstdFrame(FIO_ctx_t* const fCtx,
|
|
|
1821
1560
|
|| (directive == ZSTD_e_end && stillToFlush != 0) ) {
|
|
1822
1561
|
|
|
1823
1562
|
size_t const oldIPos = inBuff.pos;
|
|
1824
|
-
ZSTD_outBuffer outBuff = setOutBuffer(
|
|
1825
|
-
size_t const toFlushNow = ZSTD_toFlushNow(ress
|
|
1826
|
-
CHECK_V(stillToFlush, ZSTD_compressStream2(ress
|
|
1827
|
-
|
|
1563
|
+
ZSTD_outBuffer outBuff = setOutBuffer( writeJob->buffer, writeJob->bufferSize, 0 );
|
|
1564
|
+
size_t const toFlushNow = ZSTD_toFlushNow(ress.cctx);
|
|
1565
|
+
CHECK_V(stillToFlush, ZSTD_compressStream2(ress.cctx, &outBuff, &inBuff, directive));
|
|
1566
|
+
AIO_ReadPool_consumeBytes(ress.readCtx, inBuff.pos - oldIPos);
|
|
1828
1567
|
|
|
1829
1568
|
/* count stats */
|
|
1830
1569
|
inputPresented++;
|
|
@@ -1835,13 +1574,14 @@ FIO_compressZstdFrame(FIO_ctx_t* const fCtx,
|
|
|
1835
1574
|
DISPLAYLEVEL(6, "ZSTD_compress_generic(end:%u) => input pos(%u)<=(%u)size ; output generated %u bytes \n",
|
|
1836
1575
|
(unsigned)directive, (unsigned)inBuff.pos, (unsigned)inBuff.size, (unsigned)outBuff.pos);
|
|
1837
1576
|
if (outBuff.pos) {
|
|
1838
|
-
|
|
1577
|
+
writeJob->usedBufferSize = outBuff.pos;
|
|
1578
|
+
AIO_WritePool_enqueueAndReacquireWriteJob(&writeJob);
|
|
1839
1579
|
compressedfilesize += outBuff.pos;
|
|
1840
1580
|
}
|
|
1841
1581
|
|
|
1842
1582
|
/* adaptive mode : statistics measurement and speed correction */
|
|
1843
1583
|
if (prefs->adaptiveMode && UTIL_clockSpanMicro(lastAdaptTime) > adaptEveryMicro) {
|
|
1844
|
-
ZSTD_frameProgression const zfp = ZSTD_getFrameProgression(ress
|
|
1584
|
+
ZSTD_frameProgression const zfp = ZSTD_getFrameProgression(ress.cctx);
|
|
1845
1585
|
|
|
1846
1586
|
lastAdaptTime = UTIL_getTime();
|
|
1847
1587
|
|
|
@@ -1914,14 +1654,14 @@ FIO_compressZstdFrame(FIO_ctx_t* const fCtx,
|
|
|
1914
1654
|
if (compressionLevel > ZSTD_maxCLevel()) compressionLevel = ZSTD_maxCLevel();
|
|
1915
1655
|
if (compressionLevel > prefs->maxAdaptLevel) compressionLevel = prefs->maxAdaptLevel;
|
|
1916
1656
|
compressionLevel += (compressionLevel == 0); /* skip 0 */
|
|
1917
|
-
ZSTD_CCtx_setParameter(ress
|
|
1657
|
+
ZSTD_CCtx_setParameter(ress.cctx, ZSTD_c_compressionLevel, compressionLevel);
|
|
1918
1658
|
}
|
|
1919
1659
|
if (speedChange == faster) {
|
|
1920
1660
|
DISPLAYLEVEL(6, "faster speed , lighter compression \n")
|
|
1921
1661
|
compressionLevel --;
|
|
1922
1662
|
if (compressionLevel < prefs->minAdaptLevel) compressionLevel = prefs->minAdaptLevel;
|
|
1923
1663
|
compressionLevel -= (compressionLevel == 0); /* skip 0 */
|
|
1924
|
-
ZSTD_CCtx_setParameter(ress
|
|
1664
|
+
ZSTD_CCtx_setParameter(ress.cctx, ZSTD_c_compressionLevel, compressionLevel);
|
|
1925
1665
|
}
|
|
1926
1666
|
speedChange = noChange;
|
|
1927
1667
|
|
|
@@ -1931,7 +1671,7 @@ FIO_compressZstdFrame(FIO_ctx_t* const fCtx,
|
|
|
1931
1671
|
|
|
1932
1672
|
/* display notification */
|
|
1933
1673
|
if (SHOULD_DISPLAY_PROGRESS() && READY_FOR_UPDATE()) {
|
|
1934
|
-
ZSTD_frameProgression const zfp = ZSTD_getFrameProgression(ress
|
|
1674
|
+
ZSTD_frameProgression const zfp = ZSTD_getFrameProgression(ress.cctx);
|
|
1935
1675
|
double const cShare = (double)zfp.produced / (double)(zfp.consumed + !zfp.consumed/*avoid div0*/) * 100;
|
|
1936
1676
|
UTIL_HumanReadableSize_t const buffered_hrs = UTIL_makeHumanReadableSize(zfp.ingested - zfp.consumed);
|
|
1937
1677
|
UTIL_HumanReadableSize_t const consumed_hrs = UTIL_makeHumanReadableSize(zfp.consumed);
|
|
@@ -1978,7 +1718,8 @@ FIO_compressZstdFrame(FIO_ctx_t* const fCtx,
|
|
|
1978
1718
|
(unsigned long long)*readsize, (unsigned long long)fileSize);
|
|
1979
1719
|
}
|
|
1980
1720
|
|
|
1981
|
-
|
|
1721
|
+
AIO_WritePool_releaseIoJob(writeJob);
|
|
1722
|
+
AIO_WritePool_sparseWriteEnd(ressPtr->writeCtx);
|
|
1982
1723
|
|
|
1983
1724
|
return compressedfilesize;
|
|
1984
1725
|
}
|
|
@@ -1991,7 +1732,7 @@ FIO_compressZstdFrame(FIO_ctx_t* const fCtx,
|
|
|
1991
1732
|
static int
|
|
1992
1733
|
FIO_compressFilename_internal(FIO_ctx_t* const fCtx,
|
|
1993
1734
|
FIO_prefs_t* const prefs,
|
|
1994
|
-
cRess_t
|
|
1735
|
+
cRess_t ress,
|
|
1995
1736
|
const char* dstFileName, const char* srcFileName,
|
|
1996
1737
|
int compressionLevel)
|
|
1997
1738
|
{
|
|
@@ -2006,12 +1747,12 @@ FIO_compressFilename_internal(FIO_ctx_t* const fCtx,
|
|
|
2006
1747
|
switch (prefs->compressionType) {
|
|
2007
1748
|
default:
|
|
2008
1749
|
case FIO_zstdCompression:
|
|
2009
|
-
compressedfilesize = FIO_compressZstdFrame(fCtx, prefs, ress, srcFileName, fileSize, compressionLevel, &readsize);
|
|
1750
|
+
compressedfilesize = FIO_compressZstdFrame(fCtx, prefs, &ress, srcFileName, fileSize, compressionLevel, &readsize);
|
|
2010
1751
|
break;
|
|
2011
1752
|
|
|
2012
1753
|
case FIO_gzipCompression:
|
|
2013
1754
|
#ifdef ZSTD_GZCOMPRESS
|
|
2014
|
-
compressedfilesize = FIO_compressGzFrame(ress, srcFileName, fileSize, compressionLevel, &readsize);
|
|
1755
|
+
compressedfilesize = FIO_compressGzFrame(&ress, srcFileName, fileSize, compressionLevel, &readsize);
|
|
2015
1756
|
#else
|
|
2016
1757
|
(void)compressionLevel;
|
|
2017
1758
|
EXM_THROW(20, "zstd: %s: file cannot be compressed as gzip (zstd compiled without ZSTD_GZCOMPRESS) -- ignored \n",
|
|
@@ -2022,7 +1763,7 @@ FIO_compressFilename_internal(FIO_ctx_t* const fCtx,
|
|
|
2022
1763
|
case FIO_xzCompression:
|
|
2023
1764
|
case FIO_lzmaCompression:
|
|
2024
1765
|
#ifdef ZSTD_LZMACOMPRESS
|
|
2025
|
-
compressedfilesize = FIO_compressLzmaFrame(ress, srcFileName, fileSize, compressionLevel, &readsize, prefs->compressionType==FIO_lzmaCompression);
|
|
1766
|
+
compressedfilesize = FIO_compressLzmaFrame(&ress, srcFileName, fileSize, compressionLevel, &readsize, prefs->compressionType==FIO_lzmaCompression);
|
|
2026
1767
|
#else
|
|
2027
1768
|
(void)compressionLevel;
|
|
2028
1769
|
EXM_THROW(20, "zstd: %s: file cannot be compressed as xz/lzma (zstd compiled without ZSTD_LZMACOMPRESS) -- ignored \n",
|
|
@@ -2032,7 +1773,7 @@ FIO_compressFilename_internal(FIO_ctx_t* const fCtx,
|
|
|
2032
1773
|
|
|
2033
1774
|
case FIO_lz4Compression:
|
|
2034
1775
|
#ifdef ZSTD_LZ4COMPRESS
|
|
2035
|
-
compressedfilesize = FIO_compressLz4Frame(ress, srcFileName, fileSize, compressionLevel, prefs->checksumFlag, &readsize);
|
|
1776
|
+
compressedfilesize = FIO_compressLz4Frame(&ress, srcFileName, fileSize, compressionLevel, prefs->checksumFlag, &readsize);
|
|
2036
1777
|
#else
|
|
2037
1778
|
(void)compressionLevel;
|
|
2038
1779
|
EXM_THROW(20, "zstd: %s: file cannot be compressed as lz4 (zstd compiled without ZSTD_LZ4COMPRESS) -- ignored \n",
|
|
@@ -2088,7 +1829,7 @@ FIO_compressFilename_internal(FIO_ctx_t* const fCtx,
|
|
|
2088
1829
|
*/
|
|
2089
1830
|
static int FIO_compressFilename_dstFile(FIO_ctx_t* const fCtx,
|
|
2090
1831
|
FIO_prefs_t* const prefs,
|
|
2091
|
-
cRess_t
|
|
1832
|
+
cRess_t ress,
|
|
2092
1833
|
const char* dstFileName,
|
|
2093
1834
|
const char* srcFileName,
|
|
2094
1835
|
const stat_t* srcFileStat,
|
|
@@ -2099,7 +1840,8 @@ static int FIO_compressFilename_dstFile(FIO_ctx_t* const fCtx,
|
|
|
2099
1840
|
int transferStat = 0;
|
|
2100
1841
|
int dstFd = -1;
|
|
2101
1842
|
|
|
2102
|
-
|
|
1843
|
+
assert(AIO_ReadPool_getFile(ress.readCtx) != NULL);
|
|
1844
|
+
if (AIO_WritePool_getFile(ress.writeCtx) == NULL) {
|
|
2103
1845
|
int dstFileInitialPermissions = DEFAULT_FILE_PERMISSIONS;
|
|
2104
1846
|
if ( strcmp (srcFileName, stdinmark)
|
|
2105
1847
|
&& strcmp (dstFileName, stdoutmark)
|
|
@@ -2110,13 +1852,15 @@ static int FIO_compressFilename_dstFile(FIO_ctx_t* const fCtx,
|
|
|
2110
1852
|
|
|
2111
1853
|
closeDstFile = 1;
|
|
2112
1854
|
DISPLAYLEVEL(6, "FIO_compressFilename_dstFile: opening dst: %s \n", dstFileName);
|
|
2113
|
-
{
|
|
2114
|
-
FILE *dstFile = FIO_openDstFile(fCtx, prefs, srcFileName, dstFileName, dstFileInitialPermissions);
|
|
1855
|
+
{ FILE *dstFile = FIO_openDstFile(fCtx, prefs, srcFileName, dstFileName, dstFileInitialPermissions);
|
|
2115
1856
|
if (dstFile==NULL) return 1; /* could not open dstFileName */
|
|
2116
1857
|
dstFd = fileno(dstFile);
|
|
2117
|
-
|
|
1858
|
+
AIO_WritePool_setFile(ress.writeCtx, dstFile);
|
|
2118
1859
|
}
|
|
2119
|
-
/* Must only be added after FIO_openDstFile() succeeds.
|
|
1860
|
+
/* Must only be added after FIO_openDstFile() succeeds.
|
|
1861
|
+
* Otherwise we may delete the destination file if it already exists,
|
|
1862
|
+
* and the user presses Ctrl-C when asked if they wish to overwrite.
|
|
1863
|
+
*/
|
|
2120
1864
|
addHandler(dstFileName);
|
|
2121
1865
|
}
|
|
2122
1866
|
|
|
@@ -2130,7 +1874,7 @@ static int FIO_compressFilename_dstFile(FIO_ctx_t* const fCtx,
|
|
|
2130
1874
|
}
|
|
2131
1875
|
|
|
2132
1876
|
DISPLAYLEVEL(6, "FIO_compressFilename_dstFile: closing dst: %s \n", dstFileName);
|
|
2133
|
-
if (
|
|
1877
|
+
if (AIO_WritePool_closeFile(ress.writeCtx)) { /* error closing file */
|
|
2134
1878
|
DISPLAYLEVEL(1, "zstd: %s: %s \n", dstFileName, strerror(errno));
|
|
2135
1879
|
result=1;
|
|
2136
1880
|
}
|
|
@@ -2139,9 +1883,10 @@ static int FIO_compressFilename_dstFile(FIO_ctx_t* const fCtx,
|
|
|
2139
1883
|
UTIL_utime(dstFileName, srcFileStat);
|
|
2140
1884
|
}
|
|
2141
1885
|
|
|
2142
|
-
if ( (result != 0)
|
|
2143
|
-
&& strcmp(dstFileName, stdoutmark) )
|
|
2144
|
-
|
|
1886
|
+
if ( (result != 0) /* operation failure */
|
|
1887
|
+
&& strcmp(dstFileName, stdoutmark) /* special case : don't remove() stdout */
|
|
1888
|
+
) {
|
|
1889
|
+
FIO_removeFile(dstFileName); /* remove compression artefact; note don't do anything special if remove() fails */
|
|
2145
1890
|
}
|
|
2146
1891
|
}
|
|
2147
1892
|
|
|
@@ -2275,7 +2020,7 @@ static const char *compressedFileExtensions[] = {
|
|
|
2275
2020
|
static int
|
|
2276
2021
|
FIO_compressFilename_srcFile(FIO_ctx_t* const fCtx,
|
|
2277
2022
|
FIO_prefs_t* const prefs,
|
|
2278
|
-
cRess_t
|
|
2023
|
+
cRess_t ress,
|
|
2279
2024
|
const char* dstFileName,
|
|
2280
2025
|
const char* srcFileName,
|
|
2281
2026
|
int compressionLevel)
|
|
@@ -2297,7 +2042,7 @@ FIO_compressFilename_srcFile(FIO_ctx_t* const fCtx,
|
|
|
2297
2042
|
}
|
|
2298
2043
|
|
|
2299
2044
|
/* ensure src is not the same as dict (if present) */
|
|
2300
|
-
if (ress
|
|
2045
|
+
if (ress.dictFileName != NULL && UTIL_isSameFileStat(srcFileName, ress.dictFileName, &srcFileStat, &ress.dictFileStat)) {
|
|
2301
2046
|
DISPLAYLEVEL(1, "zstd: cannot use %s as an input file and dictionary \n", srcFileName);
|
|
2302
2047
|
return 1;
|
|
2303
2048
|
}
|
|
@@ -2316,21 +2061,23 @@ FIO_compressFilename_srcFile(FIO_ctx_t* const fCtx,
|
|
|
2316
2061
|
srcFile = FIO_openSrcFile(prefs, srcFileName, &srcFileStat);
|
|
2317
2062
|
if (srcFile == NULL) return 1; /* srcFile could not be opened */
|
|
2318
2063
|
|
|
2064
|
+
/* Don't use AsyncIO for small files */
|
|
2319
2065
|
if (strcmp(srcFileName, stdinmark)) /* Stdin doesn't have stats */
|
|
2320
2066
|
fileSize = UTIL_getFileSizeStat(&srcFileStat);
|
|
2321
|
-
(
|
|
2067
|
+
if(fileSize != UTIL_FILESIZE_UNKNOWN && fileSize < ZSTD_BLOCKSIZE_MAX * 3) {
|
|
2068
|
+
AIO_ReadPool_setAsync(ress.readCtx, 0);
|
|
2069
|
+
AIO_WritePool_setAsync(ress.writeCtx, 0);
|
|
2070
|
+
} else {
|
|
2071
|
+
AIO_ReadPool_setAsync(ress.readCtx, 1);
|
|
2072
|
+
AIO_WritePool_setAsync(ress.writeCtx, 1);
|
|
2073
|
+
}
|
|
2322
2074
|
|
|
2323
|
-
|
|
2075
|
+
AIO_ReadPool_setFile(ress.readCtx, srcFile);
|
|
2324
2076
|
result = FIO_compressFilename_dstFile(
|
|
2325
2077
|
fCtx, prefs, ress,
|
|
2326
2078
|
dstFileName, srcFileName,
|
|
2327
2079
|
&srcFileStat, compressionLevel);
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
if (srcFile != NULL && fclose(srcFile)) {
|
|
2331
|
-
DISPLAYLEVEL(1, "zstd: %s: %s \n", srcFileName, strerror(errno));
|
|
2332
|
-
return 1;
|
|
2333
|
-
}
|
|
2080
|
+
AIO_ReadPool_closeFile(ress.readCtx);
|
|
2334
2081
|
|
|
2335
2082
|
if ( prefs->removeSrcFile /* --rm */
|
|
2336
2083
|
&& result == 0 /* success */
|
|
@@ -2371,7 +2118,7 @@ void FIO_displayCompressionParameters(const FIO_prefs_t* prefs)
|
|
|
2371
2118
|
DISPLAY("%s", INDEX(sparseOptions, prefs->sparseFileSupport));
|
|
2372
2119
|
DISPLAY("%s", prefs->dictIDFlag ? "" : " --no-dictID");
|
|
2373
2120
|
DISPLAY("%s", INDEX(checkSumOptions, prefs->checksumFlag));
|
|
2374
|
-
DISPLAY(" --
|
|
2121
|
+
DISPLAY(" --block-size=%d", prefs->blockSize);
|
|
2375
2122
|
if (prefs->adaptiveMode)
|
|
2376
2123
|
DISPLAY(" --adapt=min=%d,max=%d", prefs->minAdaptLevel, prefs->maxAdaptLevel);
|
|
2377
2124
|
DISPLAY("%s", INDEX(rowMatchFinderOptions, prefs->useRowMatchFinder));
|
|
@@ -2397,7 +2144,7 @@ int FIO_compressFilename(FIO_ctx_t* const fCtx, FIO_prefs_t* const prefs, const
|
|
|
2397
2144
|
int compressionLevel, ZSTD_compressionParameters comprParams)
|
|
2398
2145
|
{
|
|
2399
2146
|
cRess_t ress = FIO_createCResources(prefs, dictFileName, UTIL_getFileSize(srcFileName), compressionLevel, comprParams);
|
|
2400
|
-
int const result = FIO_compressFilename_srcFile(fCtx, prefs,
|
|
2147
|
+
int const result = FIO_compressFilename_srcFile(fCtx, prefs, ress, dstFileName, srcFileName, compressionLevel);
|
|
2401
2148
|
|
|
2402
2149
|
#define DISPLAY_LEVEL_DEFAULT 2
|
|
2403
2150
|
|
|
@@ -2494,13 +2241,13 @@ int FIO_compressMultipleFilenames(FIO_ctx_t* const fCtx,
|
|
|
2494
2241
|
if (dstFile == NULL) { /* could not open outFileName */
|
|
2495
2242
|
error = 1;
|
|
2496
2243
|
} else {
|
|
2497
|
-
|
|
2244
|
+
AIO_WritePool_setFile(ress.writeCtx, dstFile);
|
|
2498
2245
|
for (; fCtx->currFileIdx < fCtx->nbFilesTotal; ++fCtx->currFileIdx) {
|
|
2499
|
-
status = FIO_compressFilename_srcFile(fCtx, prefs,
|
|
2246
|
+
status = FIO_compressFilename_srcFile(fCtx, prefs, ress, outFileName, inFileNamesTable[fCtx->currFileIdx], compressionLevel);
|
|
2500
2247
|
if (!status) fCtx->nbFilesProcessed++;
|
|
2501
2248
|
error |= status;
|
|
2502
2249
|
}
|
|
2503
|
-
if (
|
|
2250
|
+
if (AIO_WritePool_closeFile(ress.writeCtx))
|
|
2504
2251
|
EXM_THROW(29, "Write error (%s) : cannot properly close %s",
|
|
2505
2252
|
strerror(errno), outFileName);
|
|
2506
2253
|
}
|
|
@@ -2524,7 +2271,7 @@ int FIO_compressMultipleFilenames(FIO_ctx_t* const fCtx,
|
|
|
2524
2271
|
} else {
|
|
2525
2272
|
dstFileName = FIO_determineCompressedName(srcFileName, outDirName, suffix); /* cannot fail */
|
|
2526
2273
|
}
|
|
2527
|
-
status = FIO_compressFilename_srcFile(fCtx, prefs,
|
|
2274
|
+
status = FIO_compressFilename_srcFile(fCtx, prefs, ress, dstFileName, srcFileName, compressionLevel);
|
|
2528
2275
|
if (!status) fCtx->nbFilesProcessed++;
|
|
2529
2276
|
error |= status;
|
|
2530
2277
|
}
|