hdiffpatch 1.0.0__cp39-cp39-win32.whl
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.
- hdiffpatch/__init__.py +67 -0
- hdiffpatch/_base_config.py +56 -0
- hdiffpatch/_bzip2_config.py +102 -0
- hdiffpatch/_c_extension.cp39-win32.pyd +0 -0
- hdiffpatch/_c_extension.pyi +121 -0
- hdiffpatch/_c_extension.pyx +1068 -0
- hdiffpatch/_c_src/HDiffPatch/.git +1 -0
- hdiffpatch/_c_src/HDiffPatch/.github/workflows/ci.yml +134 -0
- hdiffpatch/_c_src/HDiffPatch/.gitignore +23 -0
- hdiffpatch/_c_src/HDiffPatch/CHANGELOG.md +244 -0
- hdiffpatch/_c_src/HDiffPatch/LICENSE +48 -0
- hdiffpatch/_c_src/HDiffPatch/Makefile +425 -0
- hdiffpatch/_c_src/HDiffPatch/README.md +528 -0
- hdiffpatch/_c_src/HDiffPatch/README_cn.md +525 -0
- hdiffpatch/_c_src/HDiffPatch/_atosize.h +83 -0
- hdiffpatch/_c_src/HDiffPatch/_clock_for_demo.h +55 -0
- hdiffpatch/_c_src/HDiffPatch/_dir_ignore.h +191 -0
- hdiffpatch/_c_src/HDiffPatch/bsdiff_wrapper/bsdiff_wrapper.cpp +380 -0
- hdiffpatch/_c_src/HDiffPatch/bsdiff_wrapper/bsdiff_wrapper.h +73 -0
- hdiffpatch/_c_src/HDiffPatch/bsdiff_wrapper/bspatch_wrapper.c +275 -0
- hdiffpatch/_c_src/HDiffPatch/bsdiff_wrapper/bspatch_wrapper.h +58 -0
- hdiffpatch/_c_src/HDiffPatch/builds/android_ndk_jni_mk/Android.mk +135 -0
- hdiffpatch/_c_src/HDiffPatch/builds/android_ndk_jni_mk/Application.mk +8 -0
- hdiffpatch/_c_src/HDiffPatch/builds/android_ndk_jni_mk/build_libs.bat +1 -0
- hdiffpatch/_c_src/HDiffPatch/builds/android_ndk_jni_mk/build_libs.sh +1 -0
- hdiffpatch/_c_src/HDiffPatch/builds/android_ndk_jni_mk/build_libs_patchers.bat +1 -0
- hdiffpatch/_c_src/HDiffPatch/builds/android_ndk_jni_mk/build_libs_patchers.sh +1 -0
- hdiffpatch/_c_src/HDiffPatch/builds/android_ndk_jni_mk/hpatch.c +44 -0
- hdiffpatch/_c_src/HDiffPatch/builds/android_ndk_jni_mk/hpatch.h +26 -0
- hdiffpatch/_c_src/HDiffPatch/builds/android_ndk_jni_mk/hpatch_jni.c +38 -0
- hdiffpatch/_c_src/HDiffPatch/builds/android_ndk_jni_mk/java/com/github/sisong/HPatch.java +21 -0
- hdiffpatch/_c_src/HDiffPatch/builds/codeblocks/HDiffPatch.workspace +8 -0
- hdiffpatch/_c_src/HDiffPatch/builds/codeblocks/HDiffZ.cbp +400 -0
- hdiffpatch/_c_src/HDiffPatch/builds/codeblocks/HPatchZ.cbp +269 -0
- hdiffpatch/_c_src/HDiffPatch/builds/codeblocks/unitTest.cbp +79 -0
- hdiffpatch/_c_src/HDiffPatch/builds/vc/HDiffPatch.sln +191 -0
- hdiffpatch/_c_src/HDiffPatch/builds/vc/HDiffZ.vcxproj +456 -0
- hdiffpatch/_c_src/HDiffPatch/builds/vc/HPatchZ.vcxproj +439 -0
- hdiffpatch/_c_src/HDiffPatch/builds/vc/bzip2.vcxproj +302 -0
- hdiffpatch/_c_src/HDiffPatch/builds/vc/hpatchz_test.vcxproj +216 -0
- hdiffpatch/_c_src/HDiffPatch/builds/vc/libdeflate.vcxproj +332 -0
- hdiffpatch/_c_src/HDiffPatch/builds/vc/longPathAware.exe.manifest +7 -0
- hdiffpatch/_c_src/HDiffPatch/builds/vc/lzma.vcxproj +350 -0
- hdiffpatch/_c_src/HDiffPatch/builds/vc/testHashClash.vcxproj +294 -0
- hdiffpatch/_c_src/HDiffPatch/builds/vc/unitTest.vcxproj +369 -0
- hdiffpatch/_c_src/HDiffPatch/builds/vc/zlib.vcxproj +315 -0
- hdiffpatch/_c_src/HDiffPatch/builds/vc/zstd.vcxproj +357 -0
- hdiffpatch/_c_src/HDiffPatch/builds/xcode/HDiffPatch.xcworkspace/contents.xcworkspacedata +39 -0
- hdiffpatch/_c_src/HDiffPatch/builds/xcode/HDiffPatch.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- hdiffpatch/_c_src/HDiffPatch/builds/xcode/HDiffPatch.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +8 -0
- hdiffpatch/_c_src/HDiffPatch/builds/xcode/bestParams.xcodeproj/project.pbxproj +447 -0
- hdiffpatch/_c_src/HDiffPatch/builds/xcode/bestParams.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
- hdiffpatch/_c_src/HDiffPatch/builds/xcode/hdiffz.xcodeproj/project.pbxproj +655 -0
- hdiffpatch/_c_src/HDiffPatch/builds/xcode/hdiffz.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
- hdiffpatch/_c_src/HDiffPatch/builds/xcode/hdiffz.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- hdiffpatch/_c_src/HDiffPatch/builds/xcode/hpatchz.xcodeproj/project.pbxproj +410 -0
- hdiffpatch/_c_src/HDiffPatch/builds/xcode/hpatchz.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
- hdiffpatch/_c_src/HDiffPatch/builds/xcode/libdeflate.xcodeproj/project.pbxproj +286 -0
- hdiffpatch/_c_src/HDiffPatch/builds/xcode/libdeflate.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
- hdiffpatch/_c_src/HDiffPatch/builds/xcode/lz4.xcodeproj/project.pbxproj +268 -0
- hdiffpatch/_c_src/HDiffPatch/builds/xcode/lz4.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
- hdiffpatch/_c_src/HDiffPatch/builds/xcode/lzma.xcodeproj/project.pbxproj +585 -0
- hdiffpatch/_c_src/HDiffPatch/builds/xcode/lzma.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
- hdiffpatch/_c_src/HDiffPatch/builds/xcode/testHashClash.xcodeproj/project.pbxproj +301 -0
- hdiffpatch/_c_src/HDiffPatch/builds/xcode/testHashClash.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
- hdiffpatch/_c_src/HDiffPatch/builds/xcode/testHashClash.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- hdiffpatch/_c_src/HDiffPatch/builds/xcode/unitTest.xcodeproj/project.pbxproj +549 -0
- hdiffpatch/_c_src/HDiffPatch/builds/xcode/unitTest.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
- hdiffpatch/_c_src/HDiffPatch/builds/xcode/zlib.xcodeproj/project.pbxproj +308 -0
- hdiffpatch/_c_src/HDiffPatch/builds/xcode/zlib.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
- hdiffpatch/_c_src/HDiffPatch/builds/xcode/zstd.xcodeproj/project.pbxproj +515 -0
- hdiffpatch/_c_src/HDiffPatch/builds/xcode/zstd.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
- hdiffpatch/_c_src/HDiffPatch/builds/xcode_iOS_hpatchz/hpatch_objc/hpatch_objc.h +30 -0
- hdiffpatch/_c_src/HDiffPatch/builds/xcode_iOS_hpatchz/hpatch_objc/hpatch_objc.m +32 -0
- hdiffpatch/_c_src/HDiffPatch/builds/xcode_iOS_hpatchz/hpatchz.xcodeproj/project.pbxproj +745 -0
- hdiffpatch/_c_src/HDiffPatch/builds/xcode_iOS_hpatchz/hpatchz.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
- hdiffpatch/_c_src/HDiffPatch/builds/xcode_iOS_hpatchz/hpatchz.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- hdiffpatch/_c_src/HDiffPatch/checksum_plugin_demo.h +716 -0
- hdiffpatch/_c_src/HDiffPatch/compress_parallel.cpp +201 -0
- hdiffpatch/_c_src/HDiffPatch/compress_parallel.h +59 -0
- hdiffpatch/_c_src/HDiffPatch/compress_plugin_demo.h +1519 -0
- hdiffpatch/_c_src/HDiffPatch/decompress_plugin_demo.h +1634 -0
- hdiffpatch/_c_src/HDiffPatch/dirDiffPatch/dir_diff/dir_diff.cpp +867 -0
- hdiffpatch/_c_src/HDiffPatch/dirDiffPatch/dir_diff/dir_diff.h +79 -0
- hdiffpatch/_c_src/HDiffPatch/dirDiffPatch/dir_diff/dir_diff_tools.cpp +226 -0
- hdiffpatch/_c_src/HDiffPatch/dirDiffPatch/dir_diff/dir_diff_tools.h +190 -0
- hdiffpatch/_c_src/HDiffPatch/dirDiffPatch/dir_diff/dir_manifest.cpp +357 -0
- hdiffpatch/_c_src/HDiffPatch/dirDiffPatch/dir_diff/dir_manifest.h +87 -0
- hdiffpatch/_c_src/HDiffPatch/dirDiffPatch/dir_diff/file_for_dirDiff.h +151 -0
- hdiffpatch/_c_src/HDiffPatch/dirDiffPatch/dir_patch/dir_patch.c +814 -0
- hdiffpatch/_c_src/HDiffPatch/dirDiffPatch/dir_patch/dir_patch.h +241 -0
- hdiffpatch/_c_src/HDiffPatch/dirDiffPatch/dir_patch/dir_patch_private.h +47 -0
- hdiffpatch/_c_src/HDiffPatch/dirDiffPatch/dir_patch/dir_patch_tools.c +114 -0
- hdiffpatch/_c_src/HDiffPatch/dirDiffPatch/dir_patch/dir_patch_tools.h +53 -0
- hdiffpatch/_c_src/HDiffPatch/dirDiffPatch/dir_patch/dir_patch_types.h +65 -0
- hdiffpatch/_c_src/HDiffPatch/dirDiffPatch/dir_patch/new_dir_output.c +340 -0
- hdiffpatch/_c_src/HDiffPatch/dirDiffPatch/dir_patch/new_dir_output.h +144 -0
- hdiffpatch/_c_src/HDiffPatch/dirDiffPatch/dir_patch/new_stream.c +176 -0
- hdiffpatch/_c_src/HDiffPatch/dirDiffPatch/dir_patch/new_stream.h +84 -0
- hdiffpatch/_c_src/HDiffPatch/dirDiffPatch/dir_patch/ref_stream.c +146 -0
- hdiffpatch/_c_src/HDiffPatch/dirDiffPatch/dir_patch/ref_stream.h +61 -0
- hdiffpatch/_c_src/HDiffPatch/dirDiffPatch/dir_patch/res_handle_limit.c +152 -0
- hdiffpatch/_c_src/HDiffPatch/dirDiffPatch/dir_patch/res_handle_limit.h +76 -0
- hdiffpatch/_c_src/HDiffPatch/file_for_patch.c +658 -0
- hdiffpatch/_c_src/HDiffPatch/file_for_patch.h +298 -0
- hdiffpatch/_c_src/HDiffPatch/hdiffz.cpp +2112 -0
- hdiffpatch/_c_src/HDiffPatch/hdiffz_import_patch.c +31 -0
- hdiffpatch/_c_src/HDiffPatch/hdiffz_import_patch.h +42 -0
- hdiffpatch/_c_src/HDiffPatch/hpatch_dir_listener.h +302 -0
- hdiffpatch/_c_src/HDiffPatch/hpatchz.c +1683 -0
- hdiffpatch/_c_src/HDiffPatch/libHDiffPatch/HDiff/diff.cpp +1709 -0
- hdiffpatch/_c_src/HDiffPatch/libHDiffPatch/HDiff/diff.h +200 -0
- hdiffpatch/_c_src/HDiffPatch/libHDiffPatch/HDiff/diff_for_hpatch_lite.h +33 -0
- hdiffpatch/_c_src/HDiffPatch/libHDiffPatch/HDiff/diff_types.h +173 -0
- hdiffpatch/_c_src/HDiffPatch/libHDiffPatch/HDiff/match_block.cpp +356 -0
- hdiffpatch/_c_src/HDiffPatch/libHDiffPatch/HDiff/match_block.h +149 -0
- hdiffpatch/_c_src/HDiffPatch/libHDiffPatch/HDiff/private_diff/bytes_rle.cpp +383 -0
- hdiffpatch/_c_src/HDiffPatch/libHDiffPatch/HDiff/private_diff/bytes_rle.h +73 -0
- hdiffpatch/_c_src/HDiffPatch/libHDiffPatch/HDiff/private_diff/compress_detect.cpp +184 -0
- hdiffpatch/_c_src/HDiffPatch/libHDiffPatch/HDiff/private_diff/compress_detect.h +88 -0
- hdiffpatch/_c_src/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/config.h +89 -0
- hdiffpatch/_c_src/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/divsufsort.c.inc.h +319 -0
- hdiffpatch/_c_src/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/divsufsort.cpp +10 -0
- hdiffpatch/_c_src/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/divsufsort.h +97 -0
- hdiffpatch/_c_src/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/divsufsort64.cpp +14 -0
- hdiffpatch/_c_src/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/divsufsort64.h +108 -0
- hdiffpatch/_c_src/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/divsufsort_private.h +186 -0
- hdiffpatch/_c_src/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/sssort.c.inc.h +780 -0
- hdiffpatch/_c_src/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/trsort.c.inc.h +575 -0
- hdiffpatch/_c_src/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/adler_roll.c +435 -0
- hdiffpatch/_c_src/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/adler_roll.h +144 -0
- hdiffpatch/_c_src/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/bloom_filter.h +167 -0
- hdiffpatch/_c_src/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/covers.h +138 -0
- hdiffpatch/_c_src/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/digest_matcher.cpp +763 -0
- hdiffpatch/_c_src/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/digest_matcher.h +97 -0
- hdiffpatch/_c_src/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/stream_serialize.cpp +921 -0
- hdiffpatch/_c_src/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/stream_serialize.h +319 -0
- hdiffpatch/_c_src/HDiffPatch/libHDiffPatch/HDiff/private_diff/mem_buf.h +72 -0
- hdiffpatch/_c_src/HDiffPatch/libHDiffPatch/HDiff/private_diff/pack_uint.h +132 -0
- hdiffpatch/_c_src/HDiffPatch/libHDiffPatch/HDiff/private_diff/qsort_parallel.h +125 -0
- hdiffpatch/_c_src/HDiffPatch/libHDiffPatch/HDiff/private_diff/suffix_string.cpp +428 -0
- hdiffpatch/_c_src/HDiffPatch/libHDiffPatch/HDiff/private_diff/suffix_string.h +133 -0
- hdiffpatch/_c_src/HDiffPatch/libHDiffPatch/HPatch/checksum_plugin.h +52 -0
- hdiffpatch/_c_src/HDiffPatch/libHDiffPatch/HPatch/patch.c +2384 -0
- hdiffpatch/_c_src/HDiffPatch/libHDiffPatch/HPatch/patch.h +229 -0
- hdiffpatch/_c_src/HDiffPatch/libHDiffPatch/HPatch/patch_private.h +213 -0
- hdiffpatch/_c_src/HDiffPatch/libHDiffPatch/HPatch/patch_types.h +342 -0
- hdiffpatch/_c_src/HDiffPatch/libHDiffPatch/HPatchLite/hpatch_lite.c +186 -0
- hdiffpatch/_c_src/HDiffPatch/libHDiffPatch/HPatchLite/hpatch_lite.h +48 -0
- hdiffpatch/_c_src/HDiffPatch/libHDiffPatch/HPatchLite/hpatch_lite_input_cache.h +31 -0
- hdiffpatch/_c_src/HDiffPatch/libHDiffPatch/HPatchLite/hpatch_lite_types.h +100 -0
- hdiffpatch/_c_src/HDiffPatch/libParallel/parallel_channel.cpp +170 -0
- hdiffpatch/_c_src/HDiffPatch/libParallel/parallel_channel.h +153 -0
- hdiffpatch/_c_src/HDiffPatch/libParallel/parallel_import.cpp +367 -0
- hdiffpatch/_c_src/HDiffPatch/libParallel/parallel_import.h +92 -0
- hdiffpatch/_c_src/HDiffPatch/libhsync/sync_client/dict_decompress_plugin.h +153 -0
- hdiffpatch/_c_src/HDiffPatch/libhsync/sync_client/dir_sync_client.cpp +437 -0
- hdiffpatch/_c_src/HDiffPatch/libhsync/sync_client/dir_sync_client.h +88 -0
- hdiffpatch/_c_src/HDiffPatch/libhsync/sync_client/match_in_old.cpp +572 -0
- hdiffpatch/_c_src/HDiffPatch/libhsync/sync_client/match_in_old.h +46 -0
- hdiffpatch/_c_src/HDiffPatch/libhsync/sync_client/sync_client.cpp +610 -0
- hdiffpatch/_c_src/HDiffPatch/libhsync/sync_client/sync_client.h +75 -0
- hdiffpatch/_c_src/HDiffPatch/libhsync/sync_client/sync_client_private.h +49 -0
- hdiffpatch/_c_src/HDiffPatch/libhsync/sync_client/sync_client_type.h +156 -0
- hdiffpatch/_c_src/HDiffPatch/libhsync/sync_client/sync_client_type_private.h +204 -0
- hdiffpatch/_c_src/HDiffPatch/libhsync/sync_client/sync_diff_data.cpp +250 -0
- hdiffpatch/_c_src/HDiffPatch/libhsync/sync_client/sync_diff_data.h +67 -0
- hdiffpatch/_c_src/HDiffPatch/libhsync/sync_client/sync_info_client.cpp +674 -0
- hdiffpatch/_c_src/HDiffPatch/libhsync/sync_client/sync_info_client.h +121 -0
- hdiffpatch/_c_src/HDiffPatch/libhsync/sync_make/dict_compress_plugin.h +83 -0
- hdiffpatch/_c_src/HDiffPatch/libhsync/sync_make/dir_sync_make.cpp +131 -0
- hdiffpatch/_c_src/HDiffPatch/libhsync/sync_make/dir_sync_make.h +56 -0
- hdiffpatch/_c_src/HDiffPatch/libhsync/sync_make/hsynz_plugin.h +55 -0
- hdiffpatch/_c_src/HDiffPatch/libhsync/sync_make/match_in_new.cpp +147 -0
- hdiffpatch/_c_src/HDiffPatch/libhsync/sync_make/match_in_new.h +38 -0
- hdiffpatch/_c_src/HDiffPatch/libhsync/sync_make/sync_info_make.cpp +328 -0
- hdiffpatch/_c_src/HDiffPatch/libhsync/sync_make/sync_info_make.h +65 -0
- hdiffpatch/_c_src/HDiffPatch/libhsync/sync_make/sync_make.cpp +478 -0
- hdiffpatch/_c_src/HDiffPatch/libhsync/sync_make/sync_make.h +68 -0
- hdiffpatch/_c_src/HDiffPatch/libhsync/sync_make/sync_make_hash_clash.h +111 -0
- hdiffpatch/_c_src/HDiffPatch/test/_private_searchBestParams.cpp +301 -0
- hdiffpatch/_c_src/HDiffPatch/test/hpatchz_test.cpp +291 -0
- hdiffpatch/_c_src/HDiffPatch/test/testHashClash.cpp +538 -0
- hdiffpatch/_c_src/HDiffPatch/test/unit_test.cpp +861 -0
- hdiffpatch/_c_src/HDiffPatch/vcdiff_wrapper/vcdiff_wrapper.cpp +619 -0
- hdiffpatch/_c_src/HDiffPatch/vcdiff_wrapper/vcdiff_wrapper.h +95 -0
- hdiffpatch/_c_src/HDiffPatch/vcdiff_wrapper/vcpatch_code_table.h +78 -0
- hdiffpatch/_c_src/HDiffPatch/vcdiff_wrapper/vcpatch_wrapper.c +950 -0
- hdiffpatch/_c_src/HDiffPatch/vcdiff_wrapper/vcpatch_wrapper.h +72 -0
- hdiffpatch/_c_src/bzip2/.git +1 -0
- hdiffpatch/_c_src/bzip2/.gitattributes +1 -0
- hdiffpatch/_c_src/bzip2/.gitignore +9 -0
- hdiffpatch/_c_src/bzip2/CHANGES +356 -0
- hdiffpatch/_c_src/bzip2/LICENSE +42 -0
- hdiffpatch/_c_src/bzip2/Makefile +223 -0
- hdiffpatch/_c_src/bzip2/Makefile-libbz2_so +59 -0
- hdiffpatch/_c_src/bzip2/README +196 -0
- hdiffpatch/_c_src/bzip2/README.COMPILATION.PROBLEMS +58 -0
- hdiffpatch/_c_src/bzip2/README.XML.STUFF +45 -0
- hdiffpatch/_c_src/bzip2/blocksort.c +1094 -0
- hdiffpatch/_c_src/bzip2/bz-common.xsl +39 -0
- hdiffpatch/_c_src/bzip2/bz-fo.xsl +276 -0
- hdiffpatch/_c_src/bzip2/bz-html.xsl +23 -0
- hdiffpatch/_c_src/bzip2/bzdiff +76 -0
- hdiffpatch/_c_src/bzip2/bzdiff.1 +52 -0
- hdiffpatch/_c_src/bzip2/bzgrep +85 -0
- hdiffpatch/_c_src/bzip2/bzgrep.1 +62 -0
- hdiffpatch/_c_src/bzip2/bzip.css +74 -0
- hdiffpatch/_c_src/bzip2/bzip2.1 +464 -0
- hdiffpatch/_c_src/bzip2/bzip2.c +2046 -0
- hdiffpatch/_c_src/bzip2/bzip2recover.c +516 -0
- hdiffpatch/_c_src/bzip2/bzlib.c +1572 -0
- hdiffpatch/_c_src/bzip2/bzlib.h +282 -0
- hdiffpatch/_c_src/bzip2/bzlib_private.h +509 -0
- hdiffpatch/_c_src/bzip2/bzmore +61 -0
- hdiffpatch/_c_src/bzip2/bzmore.1 +156 -0
- hdiffpatch/_c_src/bzip2/compress.c +672 -0
- hdiffpatch/_c_src/bzip2/crctable.c +104 -0
- hdiffpatch/_c_src/bzip2/decompress.c +652 -0
- hdiffpatch/_c_src/bzip2/dlltest.c +175 -0
- hdiffpatch/_c_src/bzip2/dlltest.dsp +93 -0
- hdiffpatch/_c_src/bzip2/entities.xml +10 -0
- hdiffpatch/_c_src/bzip2/format.pl +68 -0
- hdiffpatch/_c_src/bzip2/huffman.c +205 -0
- hdiffpatch/_c_src/bzip2/libbz2.def +27 -0
- hdiffpatch/_c_src/bzip2/libbz2.dsp +130 -0
- hdiffpatch/_c_src/bzip2/makefile.msc +63 -0
- hdiffpatch/_c_src/bzip2/manual.xml +2979 -0
- hdiffpatch/_c_src/bzip2/mk251.c +31 -0
- hdiffpatch/_c_src/bzip2/prepare-release.sh +82 -0
- hdiffpatch/_c_src/bzip2/randtable.c +84 -0
- hdiffpatch/_c_src/bzip2/release-update.sh +90 -0
- hdiffpatch/_c_src/bzip2/sample1.bz2 +0 -0
- hdiffpatch/_c_src/bzip2/sample1.ref +0 -0
- hdiffpatch/_c_src/bzip2/sample2.bz2 +0 -0
- hdiffpatch/_c_src/bzip2/sample2.ref +0 -0
- hdiffpatch/_c_src/bzip2/sample3.bz2 +0 -0
- hdiffpatch/_c_src/bzip2/sample3.ref +30007 -0
- hdiffpatch/_c_src/bzip2/spewG.c +54 -0
- hdiffpatch/_c_src/bzip2/unzcrash.c +141 -0
- hdiffpatch/_c_src/bzip2/words0 +9 -0
- hdiffpatch/_c_src/bzip2/words1 +4 -0
- hdiffpatch/_c_src/bzip2/words2 +5 -0
- hdiffpatch/_c_src/bzip2/words3 +30 -0
- hdiffpatch/_c_src/bzip2/xmlproc.sh +114 -0
- hdiffpatch/_c_src/foo.c +11 -0
- hdiffpatch/_c_src/foo.h +24 -0
- hdiffpatch/_c_src/libdeflate/.cirrus.yml +12 -0
- hdiffpatch/_c_src/libdeflate/.git +1 -0
- hdiffpatch/_c_src/libdeflate/.github/workflows/ci.yml +290 -0
- hdiffpatch/_c_src/libdeflate/.gitignore +6 -0
- hdiffpatch/_c_src/libdeflate/CMakeLists.txt +319 -0
- hdiffpatch/_c_src/libdeflate/COPYING +22 -0
- hdiffpatch/_c_src/libdeflate/NEWS.md +515 -0
- hdiffpatch/_c_src/libdeflate/README.md +341 -0
- hdiffpatch/_c_src/libdeflate/common_defs.h +747 -0
- hdiffpatch/_c_src/libdeflate/lib/adler32.c +162 -0
- hdiffpatch/_c_src/libdeflate/lib/arm/adler32_impl.h +365 -0
- hdiffpatch/_c_src/libdeflate/lib/arm/cpu_features.c +230 -0
- hdiffpatch/_c_src/libdeflate/lib/arm/cpu_features.h +216 -0
- hdiffpatch/_c_src/libdeflate/lib/arm/crc32_impl.h +596 -0
- hdiffpatch/_c_src/libdeflate/lib/arm/crc32_pmull_helpers.h +156 -0
- hdiffpatch/_c_src/libdeflate/lib/arm/crc32_pmull_wide.h +226 -0
- hdiffpatch/_c_src/libdeflate/lib/arm/matchfinder_impl.h +78 -0
- hdiffpatch/_c_src/libdeflate/lib/bt_matchfinder.h +342 -0
- hdiffpatch/_c_src/libdeflate/lib/cpu_features_common.h +93 -0
- hdiffpatch/_c_src/libdeflate/lib/crc32.c +262 -0
- hdiffpatch/_c_src/libdeflate/lib/crc32_multipliers.h +375 -0
- hdiffpatch/_c_src/libdeflate/lib/crc32_tables.h +587 -0
- hdiffpatch/_c_src/libdeflate/lib/decompress_template.h +849 -0
- hdiffpatch/_c_src/libdeflate/lib/deflate_compress.c +4394 -0
- hdiffpatch/_c_src/libdeflate/lib/deflate_compress.h +15 -0
- hdiffpatch/_c_src/libdeflate/lib/deflate_constants.h +56 -0
- hdiffpatch/_c_src/libdeflate/lib/deflate_decompress.c +1249 -0
- hdiffpatch/_c_src/libdeflate/lib/gzip_compress.c +112 -0
- hdiffpatch/_c_src/libdeflate/lib/gzip_constants.h +45 -0
- hdiffpatch/_c_src/libdeflate/lib/gzip_decompress.c +184 -0
- hdiffpatch/_c_src/libdeflate/lib/gzip_overhead.h +20 -0
- hdiffpatch/_c_src/libdeflate/lib/hc_matchfinder.h +401 -0
- hdiffpatch/_c_src/libdeflate/lib/ht_matchfinder.h +240 -0
- hdiffpatch/_c_src/libdeflate/lib/lib_common.h +108 -0
- hdiffpatch/_c_src/libdeflate/lib/matchfinder_common.h +224 -0
- hdiffpatch/_c_src/libdeflate/lib/riscv/matchfinder_impl.h +97 -0
- hdiffpatch/_c_src/libdeflate/lib/utils.c +141 -0
- hdiffpatch/_c_src/libdeflate/lib/x86/adler32_impl.h +136 -0
- hdiffpatch/_c_src/libdeflate/lib/x86/adler32_template.h +518 -0
- hdiffpatch/_c_src/libdeflate/lib/x86/cpu_features.c +212 -0
- hdiffpatch/_c_src/libdeflate/lib/x86/cpu_features.h +179 -0
- hdiffpatch/_c_src/libdeflate/lib/x86/crc32_impl.h +160 -0
- hdiffpatch/_c_src/libdeflate/lib/x86/crc32_pclmul_template.h +467 -0
- hdiffpatch/_c_src/libdeflate/lib/x86/decompress_impl.h +57 -0
- hdiffpatch/_c_src/libdeflate/lib/x86/matchfinder_impl.h +122 -0
- hdiffpatch/_c_src/libdeflate/lib/zlib_compress.c +82 -0
- hdiffpatch/_c_src/libdeflate/lib/zlib_constants.h +21 -0
- hdiffpatch/_c_src/libdeflate/lib/zlib_decompress.c +104 -0
- hdiffpatch/_c_src/libdeflate/libdeflate-config.cmake.in +3 -0
- hdiffpatch/_c_src/libdeflate/libdeflate.h +534 -0
- hdiffpatch/_c_src/libdeflate/libdeflate.pc.in +18 -0
- hdiffpatch/_c_src/libdeflate/pgzip/Makefile +74 -0
- hdiffpatch/_c_src/libdeflate/pgzip/vc/pgzip.sln +37 -0
- hdiffpatch/_c_src/libdeflate/pgzip/vc/pgzip.vcxproj +215 -0
- hdiffpatch/_c_src/libdeflate/pgzip/vc/pgzip.vcxproj.filters +46 -0
- hdiffpatch/_c_src/libdeflate/pgzip/xcode/pgzip.xcodeproj/project.pbxproj +326 -0
- hdiffpatch/_c_src/libdeflate/pgzip/xcode/pgzip.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
- hdiffpatch/_c_src/libdeflate/pgzip/xcode/pgzip.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- hdiffpatch/_c_src/libdeflate/pgzip/xcode/pgzip.xcodeproj/xcshareddata/xcschemes/pgzip.xcscheme +78 -0
- hdiffpatch/_c_src/libdeflate/programs/CMakeLists.txt +105 -0
- hdiffpatch/_c_src/libdeflate/programs/benchmark.c +696 -0
- hdiffpatch/_c_src/libdeflate/programs/checksum.c +218 -0
- hdiffpatch/_c_src/libdeflate/programs/config.h.in +19 -0
- hdiffpatch/_c_src/libdeflate/programs/gzip.c +688 -0
- hdiffpatch/_c_src/libdeflate/programs/gzip_compress_by_stream_mt.cpp +336 -0
- hdiffpatch/_c_src/libdeflate/programs/gzip_compress_by_stream_mt.h +43 -0
- hdiffpatch/_c_src/libdeflate/programs/gzip_decompress_by_stream_mt.cpp +483 -0
- hdiffpatch/_c_src/libdeflate/programs/gzip_decompress_by_stream_mt.h +53 -0
- hdiffpatch/_c_src/libdeflate/programs/pgzip.c +523 -0
- hdiffpatch/_c_src/libdeflate/programs/prog_util.c +541 -0
- hdiffpatch/_c_src/libdeflate/programs/prog_util.h +226 -0
- hdiffpatch/_c_src/libdeflate/programs/test_checksums.c +200 -0
- hdiffpatch/_c_src/libdeflate/programs/test_custom_malloc.c +155 -0
- hdiffpatch/_c_src/libdeflate/programs/test_incomplete_codes.c +385 -0
- hdiffpatch/_c_src/libdeflate/programs/test_invalid_streams.c +130 -0
- hdiffpatch/_c_src/libdeflate/programs/test_litrunlen_overflow.c +72 -0
- hdiffpatch/_c_src/libdeflate/programs/test_overread.c +95 -0
- hdiffpatch/_c_src/libdeflate/programs/test_slow_decompression.c +472 -0
- hdiffpatch/_c_src/libdeflate/programs/test_trailing_bytes.c +151 -0
- hdiffpatch/_c_src/libdeflate/programs/test_util.c +237 -0
- hdiffpatch/_c_src/libdeflate/programs/test_util.h +61 -0
- hdiffpatch/_c_src/libdeflate/programs/tgetopt.c +118 -0
- hdiffpatch/_c_src/libdeflate/scripts/android_build.sh +118 -0
- hdiffpatch/_c_src/libdeflate/scripts/android_tests.sh +69 -0
- hdiffpatch/_c_src/libdeflate/scripts/benchmark.sh +10 -0
- hdiffpatch/_c_src/libdeflate/scripts/checksum.sh +10 -0
- hdiffpatch/_c_src/libdeflate/scripts/checksum_benchmarks.sh +253 -0
- hdiffpatch/_c_src/libdeflate/scripts/cmake-helper.sh +17 -0
- hdiffpatch/_c_src/libdeflate/scripts/deflate_benchmarks.sh +119 -0
- hdiffpatch/_c_src/libdeflate/scripts/exec_tests.sh +38 -0
- hdiffpatch/_c_src/libdeflate/scripts/gen-crc32-consts.py +158 -0
- hdiffpatch/_c_src/libdeflate/scripts/gen-release-archives.sh +37 -0
- hdiffpatch/_c_src/libdeflate/scripts/gen_bitreverse_tab.py +19 -0
- hdiffpatch/_c_src/libdeflate/scripts/gen_default_litlen_costs.py +44 -0
- hdiffpatch/_c_src/libdeflate/scripts/gen_offset_slot_map.py +29 -0
- hdiffpatch/_c_src/libdeflate/scripts/gzip_tests.sh +523 -0
- hdiffpatch/_c_src/libdeflate/scripts/libFuzzer/.gitignore +1 -0
- hdiffpatch/_c_src/libdeflate/scripts/libFuzzer/deflate_compress/corpus/0 +0 -0
- hdiffpatch/_c_src/libdeflate/scripts/libFuzzer/deflate_compress/fuzz.c +95 -0
- hdiffpatch/_c_src/libdeflate/scripts/libFuzzer/deflate_decompress/corpus/0 +3 -0
- hdiffpatch/_c_src/libdeflate/scripts/libFuzzer/deflate_decompress/fuzz.c +62 -0
- hdiffpatch/_c_src/libdeflate/scripts/libFuzzer/fuzz.sh +108 -0
- hdiffpatch/_c_src/libdeflate/scripts/libFuzzer/gzip_decompress/corpus/0 +0 -0
- hdiffpatch/_c_src/libdeflate/scripts/libFuzzer/gzip_decompress/fuzz.c +19 -0
- hdiffpatch/_c_src/libdeflate/scripts/libFuzzer/zlib_decompress/corpus/0 +3 -0
- hdiffpatch/_c_src/libdeflate/scripts/libFuzzer/zlib_decompress/fuzz.c +19 -0
- hdiffpatch/_c_src/libdeflate/scripts/run_tests.sh +416 -0
- hdiffpatch/_c_src/libdeflate/scripts/toolchain-i686-w64-mingw32.cmake +8 -0
- hdiffpatch/_c_src/libdeflate/scripts/toolchain-x86_64-w64-mingw32.cmake +8 -0
- hdiffpatch/_c_src/libmd5/.git +1 -0
- hdiffpatch/_c_src/libmd5/md5.c +381 -0
- hdiffpatch/_c_src/libmd5/md5.h +91 -0
- hdiffpatch/_c_src/libmd5/md5main.c +139 -0
- hdiffpatch/_c_src/lzma/.git +1 -0
- hdiffpatch/_c_src/lzma/Asm/arm/7zCrcOpt.asm +100 -0
- hdiffpatch/_c_src/lzma/Asm/arm64/7zAsm.S +181 -0
- hdiffpatch/_c_src/lzma/Asm/arm64/LzmaDecOpt.S +1487 -0
- hdiffpatch/_c_src/lzma/Asm/x86/7zAsm.asm +341 -0
- hdiffpatch/_c_src/lzma/Asm/x86/7zCrcOpt.asm +258 -0
- hdiffpatch/_c_src/lzma/Asm/x86/AesOpt.asm +742 -0
- hdiffpatch/_c_src/lzma/Asm/x86/LzFindOpt.asm +540 -0
- hdiffpatch/_c_src/lzma/Asm/x86/LzmaDecOpt.asm +1339 -0
- hdiffpatch/_c_src/lzma/Asm/x86/Sha256Opt.asm +275 -0
- hdiffpatch/_c_src/lzma/Asm/x86/XzCrc64Opt.asm +523 -0
- hdiffpatch/_c_src/lzma/C/7z.h +204 -0
- hdiffpatch/_c_src/lzma/C/7zAlloc.c +89 -0
- hdiffpatch/_c_src/lzma/C/7zAlloc.h +19 -0
- hdiffpatch/_c_src/lzma/C/7zArcIn.c +1786 -0
- hdiffpatch/_c_src/lzma/C/7zBuf.c +36 -0
- hdiffpatch/_c_src/lzma/C/7zBuf.h +35 -0
- hdiffpatch/_c_src/lzma/C/7zBuf2.c +52 -0
- hdiffpatch/_c_src/lzma/C/7zCrc.c +464 -0
- hdiffpatch/_c_src/lzma/C/7zCrc.h +28 -0
- hdiffpatch/_c_src/lzma/C/7zCrcOpt.c +199 -0
- hdiffpatch/_c_src/lzma/C/7zDec.c +673 -0
- hdiffpatch/_c_src/lzma/C/7zFile.c +443 -0
- hdiffpatch/_c_src/lzma/C/7zFile.h +92 -0
- hdiffpatch/_c_src/lzma/C/7zStream.c +199 -0
- hdiffpatch/_c_src/lzma/C/7zTypes.h +597 -0
- hdiffpatch/_c_src/lzma/C/7zVersion.h +27 -0
- hdiffpatch/_c_src/lzma/C/7zVersion.rc +55 -0
- hdiffpatch/_c_src/lzma/C/7zWindows.h +101 -0
- hdiffpatch/_c_src/lzma/C/7zip_gcc_c.mak +360 -0
- hdiffpatch/_c_src/lzma/C/Aes.c +429 -0
- hdiffpatch/_c_src/lzma/C/Aes.h +60 -0
- hdiffpatch/_c_src/lzma/C/AesOpt.c +1002 -0
- hdiffpatch/_c_src/lzma/C/Alloc.c +605 -0
- hdiffpatch/_c_src/lzma/C/Alloc.h +76 -0
- hdiffpatch/_c_src/lzma/C/Asm_c.mak +12 -0
- hdiffpatch/_c_src/lzma/C/Bcj2.c +290 -0
- hdiffpatch/_c_src/lzma/C/Bcj2.h +332 -0
- hdiffpatch/_c_src/lzma/C/Bcj2Enc.c +506 -0
- hdiffpatch/_c_src/lzma/C/Bra.c +709 -0
- hdiffpatch/_c_src/lzma/C/Bra.h +105 -0
- hdiffpatch/_c_src/lzma/C/Bra86.c +187 -0
- hdiffpatch/_c_src/lzma/C/BraIA64.c +14 -0
- hdiffpatch/_c_src/lzma/C/Compiler.h +236 -0
- hdiffpatch/_c_src/lzma/C/CpuArch.c +970 -0
- hdiffpatch/_c_src/lzma/C/CpuArch.h +678 -0
- hdiffpatch/_c_src/lzma/C/Delta.c +169 -0
- hdiffpatch/_c_src/lzma/C/Delta.h +19 -0
- hdiffpatch/_c_src/lzma/C/DllSecur.c +99 -0
- hdiffpatch/_c_src/lzma/C/DllSecur.h +20 -0
- hdiffpatch/_c_src/lzma/C/LzFind.c +1746 -0
- hdiffpatch/_c_src/lzma/C/LzFind.h +160 -0
- hdiffpatch/_c_src/lzma/C/LzFindMt.c +1414 -0
- hdiffpatch/_c_src/lzma/C/LzFindMt.h +112 -0
- hdiffpatch/_c_src/lzma/C/LzFindOpt.c +578 -0
- hdiffpatch/_c_src/lzma/C/LzHash.h +34 -0
- hdiffpatch/_c_src/lzma/C/Lzma2Dec.c +493 -0
- hdiffpatch/_c_src/lzma/C/Lzma2Dec.h +121 -0
- hdiffpatch/_c_src/lzma/C/Lzma2DecMt.c +1095 -0
- hdiffpatch/_c_src/lzma/C/Lzma2DecMt.h +81 -0
- hdiffpatch/_c_src/lzma/C/Lzma2Enc.c +805 -0
- hdiffpatch/_c_src/lzma/C/Lzma2Enc.h +57 -0
- hdiffpatch/_c_src/lzma/C/Lzma86.h +111 -0
- hdiffpatch/_c_src/lzma/C/Lzma86Dec.c +53 -0
- hdiffpatch/_c_src/lzma/C/Lzma86Enc.c +103 -0
- hdiffpatch/_c_src/lzma/C/LzmaDec.c +1363 -0
- hdiffpatch/_c_src/lzma/C/LzmaDec.h +237 -0
- hdiffpatch/_c_src/lzma/C/LzmaEnc.c +3144 -0
- hdiffpatch/_c_src/lzma/C/LzmaEnc.h +83 -0
- hdiffpatch/_c_src/lzma/C/LzmaLib.c +42 -0
- hdiffpatch/_c_src/lzma/C/LzmaLib.h +138 -0
- hdiffpatch/_c_src/lzma/C/MtCoder.c +571 -0
- hdiffpatch/_c_src/lzma/C/MtCoder.h +141 -0
- hdiffpatch/_c_src/lzma/C/MtDec.c +1124 -0
- hdiffpatch/_c_src/lzma/C/MtDec.h +202 -0
- hdiffpatch/_c_src/lzma/C/Ppmd.h +169 -0
- hdiffpatch/_c_src/lzma/C/Ppmd7.c +1131 -0
- hdiffpatch/_c_src/lzma/C/Ppmd7.h +181 -0
- hdiffpatch/_c_src/lzma/C/Ppmd7Dec.c +312 -0
- hdiffpatch/_c_src/lzma/C/Ppmd7Enc.c +337 -0
- hdiffpatch/_c_src/lzma/C/Precomp.h +127 -0
- hdiffpatch/_c_src/lzma/C/RotateDefs.h +50 -0
- hdiffpatch/_c_src/lzma/C/Sha256.c +492 -0
- hdiffpatch/_c_src/lzma/C/Sha256.h +86 -0
- hdiffpatch/_c_src/lzma/C/Sha256Opt.c +451 -0
- hdiffpatch/_c_src/lzma/C/Sort.c +141 -0
- hdiffpatch/_c_src/lzma/C/Sort.h +18 -0
- hdiffpatch/_c_src/lzma/C/SwapBytes.c +835 -0
- hdiffpatch/_c_src/lzma/C/SwapBytes.h +17 -0
- hdiffpatch/_c_src/lzma/C/Threads.c +581 -0
- hdiffpatch/_c_src/lzma/C/Threads.h +250 -0
- hdiffpatch/_c_src/lzma/C/Util/7z/7z.dsp +249 -0
- hdiffpatch/_c_src/lzma/C/Util/7z/7z.dsw +29 -0
- hdiffpatch/_c_src/lzma/C/Util/7z/7zMain.c +889 -0
- hdiffpatch/_c_src/lzma/C/Util/7z/Precomp.c +4 -0
- hdiffpatch/_c_src/lzma/C/Util/7z/Precomp.h +13 -0
- hdiffpatch/_c_src/lzma/C/Util/7z/makefile +44 -0
- hdiffpatch/_c_src/lzma/C/Util/7z/makefile.gcc +32 -0
- hdiffpatch/_c_src/lzma/C/Util/Lzma/LzmaUtil.c +313 -0
- hdiffpatch/_c_src/lzma/C/Util/Lzma/LzmaUtil.dsp +188 -0
- hdiffpatch/_c_src/lzma/C/Util/Lzma/LzmaUtil.dsw +29 -0
- hdiffpatch/_c_src/lzma/C/Util/Lzma/Precomp.h +13 -0
- hdiffpatch/_c_src/lzma/C/Util/Lzma/makefile +30 -0
- hdiffpatch/_c_src/lzma/C/Util/Lzma/makefile.gcc +21 -0
- hdiffpatch/_c_src/lzma/C/Util/LzmaLib/LzmaLib.def +4 -0
- hdiffpatch/_c_src/lzma/C/Util/LzmaLib/LzmaLib.dsp +202 -0
- hdiffpatch/_c_src/lzma/C/Util/LzmaLib/LzmaLib.dsw +29 -0
- hdiffpatch/_c_src/lzma/C/Util/LzmaLib/LzmaLibExports.c +15 -0
- hdiffpatch/_c_src/lzma/C/Util/LzmaLib/Precomp.c +4 -0
- hdiffpatch/_c_src/lzma/C/Util/LzmaLib/Precomp.h +13 -0
- hdiffpatch/_c_src/lzma/C/Util/LzmaLib/makefile +59 -0
- hdiffpatch/_c_src/lzma/C/Util/LzmaLib/resource.rc +3 -0
- hdiffpatch/_c_src/lzma/C/Util/SfxSetup/Precomp.c +4 -0
- hdiffpatch/_c_src/lzma/C/Util/SfxSetup/Precomp.h +13 -0
- hdiffpatch/_c_src/lzma/C/Util/SfxSetup/SfxSetup.c +657 -0
- hdiffpatch/_c_src/lzma/C/Util/SfxSetup/SfxSetup.dsp +231 -0
- hdiffpatch/_c_src/lzma/C/Util/SfxSetup/SfxSetup.dsw +29 -0
- hdiffpatch/_c_src/lzma/C/Util/SfxSetup/makefile +44 -0
- hdiffpatch/_c_src/lzma/C/Util/SfxSetup/makefile_con +40 -0
- hdiffpatch/_c_src/lzma/C/Util/SfxSetup/resource.rc +5 -0
- hdiffpatch/_c_src/lzma/C/Util/SfxSetup/setup.ico +0 -0
- hdiffpatch/_c_src/lzma/C/Xz.c +92 -0
- hdiffpatch/_c_src/lzma/C/Xz.h +536 -0
- hdiffpatch/_c_src/lzma/C/XzCrc64.c +140 -0
- hdiffpatch/_c_src/lzma/C/XzCrc64.h +26 -0
- hdiffpatch/_c_src/lzma/C/XzCrc64Opt.c +261 -0
- hdiffpatch/_c_src/lzma/C/XzDec.c +2877 -0
- hdiffpatch/_c_src/lzma/C/XzEnc.c +1378 -0
- hdiffpatch/_c_src/lzma/C/XzEnc.h +63 -0
- hdiffpatch/_c_src/lzma/C/XzIn.c +340 -0
- hdiffpatch/_c_src/lzma/C/var_clang.mak +11 -0
- hdiffpatch/_c_src/lzma/C/var_clang_arm64.mak +12 -0
- hdiffpatch/_c_src/lzma/C/var_clang_x64.mak +11 -0
- hdiffpatch/_c_src/lzma/C/var_clang_x86.mak +11 -0
- hdiffpatch/_c_src/lzma/C/var_gcc.mak +12 -0
- hdiffpatch/_c_src/lzma/C/var_gcc_arm64.mak +12 -0
- hdiffpatch/_c_src/lzma/C/var_gcc_x64.mak +10 -0
- hdiffpatch/_c_src/lzma/C/var_gcc_x86.mak +10 -0
- hdiffpatch/_c_src/lzma/C/var_mac_arm64.mak +11 -0
- hdiffpatch/_c_src/lzma/C/var_mac_x64.mak +11 -0
- hdiffpatch/_c_src/lzma/C/warn_clang.mak +1 -0
- hdiffpatch/_c_src/lzma/C/warn_clang_mac.mak +1 -0
- hdiffpatch/_c_src/lzma/C/warn_gcc.mak +51 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/7zip.mak +240 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/7zip_gcc.mak +1368 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Aes.mak +10 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Archive/7z/7zCompressionMode.cpp +3 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Archive/7z/7zCompressionMode.h +90 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Archive/7z/7zDecode.cpp +599 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Archive/7z/7zDecode.h +73 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Archive/7z/7zEncode.cpp +721 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Archive/7z/7zEncode.h +95 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Archive/7z/7zExtract.cpp +444 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Archive/7z/7zFolderInStream.cpp +264 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Archive/7z/7zFolderInStream.h +101 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Archive/7z/7zHandler.cpp +795 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Archive/7z/7zHandler.h +178 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Archive/7z/7zHandlerOut.cpp +1158 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Archive/7z/7zHeader.cpp +19 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Archive/7z/7zHeader.h +156 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Archive/7z/7zIn.cpp +1764 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Archive/7z/7zIn.h +454 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Archive/7z/7zItem.h +207 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Archive/7z/7zOut.cpp +1026 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Archive/7z/7zOut.h +346 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Archive/7z/7zProperties.cpp +182 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Archive/7z/7zProperties.h +26 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Archive/7z/7zRegister.cpp +27 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Archive/7z/7zSpecStream.cpp +31 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Archive/7z/7zSpecStream.h +49 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Archive/7z/7zUpdate.cpp +3088 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Archive/7z/7zUpdate.h +167 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Archive/7z/StdAfx.cpp +3 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Archive/7z/StdAfx.h +11 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Archive/Archive.def +14 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Archive/Archive2.def +21 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Archive/ArchiveExports.cpp +158 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Archive/Common/CoderMixer2.cpp +1144 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Archive/Common/CoderMixer2.h +447 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Archive/Common/DummyOutStream.cpp +17 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Archive/Common/DummyOutStream.h +23 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Archive/Common/HandlerOut.cpp +311 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Archive/Common/HandlerOut.h +154 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Archive/Common/InStreamWithCRC.cpp +57 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Archive/Common/InStreamWithCRC.h +64 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Archive/Common/ItemNameUtils.cpp +135 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Archive/Common/ItemNameUtils.h +30 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Archive/Common/MultiStream.cpp +193 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Archive/Common/MultiStream.h +86 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Archive/Common/OutStreamWithCRC.cpp +18 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Archive/Common/OutStreamWithCRC.h +35 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Archive/Common/ParseProperties.cpp +3 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Archive/Common/ParseProperties.h +6 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Archive/Common/StdAfx.h +11 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Archive/DllExports2.cpp +175 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Archive/IArchive.h +754 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Archive/Icons/7z.ico +0 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Archive/LzmaHandler.cpp +608 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Archive/SplitHandler.cpp +353 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Archive/StdAfx.h +11 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Archive/XzHandler.cpp +1440 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Archive/XzHandler.h +11 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Asm.mak +12 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/Alone7z/Alone.dsp +2090 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/Alone7z/Alone.dsw +29 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/Alone7z/StdAfx.cpp +3 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/Alone7z/StdAfx.h +11 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/Alone7z/makefile +168 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/Alone7z/makefile.gcc +279 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/Alone7z/resource.rc +7 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/Format7zExtractR/StdAfx.cpp +3 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/Format7zExtractR/StdAfx.h +11 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/Format7zExtractR/makefile +98 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/Format7zExtractR/resource.rc +5 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/Format7zR/StdAfx.cpp +3 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/Format7zR/StdAfx.h +11 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/Format7zR/makefile +121 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/Format7zR/resource.rc +5 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/LzmaCon/LzmaAlone.cpp +817 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/LzmaCon/LzmaCon.dsp +540 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/LzmaCon/LzmaCon.dsw +29 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/LzmaCon/StdAfx.cpp +3 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/LzmaCon/StdAfx.h +11 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/LzmaCon/makefile +68 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/LzmaCon/makefile.gcc +131 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/LzmaCon/resource.rc +3 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/LzmaSpec/LzmaSpec.cpp +715 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/SFXCon/7z.ico +0 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/SFXCon/SFXCon.dsp +1017 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/SFXCon/SFXCon.dsw +29 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/SFXCon/SfxCon.cpp +521 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/SFXCon/StdAfx.cpp +3 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/SFXCon/StdAfx.h +11 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/SFXCon/makefile +137 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/SFXCon/makefile.gcc +215 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/SFXCon/resource.rc +9 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/SFXSetup/ExtractCallbackSfx.cpp +246 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/SFXSetup/ExtractCallbackSfx.h +83 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/SFXSetup/ExtractEngine.cpp +135 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/SFXSetup/ExtractEngine.h +11 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/SFXSetup/SFXSetup.dsp +872 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/SFXSetup/SFXSetup.dsw +29 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/SFXSetup/SfxSetup.cpp +371 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/SFXSetup/StdAfx.cpp +3 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/SFXSetup/StdAfx.h +6 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/SFXSetup/makefile +121 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/SFXSetup/resource.h +6 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/SFXSetup/resource.rc +16 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/SFXSetup/setup.ico +0 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/SFXWin/7z.ico +0 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/SFXWin/SFXWin.dsp +1074 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/SFXWin/SFXWin.dsw +29 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/SFXWin/SfxWin.cpp +268 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/SFXWin/StdAfx.cpp +3 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/SFXWin/StdAfx.h +6 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/SFXWin/makefile +159 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/SFXWin/resource.h +1 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Bundles/SFXWin/resource.rc +55 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Common/CWrappers.cpp +358 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Common/CWrappers.h +182 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Common/CreateCoder.cpp +548 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Common/CreateCoder.h +200 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Common/FilePathAutoRename.cpp +46 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Common/FilePathAutoRename.h +10 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Common/FileStreams.cpp +923 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Common/FileStreams.h +205 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Common/FilterCoder.cpp +577 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Common/FilterCoder.h +201 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Common/InBuffer.cpp +182 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Common/InBuffer.h +111 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Common/InOutTempBuffer.cpp +237 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Common/InOutTempBuffer.h +45 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Common/LimitedStreams.cpp +393 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Common/LimitedStreams.h +221 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Common/LockedStream.cpp +3 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Common/LockedStream.h +6 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Common/MethodId.cpp +3 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Common/MethodId.h +10 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Common/MethodProps.cpp +739 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Common/MethodProps.h +345 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Common/MultiOutStream.cpp +855 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Common/MultiOutStream.h +160 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Common/OffsetStream.cpp +37 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Common/OffsetStream.h +22 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Common/OutBuffer.cpp +111 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Common/OutBuffer.h +108 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Common/ProgressUtils.cpp +51 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Common/ProgressUtils.h +33 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Common/PropId.cpp +117 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Common/RegisterArc.h +80 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Common/RegisterCodec.h +106 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Common/StdAfx.h +11 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Common/StreamBinder.cpp +151 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Common/StreamBinder.h +78 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Common/StreamObjects.cpp +290 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Common/StreamObjects.h +146 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Common/StreamUtils.cpp +101 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Common/StreamUtils.h +31 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Common/UniqBlocks.cpp +57 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Common/UniqBlocks.h +41 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Common/VirtThread.cpp +47 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Common/VirtThread.h +24 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Compress/Bcj2Coder.cpp +867 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Compress/Bcj2Coder.h +127 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Compress/Bcj2Register.cpp +24 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Compress/BcjCoder.cpp +24 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Compress/BcjCoder.h +37 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Compress/BcjRegister.cpp +17 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Compress/BranchMisc.cpp +106 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Compress/BranchMisc.h +59 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Compress/BranchRegister.cpp +58 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Compress/ByteSwap.cpp +91 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Compress/CodecExports.cpp +378 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Compress/CopyCoder.cpp +153 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Compress/CopyCoder.h +34 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Compress/CopyRegister.cpp +15 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Compress/DeltaFilter.cpp +126 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Compress/Lzma2Decoder.cpp +267 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Compress/Lzma2Decoder.h +87 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Compress/Lzma2Encoder.cpp +126 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Compress/Lzma2Encoder.h +30 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Compress/Lzma2Register.cpp +22 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Compress/LzmaDecoder.cpp +350 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Compress/LzmaDecoder.h +113 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Compress/LzmaEncoder.cpp +356 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Compress/LzmaEncoder.h +45 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Compress/LzmaRegister.cpp +22 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Compress/PpmdDecoder.cpp +219 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Compress/PpmdDecoder.h +87 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Compress/PpmdEncoder.cpp +193 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Compress/PpmdEncoder.h +49 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Compress/PpmdRegister.cpp +22 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Compress/StdAfx.h +11 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Compress/XzDecoder.cpp +151 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Compress/XzDecoder.h +86 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Compress/XzEncoder.cpp +243 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Compress/XzEncoder.h +35 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Crc.mak +8 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Crc64.mak +8 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Crypto/7zAes.cpp +315 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Crypto/7zAes.h +130 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Crypto/7zAesRegister.cpp +17 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Crypto/MyAes.cpp +258 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Crypto/MyAes.h +122 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Crypto/MyAesReg.cpp +29 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Crypto/RandGen.cpp +241 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Crypto/RandGen.h +41 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Crypto/StdAfx.h +11 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/GuiCommon.rc +119 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Guid.txt +243 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/ICoder.h +477 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/IDecl.h +76 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/IPassword.h +54 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/IProgress.h +20 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/IStream.h +210 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/LzFindOpt.mak +7 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/LzmaDec.mak +7 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/LzmaDec_gcc.mak +14 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/MyVersion.h +2 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/MyVersionInfo.rc +2 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/PropID.h +178 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/Sha256.mak +13 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/SubBuild.mak +3 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/Client7z/Client7z.cpp +1145 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/Client7z/Client7z.dsp +331 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/Client7z/Client7z.dsw +29 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/Client7z/StdAfx.cpp +3 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/Client7z/StdAfx.h +11 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/Client7z/makefile +29 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/Client7z/makefile.gcc +72 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/Client7z/resource.rc +3 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/ArchiveCommandLine.cpp +1769 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/ArchiveCommandLine.h +170 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/ArchiveExtractCallback.cpp +2747 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/ArchiveExtractCallback.h +584 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/ArchiveName.cpp +176 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/ArchiveName.h +16 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/ArchiveOpenCallback.cpp +398 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/ArchiveOpenCallback.h +182 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/Bench.cpp +4971 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/Bench.h +121 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/DefaultName.cpp +37 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/DefaultName.h +11 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/DirItem.h +407 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/EnumDirItems.cpp +1654 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/EnumDirItems.h +38 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/ExitCode.h +27 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/Extract.cpp +575 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/Extract.h +107 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/ExtractMode.h +44 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/ExtractingFilePath.cpp +296 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/ExtractingFilePath.h +31 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/HashCalc.cpp +2120 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/HashCalc.h +329 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/IFileExtractCallback.h +112 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/LoadCodecs.cpp +1337 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/LoadCodecs.h +482 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/OpenArchive.cpp +3702 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/OpenArchive.h +469 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/PropIDUtils.cpp +745 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/PropIDUtils.h +18 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/Property.h +14 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/SetProperties.cpp +88 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/SetProperties.h +10 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/SortUtils.cpp +25 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/SortUtils.h +10 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/StdAfx.h +11 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/TempFiles.cpp +20 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/TempFiles.h +19 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/Update.cpp +1931 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/Update.h +219 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/UpdateAction.cpp +64 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/UpdateAction.h +66 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/UpdateCallback.cpp +1029 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/UpdateCallback.h +197 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/UpdatePair.cpp +302 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/UpdatePair.h +27 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/UpdateProduce.cpp +74 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/UpdateProduce.h +60 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/WorkDir.cpp +84 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/WorkDir.h +30 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/Common/ZipRegistry.h +212 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/Console/BenchCon.cpp +41 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/Console/BenchCon.h +14 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/Console/Console.mak +46 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/Console/Console.manifest +16 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/Console/ConsoleClose.cpp +98 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/Console/ConsoleClose.h +39 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/Console/ExtractCallbackConsole.cpp +946 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/Console/ExtractCallbackConsole.h +211 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/Console/HashCon.cpp +426 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/Console/HashCon.h +58 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/Console/List.cpp +1417 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/Console/List.h +42 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/Console/Main.cpp +1632 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/Console/MainAr.cpp +235 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/Console/OpenCallbackConsole.cpp +115 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/Console/OpenCallbackConsole.h +73 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/Console/PercentPrinter.cpp +186 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/Console/PercentPrinter.h +66 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/Console/StdAfx.cpp +3 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/Console/StdAfx.h +11 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/Console/UpdateCallbackConsole.cpp +998 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/Console/UpdateCallbackConsole.h +148 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/Console/UserInputUtils.cpp +118 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/Console/UserInputUtils.h +27 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/Console/makefile +68 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/Console/makefile.gcc +187 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/Console/resource.rc +7 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/Explorer/MyMessages.cpp +43 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/Explorer/MyMessages.h +16 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/FileManager/BrowseDialog.cpp +1132 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/FileManager/BrowseDialog.h +32 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/FileManager/BrowseDialogRes.h +9 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/FileManager/ComboDialog.cpp +64 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/FileManager/ComboDialog.h +28 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/FileManager/ComboDialogRes.h +4 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/FileManager/DialogSize.h +16 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/FileManager/ExtractCallback.cpp +1272 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/FileManager/ExtractCallback.h +347 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/FileManager/FormatUtils.cpp +28 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/FileManager/FormatUtils.h +14 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/FileManager/LangUtils.h +48 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/FileManager/MemDialog.cpp +218 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/FileManager/MemDialog.h +48 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/FileManager/MemDialogRes.h +13 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/FileManager/MyWindowsNew.h +119 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/FileManager/OverwriteDialog.cpp +288 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/FileManager/OverwriteDialog.h +89 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/FileManager/OverwriteDialog.rc +93 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/FileManager/OverwriteDialogRes.h +19 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/FileManager/PasswordDialog.cpp +58 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/FileManager/PasswordDialog.h +28 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/FileManager/PasswordDialog.rc +18 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/FileManager/PasswordDialogRes.h +5 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/FileManager/ProgressDialog.cpp +201 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/FileManager/ProgressDialog.h +171 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/FileManager/ProgressDialog.rc +12 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/FileManager/ProgressDialog2.cpp +1483 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/FileManager/ProgressDialog2.h +355 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/FileManager/ProgressDialog2.rc +40 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/FileManager/ProgressDialog2Res.h +49 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/FileManager/ProgressDialog2a.rc +85 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/FileManager/ProgressDialogRes.h +3 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/FileManager/PropertyName.cpp +23 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/FileManager/PropertyName.h +10 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/FileManager/PropertyNameRes.h +104 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/FileManager/StdAfx.h +67 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/FileManager/SysIconUtils.cpp +351 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/FileManager/SysIconUtils.h +65 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/FileManager/resource.h +199 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/FileManager/resourceGui.h +25 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/GUI/7zG.exe.manifest +23 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/GUI/Extract.rc +59 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/GUI/ExtractDialog.cpp +421 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/GUI/ExtractDialog.h +113 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/GUI/ExtractDialog.rc +98 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/GUI/ExtractDialogRes.h +24 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/GUI/ExtractGUI.cpp +297 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/GUI/ExtractGUI.h +39 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/GUI/ExtractRes.h +51 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/GUI/HashGUI.h +27 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/UI/GUI/resource2.h +2 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/cmpl_clang.mak +3 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/cmpl_clang_arm64.mak +3 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/cmpl_clang_x64.mak +3 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/cmpl_clang_x86.mak +3 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/cmpl_gcc.mak +3 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/cmpl_gcc_arm64.mak +3 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/cmpl_gcc_x64.mak +3 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/cmpl_gcc_x86.mak +3 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/cmpl_mac_arm64.mak +3 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/cmpl_mac_x64.mak +3 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/var_clang.mak +11 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/var_clang_arm64.mak +19 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/var_clang_x64.mak +11 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/var_clang_x86.mak +11 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/var_gcc.mak +12 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/var_gcc_arm64.mak +12 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/var_gcc_x64.mak +11 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/var_gcc_x86.mak +10 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/var_mac_arm64.mak +13 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/var_mac_x64.mak +11 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/warn_clang.mak +3 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/warn_clang_mac.mak +9 -0
- hdiffpatch/_c_src/lzma/CPP/7zip/warn_gcc.mak +55 -0
- hdiffpatch/_c_src/lzma/CPP/Build.mak +246 -0
- hdiffpatch/_c_src/lzma/CPP/Common/AutoPtr.h +46 -0
- hdiffpatch/_c_src/lzma/CPP/Common/CRC.cpp +7 -0
- hdiffpatch/_c_src/lzma/CPP/Common/C_FileIO.cpp +3 -0
- hdiffpatch/_c_src/lzma/CPP/Common/C_FileIO.h +6 -0
- hdiffpatch/_c_src/lzma/CPP/Common/ComTry.h +21 -0
- hdiffpatch/_c_src/lzma/CPP/Common/CommandLineParser.cpp +231 -0
- hdiffpatch/_c_src/lzma/CPP/Common/CommandLineParser.h +63 -0
- hdiffpatch/_c_src/lzma/CPP/Common/Common.h +28 -0
- hdiffpatch/_c_src/lzma/CPP/Common/Common0.h +330 -0
- hdiffpatch/_c_src/lzma/CPP/Common/CrcReg.cpp +77 -0
- hdiffpatch/_c_src/lzma/CPP/Common/Defs.h +16 -0
- hdiffpatch/_c_src/lzma/CPP/Common/DynLimBuf.cpp +93 -0
- hdiffpatch/_c_src/lzma/CPP/Common/DynLimBuf.h +41 -0
- hdiffpatch/_c_src/lzma/CPP/Common/DynamicBuffer.h +76 -0
- hdiffpatch/_c_src/lzma/CPP/Common/IntToString.cpp +215 -0
- hdiffpatch/_c_src/lzma/CPP/Common/IntToString.h +54 -0
- hdiffpatch/_c_src/lzma/CPP/Common/Lang.h +30 -0
- hdiffpatch/_c_src/lzma/CPP/Common/ListFileUtils.cpp +150 -0
- hdiffpatch/_c_src/lzma/CPP/Common/ListFileUtils.h +18 -0
- hdiffpatch/_c_src/lzma/CPP/Common/LzFindPrepare.cpp +7 -0
- hdiffpatch/_c_src/lzma/CPP/Common/MyBuffer.h +297 -0
- hdiffpatch/_c_src/lzma/CPP/Common/MyBuffer2.h +185 -0
- hdiffpatch/_c_src/lzma/CPP/Common/MyCom.h +693 -0
- hdiffpatch/_c_src/lzma/CPP/Common/MyException.h +14 -0
- hdiffpatch/_c_src/lzma/CPP/Common/MyGuidDef.h +63 -0
- hdiffpatch/_c_src/lzma/CPP/Common/MyInitGuid.h +57 -0
- hdiffpatch/_c_src/lzma/CPP/Common/MyLinux.h +75 -0
- hdiffpatch/_c_src/lzma/CPP/Common/MyString.cpp +1871 -0
- hdiffpatch/_c_src/lzma/CPP/Common/MyString.h +1078 -0
- hdiffpatch/_c_src/lzma/CPP/Common/MyTypes.h +38 -0
- hdiffpatch/_c_src/lzma/CPP/Common/MyUnknown.h +8 -0
- hdiffpatch/_c_src/lzma/CPP/Common/MyVector.cpp +3 -0
- hdiffpatch/_c_src/lzma/CPP/Common/MyVector.h +724 -0
- hdiffpatch/_c_src/lzma/CPP/Common/MyWindows.cpp +292 -0
- hdiffpatch/_c_src/lzma/CPP/Common/MyWindows.h +325 -0
- hdiffpatch/_c_src/lzma/CPP/Common/NewHandler.cpp +340 -0
- hdiffpatch/_c_src/lzma/CPP/Common/NewHandler.h +121 -0
- hdiffpatch/_c_src/lzma/CPP/Common/Sha256Prepare.cpp +7 -0
- hdiffpatch/_c_src/lzma/CPP/Common/Sha256Reg.cpp +67 -0
- hdiffpatch/_c_src/lzma/CPP/Common/StdAfx.h +8 -0
- hdiffpatch/_c_src/lzma/CPP/Common/StdInStream.cpp +98 -0
- hdiffpatch/_c_src/lzma/CPP/Common/StdInStream.h +46 -0
- hdiffpatch/_c_src/lzma/CPP/Common/StdOutStream.cpp +248 -0
- hdiffpatch/_c_src/lzma/CPP/Common/StdOutStream.h +87 -0
- hdiffpatch/_c_src/lzma/CPP/Common/StringConvert.cpp +762 -0
- hdiffpatch/_c_src/lzma/CPP/Common/StringConvert.h +110 -0
- hdiffpatch/_c_src/lzma/CPP/Common/StringToInt.cpp +154 -0
- hdiffpatch/_c_src/lzma/CPP/Common/StringToInt.h +38 -0
- hdiffpatch/_c_src/lzma/CPP/Common/TextConfig.cpp +123 -0
- hdiffpatch/_c_src/lzma/CPP/Common/TextConfig.h +19 -0
- hdiffpatch/_c_src/lzma/CPP/Common/UTFConvert.cpp +863 -0
- hdiffpatch/_c_src/lzma/CPP/Common/UTFConvert.h +384 -0
- hdiffpatch/_c_src/lzma/CPP/Common/Wildcard.cpp +788 -0
- hdiffpatch/_c_src/lzma/CPP/Common/Wildcard.h +231 -0
- hdiffpatch/_c_src/lzma/CPP/Common/XzCrc64Init.cpp +7 -0
- hdiffpatch/_c_src/lzma/CPP/Common/XzCrc64Reg.cpp +39 -0
- hdiffpatch/_c_src/lzma/CPP/Windows/COM.h +86 -0
- hdiffpatch/_c_src/lzma/CPP/Windows/Clipboard.cpp +130 -0
- hdiffpatch/_c_src/lzma/CPP/Windows/Clipboard.h +28 -0
- hdiffpatch/_c_src/lzma/CPP/Windows/CommonDialog.cpp +269 -0
- hdiffpatch/_c_src/lzma/CPP/Windows/CommonDialog.h +43 -0
- hdiffpatch/_c_src/lzma/CPP/Windows/Control/ComboBox.cpp +66 -0
- hdiffpatch/_c_src/lzma/CPP/Windows/Control/ComboBox.h +77 -0
- hdiffpatch/_c_src/lzma/CPP/Windows/Control/CommandBar.h +52 -0
- hdiffpatch/_c_src/lzma/CPP/Windows/Control/Dialog.cpp +446 -0
- hdiffpatch/_c_src/lzma/CPP/Windows/Control/Dialog.h +213 -0
- hdiffpatch/_c_src/lzma/CPP/Windows/Control/Edit.h +19 -0
- hdiffpatch/_c_src/lzma/CPP/Windows/Control/ImageList.cpp +10 -0
- hdiffpatch/_c_src/lzma/CPP/Windows/Control/ImageList.h +87 -0
- hdiffpatch/_c_src/lzma/CPP/Windows/Control/ListView.cpp +162 -0
- hdiffpatch/_c_src/lzma/CPP/Windows/Control/ListView.h +156 -0
- hdiffpatch/_c_src/lzma/CPP/Windows/Control/ProgressBar.h +35 -0
- hdiffpatch/_c_src/lzma/CPP/Windows/Control/PropertyPage.cpp +165 -0
- hdiffpatch/_c_src/lzma/CPP/Windows/Control/PropertyPage.h +50 -0
- hdiffpatch/_c_src/lzma/CPP/Windows/Control/ReBar.h +34 -0
- hdiffpatch/_c_src/lzma/CPP/Windows/Control/Static.h +28 -0
- hdiffpatch/_c_src/lzma/CPP/Windows/Control/StatusBar.h +42 -0
- hdiffpatch/_c_src/lzma/CPP/Windows/Control/StdAfx.h +11 -0
- hdiffpatch/_c_src/lzma/CPP/Windows/Control/ToolBar.h +43 -0
- hdiffpatch/_c_src/lzma/CPP/Windows/Control/Trackbar.h +27 -0
- hdiffpatch/_c_src/lzma/CPP/Windows/Control/Window2.cpp +202 -0
- hdiffpatch/_c_src/lzma/CPP/Windows/Control/Window2.h +53 -0
- hdiffpatch/_c_src/lzma/CPP/Windows/DLL.cpp +178 -0
- hdiffpatch/_c_src/lzma/CPP/Windows/DLL.h +103 -0
- hdiffpatch/_c_src/lzma/CPP/Windows/Defs.h +17 -0
- hdiffpatch/_c_src/lzma/CPP/Windows/ErrorMsg.cpp +133 -0
- hdiffpatch/_c_src/lzma/CPP/Windows/ErrorMsg.h +16 -0
- hdiffpatch/_c_src/lzma/CPP/Windows/FileDir.cpp +1331 -0
- hdiffpatch/_c_src/lzma/CPP/Windows/FileDir.h +156 -0
- hdiffpatch/_c_src/lzma/CPP/Windows/FileFind.cpp +1442 -0
- hdiffpatch/_c_src/lzma/CPP/Windows/FileFind.h +347 -0
- hdiffpatch/_c_src/lzma/CPP/Windows/FileIO.cpp +954 -0
- hdiffpatch/_c_src/lzma/CPP/Windows/FileIO.h +448 -0
- hdiffpatch/_c_src/lzma/CPP/Windows/FileLink.cpp +621 -0
- hdiffpatch/_c_src/lzma/CPP/Windows/FileMapping.cpp +12 -0
- hdiffpatch/_c_src/lzma/CPP/Windows/FileMapping.h +66 -0
- hdiffpatch/_c_src/lzma/CPP/Windows/FileName.cpp +896 -0
- hdiffpatch/_c_src/lzma/CPP/Windows/FileName.h +133 -0
- hdiffpatch/_c_src/lzma/CPP/Windows/FileSystem.cpp +187 -0
- hdiffpatch/_c_src/lzma/CPP/Windows/FileSystem.h +31 -0
- hdiffpatch/_c_src/lzma/CPP/Windows/Handle.h +39 -0
- hdiffpatch/_c_src/lzma/CPP/Windows/MemoryGlobal.cpp +36 -0
- hdiffpatch/_c_src/lzma/CPP/Windows/MemoryGlobal.h +55 -0
- hdiffpatch/_c_src/lzma/CPP/Windows/MemoryLock.cpp +127 -0
- hdiffpatch/_c_src/lzma/CPP/Windows/MemoryLock.h +40 -0
- hdiffpatch/_c_src/lzma/CPP/Windows/NtCheck.h +58 -0
- hdiffpatch/_c_src/lzma/CPP/Windows/PropVariant.cpp +393 -0
- hdiffpatch/_c_src/lzma/CPP/Windows/PropVariant.h +173 -0
- hdiffpatch/_c_src/lzma/CPP/Windows/PropVariantConv.cpp +274 -0
- hdiffpatch/_c_src/lzma/CPP/Windows/PropVariantConv.h +47 -0
- hdiffpatch/_c_src/lzma/CPP/Windows/Registry.cpp +474 -0
- hdiffpatch/_c_src/lzma/CPP/Windows/Registry.h +96 -0
- hdiffpatch/_c_src/lzma/CPP/Windows/ResourceString.cpp +103 -0
- hdiffpatch/_c_src/lzma/CPP/Windows/ResourceString.h +17 -0
- hdiffpatch/_c_src/lzma/CPP/Windows/SecurityUtils.cpp +186 -0
- hdiffpatch/_c_src/lzma/CPP/Windows/SecurityUtils.h +150 -0
- hdiffpatch/_c_src/lzma/CPP/Windows/Shell.cpp +839 -0
- hdiffpatch/_c_src/lzma/CPP/Windows/Shell.h +129 -0
- hdiffpatch/_c_src/lzma/CPP/Windows/StdAfx.h +11 -0
- hdiffpatch/_c_src/lzma/CPP/Windows/Synchronization.cpp +87 -0
- hdiffpatch/_c_src/lzma/CPP/Windows/Synchronization.h +386 -0
- hdiffpatch/_c_src/lzma/CPP/Windows/System.cpp +327 -0
- hdiffpatch/_c_src/lzma/CPP/Windows/System.h +132 -0
- hdiffpatch/_c_src/lzma/CPP/Windows/SystemInfo.cpp +1251 -0
- hdiffpatch/_c_src/lzma/CPP/Windows/SystemInfo.h +19 -0
- hdiffpatch/_c_src/lzma/CPP/Windows/Thread.h +44 -0
- hdiffpatch/_c_src/lzma/CPP/Windows/TimeUtils.cpp +466 -0
- hdiffpatch/_c_src/lzma/CPP/Windows/TimeUtils.h +146 -0
- hdiffpatch/_c_src/lzma/CPP/Windows/Window.cpp +179 -0
- hdiffpatch/_c_src/lzma/CPP/Windows/Window.h +363 -0
- hdiffpatch/_c_src/lzma/CS/7zip/Common/CRC.cs +55 -0
- hdiffpatch/_c_src/lzma/CS/7zip/Common/CommandLineParser.cs +274 -0
- hdiffpatch/_c_src/lzma/CS/7zip/Common/InBuffer.cs +72 -0
- hdiffpatch/_c_src/lzma/CS/7zip/Common/OutBuffer.cs +47 -0
- hdiffpatch/_c_src/lzma/CS/7zip/Compress/LZ/IMatchFinder.cs +24 -0
- hdiffpatch/_c_src/lzma/CS/7zip/Compress/LZ/LzBinTree.cs +367 -0
- hdiffpatch/_c_src/lzma/CS/7zip/Compress/LZ/LzInWindow.cs +132 -0
- hdiffpatch/_c_src/lzma/CS/7zip/Compress/LZ/LzOutWindow.cs +110 -0
- hdiffpatch/_c_src/lzma/CS/7zip/Compress/LZMA/LzmaBase.cs +76 -0
- hdiffpatch/_c_src/lzma/CS/7zip/Compress/LZMA/LzmaDecoder.cs +398 -0
- hdiffpatch/_c_src/lzma/CS/7zip/Compress/LZMA/LzmaEncoder.cs +1480 -0
- hdiffpatch/_c_src/lzma/CS/7zip/Compress/LzmaAlone/LzmaAlone.cs +364 -0
- hdiffpatch/_c_src/lzma/CS/7zip/Compress/LzmaAlone/LzmaAlone.sln +20 -0
- hdiffpatch/_c_src/lzma/CS/7zip/Compress/LzmaAlone/LzmaBench.cs +340 -0
- hdiffpatch/_c_src/lzma/CS/7zip/Compress/LzmaAlone/Properties/AssemblyInfo.cs +29 -0
- hdiffpatch/_c_src/lzma/CS/7zip/Compress/LzmaAlone/Properties/Resources.cs +70 -0
- hdiffpatch/_c_src/lzma/CS/7zip/Compress/LzmaAlone/Properties/Settings.cs +42 -0
- hdiffpatch/_c_src/lzma/CS/7zip/Compress/RangeCoder/RangeCoder.cs +234 -0
- hdiffpatch/_c_src/lzma/CS/7zip/Compress/RangeCoder/RangeCoderBit.cs +117 -0
- hdiffpatch/_c_src/lzma/CS/7zip/Compress/RangeCoder/RangeCoderBitTree.cs +157 -0
- hdiffpatch/_c_src/lzma/CS/7zip/ICoder.cs +157 -0
- hdiffpatch/_c_src/lzma/DOC/7zC.txt +187 -0
- hdiffpatch/_c_src/lzma/DOC/7zFormat.txt +469 -0
- hdiffpatch/_c_src/lzma/DOC/Methods.txt +177 -0
- hdiffpatch/_c_src/lzma/DOC/installer.txt +166 -0
- hdiffpatch/_c_src/lzma/DOC/lzma-history.txt +634 -0
- hdiffpatch/_c_src/lzma/DOC/lzma-sdk.txt +409 -0
- hdiffpatch/_c_src/lzma/DOC/lzma-specification.txt +1176 -0
- hdiffpatch/_c_src/lzma/DOC/lzma.txt +345 -0
- hdiffpatch/_c_src/lzma/Java/SevenZip/CRC.java +52 -0
- hdiffpatch/_c_src/lzma/Java/SevenZip/Compression/LZ/BinTree.java +382 -0
- hdiffpatch/_c_src/lzma/Java/SevenZip/Compression/LZ/InWindow.java +131 -0
- hdiffpatch/_c_src/lzma/Java/SevenZip/Compression/LZ/OutWindow.java +85 -0
- hdiffpatch/_c_src/lzma/Java/SevenZip/Compression/LZMA/Base.java +88 -0
- hdiffpatch/_c_src/lzma/Java/SevenZip/Compression/LZMA/Decoder.java +329 -0
- hdiffpatch/_c_src/lzma/Java/SevenZip/Compression/LZMA/Encoder.java +1416 -0
- hdiffpatch/_c_src/lzma/Java/SevenZip/Compression/RangeCoder/BitTreeDecoder.java +55 -0
- hdiffpatch/_c_src/lzma/Java/SevenZip/Compression/RangeCoder/BitTreeEncoder.java +99 -0
- hdiffpatch/_c_src/lzma/Java/SevenZip/Compression/RangeCoder/Decoder.java +88 -0
- hdiffpatch/_c_src/lzma/Java/SevenZip/Compression/RangeCoder/Encoder.java +151 -0
- hdiffpatch/_c_src/lzma/Java/SevenZip/ICodeProgress.java +6 -0
- hdiffpatch/_c_src/lzma/Java/SevenZip/LzmaAlone.java +253 -0
- hdiffpatch/_c_src/lzma/Java/SevenZip/LzmaBench.java +392 -0
- hdiffpatch/_c_src/lzma/bin/7zS2.sfx +0 -0
- hdiffpatch/_c_src/lzma/bin/7zS2con.sfx +0 -0
- hdiffpatch/_c_src/lzma/bin/7zSD.sfx +0 -0
- hdiffpatch/_c_src/lzma/bin/7zdec.exe +0 -0
- hdiffpatch/_c_src/lzma/bin/7zr.exe +0 -0
- hdiffpatch/_c_src/lzma/bin/installer/config.txt +5 -0
- hdiffpatch/_c_src/lzma/bin/installer/cr.bat +5 -0
- hdiffpatch/_c_src/lzma/bin/lzma.exe +0 -0
- hdiffpatch/_c_src/lzma/bin/x64/7zr.exe +0 -0
- hdiffpatch/_c_src/tamp/.belay/dependencies/dev/argparse/__init__.py +226 -0
- hdiffpatch/_c_src/tamp/.belay/dependencies/dev/collections/__init__.py +16 -0
- hdiffpatch/_c_src/tamp/.belay/dependencies/dev/collections/deque.py +58 -0
- hdiffpatch/_c_src/tamp/.belay/dependencies/dev/fnmatch/__init__.py +139 -0
- hdiffpatch/_c_src/tamp/.belay/dependencies/dev/pathlib/__init__.py +207 -0
- hdiffpatch/_c_src/tamp/.belay/dependencies/dev/shutil/__init__.py +48 -0
- hdiffpatch/_c_src/tamp/.belay/dependencies/dev/tempfile/__init__.py +59 -0
- hdiffpatch/_c_src/tamp/.belay/dependencies/dev/unittest/__init__.py +463 -0
- hdiffpatch/_c_src/tamp/.belay/dependencies/dev/unittest/__main__.py +146 -0
- hdiffpatch/_c_src/tamp/.belay/dependencies/dev/uprofiler/__init__.py +108 -0
- hdiffpatch/_c_src/tamp/.bumpversion.cfg +24 -0
- hdiffpatch/_c_src/tamp/.clang-format +5 -0
- hdiffpatch/_c_src/tamp/.codecov.yml +14 -0
- hdiffpatch/_c_src/tamp/.git +1 -0
- hdiffpatch/_c_src/tamp/.github/FUNDING.yml +13 -0
- hdiffpatch/_c_src/tamp/.github/contributing.md +43 -0
- hdiffpatch/_c_src/tamp/.github/dependabot.yml +11 -0
- hdiffpatch/_c_src/tamp/.github/workflows/build_wheels.yaml +291 -0
- hdiffpatch/_c_src/tamp/.github/workflows/esp_upload_component.yml +49 -0
- hdiffpatch/_c_src/tamp/.github/workflows/mpy_native_module.yaml +236 -0
- hdiffpatch/_c_src/tamp/.github/workflows/tests.yaml +134 -0
- hdiffpatch/_c_src/tamp/.gitignore +262 -0
- hdiffpatch/_c_src/tamp/.gitmodules +3 -0
- hdiffpatch/_c_src/tamp/.pre-commit-config.yaml +69 -0
- hdiffpatch/_c_src/tamp/.readthedocs.yaml +32 -0
- hdiffpatch/_c_src/tamp/LICENSE +201 -0
- hdiffpatch/_c_src/tamp/MICROPYTHON_TESTING.rst +7 -0
- hdiffpatch/_c_src/tamp/Makefile +195 -0
- hdiffpatch/_c_src/tamp/README.md +300 -0
- hdiffpatch/_c_src/tamp/assets/favicon-16x16.png +0 -0
- hdiffpatch/_c_src/tamp/assets/favicon-32x32.png +0 -0
- hdiffpatch/_c_src/tamp/assets/icon.png +0 -0
- hdiffpatch/_c_src/tamp/assets/logo.png +0 -0
- hdiffpatch/_c_src/tamp/assets/logo_200w.png +0 -0
- hdiffpatch/_c_src/tamp/assets/logo_300w.png +0 -0
- hdiffpatch/_c_src/tamp/assets/match-size-plot.png +0 -0
- hdiffpatch/_c_src/tamp/assets/social_media.png +0 -0
- hdiffpatch/_c_src/tamp/build.py +104 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/.editorconfig +27 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/.git +1 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/.gitattributes +31 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/.github/workflows/main.yml +32 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/.gitignore +13 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/CMakeLists.txt +159 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/LICENSE.txt +21 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/README.md +200 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/auto/colour_prompt.rb +119 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/auto/colour_reporter.rb +39 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/auto/generate_config.yml +36 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/auto/generate_module.rb +313 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/auto/generate_test_runner.rb +511 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/auto/parse_output.rb +322 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/auto/run_test.erb +37 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/auto/stylize_as_junit.rb +251 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/auto/test_file_filter.rb +25 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/auto/type_sanitizer.rb +6 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/auto/unity_test_summary.py +139 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/auto/unity_test_summary.rb +135 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/auto/unity_to_junit.py +146 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/docs/ThrowTheSwitchCodingStandard.md +206 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/docs/UnityAssertionsCheatSheetSuitableforPrintingandPossiblyFraming.pdf +0 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/docs/UnityAssertionsReference.md +831 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/docs/UnityConfigurationGuide.md +563 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/docs/UnityGettingStartedGuide.md +251 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/docs/UnityHelperScriptsGuide.md +278 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/examples/example_1/makefile +72 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/examples/example_1/readme.txt +5 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/examples/example_1/src/ProductionCode.c +24 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/examples/example_1/src/ProductionCode.h +3 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/examples/example_1/src/ProductionCode2.c +11 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/examples/example_1/src/ProductionCode2.h +2 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/examples/example_1/test/TestProductionCode.c +62 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/examples/example_1/test/TestProductionCode2.c +31 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/examples/example_1/test/test_runners/TestProductionCode2_Runner.c +53 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/examples/example_1/test/test_runners/TestProductionCode_Runner.c +57 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/examples/example_2/makefile +71 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/examples/example_2/readme.txt +5 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/examples/example_2/src/ProductionCode.c +24 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/examples/example_2/src/ProductionCode.h +3 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/examples/example_2/src/ProductionCode2.c +11 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/examples/example_2/src/ProductionCode2.h +2 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/examples/example_2/test/TestProductionCode.c +64 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/examples/example_2/test/TestProductionCode2.c +33 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/examples/example_2/test/test_runners/TestProductionCode2_Runner.c +9 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/examples/example_2/test/test_runners/TestProductionCode_Runner.c +11 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/examples/example_2/test/test_runners/all_tests.c +12 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/examples/example_3/helper/UnityHelper.c +10 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/examples/example_3/helper/UnityHelper.h +12 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/examples/example_3/rakefile.rb +38 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/examples/example_3/rakefile_helper.rb +250 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/examples/example_3/readme.txt +13 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/examples/example_3/src/ProductionCode.c +24 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/examples/example_3/src/ProductionCode.h +3 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/examples/example_3/src/ProductionCode2.c +11 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/examples/example_3/src/ProductionCode2.h +2 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/examples/example_3/target_gcc_32.yml +47 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/examples/example_3/test/TestProductionCode.c +62 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/examples/example_3/test/TestProductionCode2.c +31 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/examples/example_4/meson.build +12 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/examples/example_4/readme.txt +15 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/examples/example_4/src/ProductionCode.c +24 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/examples/example_4/src/ProductionCode.h +3 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/examples/example_4/src/ProductionCode2.c +11 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/examples/example_4/src/ProductionCode2.h +2 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/examples/example_4/src/meson.build +16 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/examples/example_4/subprojects/unity.wrap +4 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/examples/example_4/test/TestProductionCode.c +63 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/examples/example_4/test/TestProductionCode2.c +35 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/examples/example_4/test/meson.build +7 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/examples/example_4/test/test_runners/TestProductionCode2_Runner.c +53 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/examples/example_4/test/test_runners/TestProductionCode_Runner.c +57 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/examples/example_4/test/test_runners/meson.build +13 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/examples/unity_config.h +244 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/extras/eclipse/error_parsers.txt +26 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/extras/fixture/readme.md +29 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/extras/fixture/src/unity_fixture.c +310 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/extras/fixture/src/unity_fixture.h +83 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/extras/fixture/src/unity_fixture_internals.h +50 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/extras/fixture/test/Makefile +72 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/extras/fixture/test/main/AllTests.c +20 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/extras/fixture/test/template_fixture_tests.c +39 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/extras/fixture/test/unity_fixture_Test.c +245 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/extras/fixture/test/unity_fixture_TestRunner.c +32 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/extras/memory/readme.md +49 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/extras/memory/src/unity_memory.c +202 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/extras/memory/src/unity_memory.h +60 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/extras/memory/test/Makefile +78 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/extras/memory/test/unity_memory_Test.c +325 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/extras/memory/test/unity_memory_TestRunner.c +49 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/extras/memory/test/unity_output_Spy.c +56 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/extras/memory/test/unity_output_Spy.h +16 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/meson.build +14 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/src/meson.build +11 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/src/unity.c +2110 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/src/unity.h +661 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/src/unity_internals.h +1039 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/test/.rubocop.yml +76 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/test/Makefile +160 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/test/expectdata/testsample_cmd.c +61 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/test/expectdata/testsample_def.c +57 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/test/expectdata/testsample_head1.c +55 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/test/expectdata/testsample_head1.h +15 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/test/expectdata/testsample_mock_cmd.c +80 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/test/expectdata/testsample_mock_def.c +76 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/test/expectdata/testsample_mock_head1.c +75 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/test/expectdata/testsample_mock_head1.h +13 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/test/expectdata/testsample_mock_new1.c +89 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/test/expectdata/testsample_mock_new2.c +89 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/test/expectdata/testsample_mock_param.c +77 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/test/expectdata/testsample_mock_run1.c +89 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/test/expectdata/testsample_mock_run2.c +89 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/test/expectdata/testsample_mock_yaml.c +90 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/test/expectdata/testsample_new1.c +67 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/test/expectdata/testsample_new2.c +70 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/test/expectdata/testsample_param.c +58 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/test/expectdata/testsample_run1.c +67 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/test/expectdata/testsample_run2.c +70 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/test/expectdata/testsample_yaml.c +71 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/test/rakefile +163 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/test/rakefile_helper.rb +315 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/test/spec/generate_module_existing_file_spec.rb +158 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/test/targets/ansi.yml +44 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/test/targets/clang_file.yml +72 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/test/targets/clang_strict.yml +71 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/test/targets/gcc_32.yml +45 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/test/targets/gcc_64.yml +46 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/test/targets/gcc_auto_limits.yml +43 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/test/targets/gcc_auto_stdint.yml +55 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/test/targets/gcc_manual_math.yml +43 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/test/targets/hitech_picc18.yml +91 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/test/targets/iar_arm_v4.yml +98 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/test/targets/iar_arm_v5.yml +92 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/test/targets/iar_arm_v5_3.yml +92 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/test/targets/iar_armcortex_LM3S9B92_v5_4.yml +90 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/test/targets/iar_cortexm3_v5.yml +94 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/test/targets/iar_msp430.yml +112 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/test/targets/iar_sh2a_v6.yml +99 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/test/testdata/CException.h +11 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/test/testdata/Defs.h +8 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/test/testdata/cmock.h +14 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/test/testdata/mockMock.h +13 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/test/testdata/testRunnerGenerator.c +189 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/test/testdata/testRunnerGeneratorSmall.c +70 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/test/testdata/testRunnerGeneratorWithMocks.c +197 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/test/tests/self_assessment_utils.h +144 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/test/tests/test_generate_test_runner.rb +1260 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/test/tests/test_unity_arrays.c +2874 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/test/tests/test_unity_core.c +371 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/test/tests/test_unity_doubles.c +773 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/test/tests/test_unity_floats.c +884 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/test/tests/test_unity_integers.c +2847 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/test/tests/test_unity_integers_64.c +773 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/test/tests/test_unity_memory.c +81 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/test/tests/test_unity_parameterized.c +171 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/test/tests/test_unity_strings.c +329 -0
- hdiffpatch/_c_src/tamp/ctests/Unity/unityConfig.cmake +1 -0
- hdiffpatch/_c_src/tamp/ctests/test_decompressor.c +81 -0
- hdiffpatch/_c_src/tamp/docs/Makefile +21 -0
- hdiffpatch/_c_src/tamp/docs/make.bat +35 -0
- hdiffpatch/_c_src/tamp/docs/source/Installation.rst +97 -0
- hdiffpatch/_c_src/tamp/docs/source/_static/.gitkeep +0 -0
- hdiffpatch/_c_src/tamp/docs/source/_static/custom.css +13 -0
- hdiffpatch/_c_src/tamp/docs/source/c_library.rst +339 -0
- hdiffpatch/_c_src/tamp/docs/source/conf.py +195 -0
- hdiffpatch/_c_src/tamp/docs/source/index.rst +16 -0
- hdiffpatch/_c_src/tamp/docs/source/python_api.rst +66 -0
- hdiffpatch/_c_src/tamp/docs/source/specification.rst +189 -0
- hdiffpatch/_c_src/tamp/espidf/.gitignore +2 -0
- hdiffpatch/_c_src/tamp/espidf/CMakeLists.txt +25 -0
- hdiffpatch/_c_src/tamp/espidf/Kconfig +18 -0
- hdiffpatch/_c_src/tamp/espidf/Makefile +4 -0
- hdiffpatch/_c_src/tamp/espidf/compressor_esp32.cpp +139 -0
- hdiffpatch/_c_src/tamp/espidf/idf_component.yml +9 -0
- hdiffpatch/_c_src/tamp/espidf/private/copyutil.hpp +143 -0
- hdiffpatch/_c_src/tamp/espidf/private/tamp_arch.hpp +70 -0
- hdiffpatch/_c_src/tamp/espidf/private/tamp_search.hpp +831 -0
- hdiffpatch/_c_src/tamp/mpy_bindings/bindings.c +293 -0
- hdiffpatch/_c_src/tamp/mpy_bindings/bindings_common.py +16 -0
- hdiffpatch/_c_src/tamp/mpy_bindings/bindings_compressor.py +56 -0
- hdiffpatch/_c_src/tamp/mpy_bindings/bindings_decompressor.py +67 -0
- hdiffpatch/_c_src/tamp/package-compressor.json +14 -0
- hdiffpatch/_c_src/tamp/package-decompressor.json +14 -0
- hdiffpatch/_c_src/tamp/package.json +18 -0
- hdiffpatch/_c_src/tamp/poetry.lock +3348 -0
- hdiffpatch/_c_src/tamp/pyproject.toml +249 -0
- hdiffpatch/_c_src/tamp/tamp/__init__.py +87 -0
- hdiffpatch/_c_src/tamp/tamp/__init__.pyi +57 -0
- hdiffpatch/_c_src/tamp/tamp/__main__.py +3 -0
- hdiffpatch/_c_src/tamp/tamp/_c_common.pxd +4 -0
- hdiffpatch/_c_src/tamp/tamp/_c_common.pyx +15 -0
- hdiffpatch/_c_src/tamp/tamp/_c_compressor.pyx +151 -0
- hdiffpatch/_c_src/tamp/tamp/_c_decompressor.pyx +147 -0
- hdiffpatch/_c_src/tamp/tamp/_c_src/tamp/common.c +29 -0
- hdiffpatch/_c_src/tamp/tamp/_c_src/tamp/common.h +102 -0
- hdiffpatch/_c_src/tamp/tamp/_c_src/tamp/compressor.c +299 -0
- hdiffpatch/_c_src/tamp/tamp/_c_src/tamp/compressor.h +240 -0
- hdiffpatch/_c_src/tamp/tamp/_c_src/tamp/decompressor.c +233 -0
- hdiffpatch/_c_src/tamp/tamp/_c_src/tamp/decompressor.h +106 -0
- hdiffpatch/_c_src/tamp/tamp/cli/__init__.py +0 -0
- hdiffpatch/_c_src/tamp/tamp/cli/main.py +89 -0
- hdiffpatch/_c_src/tamp/tamp/compressor.py +327 -0
- hdiffpatch/_c_src/tamp/tamp/compressor_viper.py +225 -0
- hdiffpatch/_c_src/tamp/tamp/ctamp.pxd +89 -0
- hdiffpatch/_c_src/tamp/tamp/decompressor.py +336 -0
- hdiffpatch/_c_src/tamp/tamp/decompressor_viper.py +220 -0
- hdiffpatch/_c_src/tamp/tamp/py.typed +0 -0
- hdiffpatch/_c_src/tamp/tests/test_bit_writer_reader.py +59 -0
- hdiffpatch/_c_src/tamp/tests/test_cli.py +78 -0
- hdiffpatch/_c_src/tamp/tests/test_compressor.py +304 -0
- hdiffpatch/_c_src/tamp/tests/test_compressor_decompressor.py +128 -0
- hdiffpatch/_c_src/tamp/tests/test_compressor_helpers.py +19 -0
- hdiffpatch/_c_src/tamp/tests/test_decompressor.py +219 -0
- hdiffpatch/_c_src/tamp/tests/test_file_interface.py +84 -0
- hdiffpatch/_c_src/tamp/tests/test_pseudorandom.py +59 -0
- hdiffpatch/_c_src/tamp/tools/analysis.py +116 -0
- hdiffpatch/_c_src/tamp/tools/c-profiler/.gitignore +1 -0
- hdiffpatch/_c_src/tamp/tools/c-profiler/Makefile +55 -0
- hdiffpatch/_c_src/tamp/tools/c-profiler/main.c +128 -0
- hdiffpatch/_c_src/tamp/tools/collect-data.py +74 -0
- hdiffpatch/_c_src/tamp/tools/compute_min_output_flush_size.py +39 -0
- hdiffpatch/_c_src/tamp/tools/find_seed.py +140 -0
- hdiffpatch/_c_src/tamp/tools/huffman.py +52 -0
- hdiffpatch/_c_src/tamp/tools/huffman_jump_table.py +47 -0
- hdiffpatch/_c_src/tamp/tools/micropython-compression-benchmark.py +19 -0
- hdiffpatch/_c_src/tamp/tools/on-device-compression-benchmark.py +27 -0
- hdiffpatch/_c_src/tamp/tools/on-device-decompression-benchmark.py +27 -0
- hdiffpatch/_c_src/tamp/tools/performance-benchmark.sh +13 -0
- hdiffpatch/_c_src/tamp/tools/pi_pico/.gitignore +4 -0
- hdiffpatch/_c_src/tamp/tools/pi_pico/benchmark/CMakeLists.txt +60 -0
- hdiffpatch/_c_src/tamp/tools/pi_pico/benchmark/Makefile +12 -0
- hdiffpatch/_c_src/tamp/tools/pi_pico/benchmark/main.c +67 -0
- hdiffpatch/_c_src/tamp/tools/pi_pico/library-size/.gitignore +3 -0
- hdiffpatch/_c_src/tamp/tools/pi_pico/library-size/CMakeLists.txt +43 -0
- hdiffpatch/_c_src/tamp/tools/pi_pico/library-size/Makefile +45 -0
- hdiffpatch/_c_src/tamp/tools/pi_pico/library-size/README.md +3 -0
- hdiffpatch/_c_src/tamp/tools/profiler.py +15 -0
- hdiffpatch/_c_src/tamp/tools/zlib_compress.py +20 -0
- hdiffpatch/_c_src/tamp/tools/zlib_decompress.py +11 -0
- hdiffpatch/_c_src/tamp_compress_plugin.cpp +328 -0
- hdiffpatch/_c_src/zlib/.git +1 -0
- hdiffpatch/_c_src/zlib/.github/workflows/cmake.yml +89 -0
- hdiffpatch/_c_src/zlib/.github/workflows/configure.yml +136 -0
- hdiffpatch/_c_src/zlib/.github/workflows/fuzz.yml +25 -0
- hdiffpatch/_c_src/zlib/.gitignore +36 -0
- hdiffpatch/_c_src/zlib/CMakeLists.txt +218 -0
- hdiffpatch/_c_src/zlib/ChangeLog +1618 -0
- hdiffpatch/_c_src/zlib/FAQ +367 -0
- hdiffpatch/_c_src/zlib/INDEX +68 -0
- hdiffpatch/_c_src/zlib/LICENSE +22 -0
- hdiffpatch/_c_src/zlib/Makefile +5 -0
- hdiffpatch/_c_src/zlib/Makefile.in +410 -0
- hdiffpatch/_c_src/zlib/README +117 -0
- hdiffpatch/_c_src/zlib/adler32.c +164 -0
- hdiffpatch/_c_src/zlib/amiga/Makefile.pup +69 -0
- hdiffpatch/_c_src/zlib/amiga/Makefile.sas +68 -0
- hdiffpatch/_c_src/zlib/compress.c +75 -0
- hdiffpatch/_c_src/zlib/configure +929 -0
- hdiffpatch/_c_src/zlib/contrib/README.contrib +57 -0
- hdiffpatch/_c_src/zlib/contrib/ada/buffer_demo.adb +106 -0
- hdiffpatch/_c_src/zlib/contrib/ada/mtest.adb +156 -0
- hdiffpatch/_c_src/zlib/contrib/ada/read.adb +156 -0
- hdiffpatch/_c_src/zlib/contrib/ada/readme.txt +65 -0
- hdiffpatch/_c_src/zlib/contrib/ada/test.adb +463 -0
- hdiffpatch/_c_src/zlib/contrib/ada/zlib-streams.adb +225 -0
- hdiffpatch/_c_src/zlib/contrib/ada/zlib-streams.ads +114 -0
- hdiffpatch/_c_src/zlib/contrib/ada/zlib-thin.adb +141 -0
- hdiffpatch/_c_src/zlib/contrib/ada/zlib-thin.ads +450 -0
- hdiffpatch/_c_src/zlib/contrib/ada/zlib.adb +701 -0
- hdiffpatch/_c_src/zlib/contrib/ada/zlib.ads +328 -0
- hdiffpatch/_c_src/zlib/contrib/ada/zlib.gpr +20 -0
- hdiffpatch/_c_src/zlib/contrib/blast/Makefile +8 -0
- hdiffpatch/_c_src/zlib/contrib/blast/README +4 -0
- hdiffpatch/_c_src/zlib/contrib/blast/blast.c +466 -0
- hdiffpatch/_c_src/zlib/contrib/blast/blast.h +83 -0
- hdiffpatch/_c_src/zlib/contrib/blast/test.pk +0 -0
- hdiffpatch/_c_src/zlib/contrib/blast/test.txt +1 -0
- hdiffpatch/_c_src/zlib/contrib/delphi/ZLib.pas +557 -0
- hdiffpatch/_c_src/zlib/contrib/delphi/ZLibConst.pas +11 -0
- hdiffpatch/_c_src/zlib/contrib/delphi/readme.txt +76 -0
- hdiffpatch/_c_src/zlib/contrib/delphi/zlibd32.mak +99 -0
- hdiffpatch/_c_src/zlib/contrib/dotzlib/DotZLib/AssemblyInfo.cs +58 -0
- hdiffpatch/_c_src/zlib/contrib/dotzlib/DotZLib/ChecksumImpl.cs +202 -0
- hdiffpatch/_c_src/zlib/contrib/dotzlib/DotZLib/CircularBuffer.cs +83 -0
- hdiffpatch/_c_src/zlib/contrib/dotzlib/DotZLib/CodecBase.cs +198 -0
- hdiffpatch/_c_src/zlib/contrib/dotzlib/DotZLib/Deflater.cs +106 -0
- hdiffpatch/_c_src/zlib/contrib/dotzlib/DotZLib/DotZLib.cs +288 -0
- hdiffpatch/_c_src/zlib/contrib/dotzlib/DotZLib/DotZLib.csproj +141 -0
- hdiffpatch/_c_src/zlib/contrib/dotzlib/DotZLib/GZipStream.cs +301 -0
- hdiffpatch/_c_src/zlib/contrib/dotzlib/DotZLib/Inflater.cs +105 -0
- hdiffpatch/_c_src/zlib/contrib/dotzlib/DotZLib/UnitTests.cs +274 -0
- hdiffpatch/_c_src/zlib/contrib/dotzlib/DotZLib.build +33 -0
- hdiffpatch/_c_src/zlib/contrib/dotzlib/DotZLib.chm +0 -0
- hdiffpatch/_c_src/zlib/contrib/dotzlib/DotZLib.sln +21 -0
- hdiffpatch/_c_src/zlib/contrib/dotzlib/LICENSE_1_0.txt +23 -0
- hdiffpatch/_c_src/zlib/contrib/dotzlib/readme.txt +58 -0
- hdiffpatch/_c_src/zlib/contrib/gcc_gvmat64/gvmat64.S +574 -0
- hdiffpatch/_c_src/zlib/contrib/infback9/README +1 -0
- hdiffpatch/_c_src/zlib/contrib/infback9/infback9.c +603 -0
- hdiffpatch/_c_src/zlib/contrib/infback9/infback9.h +37 -0
- hdiffpatch/_c_src/zlib/contrib/infback9/inffix9.h +107 -0
- hdiffpatch/_c_src/zlib/contrib/infback9/inflate9.h +47 -0
- hdiffpatch/_c_src/zlib/contrib/infback9/inftree9.c +319 -0
- hdiffpatch/_c_src/zlib/contrib/infback9/inftree9.h +61 -0
- hdiffpatch/_c_src/zlib/contrib/iostream/test.cpp +24 -0
- hdiffpatch/_c_src/zlib/contrib/iostream/zfstream.cpp +329 -0
- hdiffpatch/_c_src/zlib/contrib/iostream/zfstream.h +128 -0
- hdiffpatch/_c_src/zlib/contrib/iostream2/zstream.h +307 -0
- hdiffpatch/_c_src/zlib/contrib/iostream2/zstream_test.cpp +25 -0
- hdiffpatch/_c_src/zlib/contrib/iostream3/README +35 -0
- hdiffpatch/_c_src/zlib/contrib/iostream3/TODO +17 -0
- hdiffpatch/_c_src/zlib/contrib/iostream3/test.cc +50 -0
- hdiffpatch/_c_src/zlib/contrib/iostream3/zfstream.cc +479 -0
- hdiffpatch/_c_src/zlib/contrib/iostream3/zfstream.h +466 -0
- hdiffpatch/_c_src/zlib/contrib/minizip/Makefile +29 -0
- hdiffpatch/_c_src/zlib/contrib/minizip/Makefile.am +45 -0
- hdiffpatch/_c_src/zlib/contrib/minizip/MiniZip64_Changes.txt +6 -0
- hdiffpatch/_c_src/zlib/contrib/minizip/MiniZip64_info.txt +74 -0
- hdiffpatch/_c_src/zlib/contrib/minizip/configure.ac +32 -0
- hdiffpatch/_c_src/zlib/contrib/minizip/crypt.h +128 -0
- hdiffpatch/_c_src/zlib/contrib/minizip/ioapi.c +231 -0
- hdiffpatch/_c_src/zlib/contrib/minizip/ioapi.h +210 -0
- hdiffpatch/_c_src/zlib/contrib/minizip/iowin32.c +440 -0
- hdiffpatch/_c_src/zlib/contrib/minizip/iowin32.h +28 -0
- hdiffpatch/_c_src/zlib/contrib/minizip/make_vms.com +25 -0
- hdiffpatch/_c_src/zlib/contrib/minizip/miniunz.c +647 -0
- hdiffpatch/_c_src/zlib/contrib/minizip/miniunzip.1 +63 -0
- hdiffpatch/_c_src/zlib/contrib/minizip/minizip.1 +46 -0
- hdiffpatch/_c_src/zlib/contrib/minizip/minizip.c +509 -0
- hdiffpatch/_c_src/zlib/contrib/minizip/minizip.pc.in +12 -0
- hdiffpatch/_c_src/zlib/contrib/minizip/mztools.c +285 -0
- hdiffpatch/_c_src/zlib/contrib/minizip/mztools.h +37 -0
- hdiffpatch/_c_src/zlib/contrib/minizip/unzip.c +1985 -0
- hdiffpatch/_c_src/zlib/contrib/minizip/unzip.h +437 -0
- hdiffpatch/_c_src/zlib/contrib/minizip/zip.c +1956 -0
- hdiffpatch/_c_src/zlib/contrib/minizip/zip.h +364 -0
- hdiffpatch/_c_src/zlib/contrib/nuget/nuget.csproj +43 -0
- hdiffpatch/_c_src/zlib/contrib/nuget/nuget.sln +22 -0
- hdiffpatch/_c_src/zlib/contrib/pascal/example.pas +599 -0
- hdiffpatch/_c_src/zlib/contrib/pascal/readme.txt +76 -0
- hdiffpatch/_c_src/zlib/contrib/pascal/zlibd32.mak +99 -0
- hdiffpatch/_c_src/zlib/contrib/pascal/zlibpas.pas +276 -0
- hdiffpatch/_c_src/zlib/contrib/puff/Makefile +42 -0
- hdiffpatch/_c_src/zlib/contrib/puff/README +63 -0
- hdiffpatch/_c_src/zlib/contrib/puff/puff.c +840 -0
- hdiffpatch/_c_src/zlib/contrib/puff/puff.h +35 -0
- hdiffpatch/_c_src/zlib/contrib/puff/pufftest.c +165 -0
- hdiffpatch/_c_src/zlib/contrib/puff/zeros.raw +0 -0
- hdiffpatch/_c_src/zlib/contrib/testzlib/testzlib.c +275 -0
- hdiffpatch/_c_src/zlib/contrib/testzlib/testzlib.txt +10 -0
- hdiffpatch/_c_src/zlib/contrib/untgz/Makefile +14 -0
- hdiffpatch/_c_src/zlib/contrib/untgz/Makefile.msc +17 -0
- hdiffpatch/_c_src/zlib/contrib/untgz/untgz.c +667 -0
- hdiffpatch/_c_src/zlib/contrib/vstudio/readme.txt +81 -0
- hdiffpatch/_c_src/zlib/contrib/vstudio/vc10/miniunz.vcxproj +310 -0
- hdiffpatch/_c_src/zlib/contrib/vstudio/vc10/miniunz.vcxproj.filters +22 -0
- hdiffpatch/_c_src/zlib/contrib/vstudio/vc10/minizip.vcxproj +307 -0
- hdiffpatch/_c_src/zlib/contrib/vstudio/vc10/minizip.vcxproj.filters +22 -0
- hdiffpatch/_c_src/zlib/contrib/vstudio/vc10/testzlib.vcxproj +412 -0
- hdiffpatch/_c_src/zlib/contrib/vstudio/vc10/testzlib.vcxproj.filters +55 -0
- hdiffpatch/_c_src/zlib/contrib/vstudio/vc10/testzlibdll.vcxproj +310 -0
- hdiffpatch/_c_src/zlib/contrib/vstudio/vc10/testzlibdll.vcxproj.filters +22 -0
- hdiffpatch/_c_src/zlib/contrib/vstudio/vc10/zlib.rc +32 -0
- hdiffpatch/_c_src/zlib/contrib/vstudio/vc10/zlibstat.vcxproj +449 -0
- hdiffpatch/_c_src/zlib/contrib/vstudio/vc10/zlibstat.vcxproj.filters +74 -0
- hdiffpatch/_c_src/zlib/contrib/vstudio/vc10/zlibvc.def +158 -0
- hdiffpatch/_c_src/zlib/contrib/vstudio/vc10/zlibvc.sln +135 -0
- hdiffpatch/_c_src/zlib/contrib/vstudio/vc10/zlibvc.vcxproj +633 -0
- hdiffpatch/_c_src/zlib/contrib/vstudio/vc10/zlibvc.vcxproj.filters +115 -0
- hdiffpatch/_c_src/zlib/contrib/vstudio/vc11/miniunz.vcxproj +314 -0
- hdiffpatch/_c_src/zlib/contrib/vstudio/vc11/minizip.vcxproj +311 -0
- hdiffpatch/_c_src/zlib/contrib/vstudio/vc11/testzlib.vcxproj +418 -0
- hdiffpatch/_c_src/zlib/contrib/vstudio/vc11/testzlibdll.vcxproj +314 -0
- hdiffpatch/_c_src/zlib/contrib/vstudio/vc11/zlib.rc +32 -0
- hdiffpatch/_c_src/zlib/contrib/vstudio/vc11/zlibstat.vcxproj +456 -0
- hdiffpatch/_c_src/zlib/contrib/vstudio/vc11/zlibvc.def +158 -0
- hdiffpatch/_c_src/zlib/contrib/vstudio/vc11/zlibvc.sln +117 -0
- hdiffpatch/_c_src/zlib/contrib/vstudio/vc11/zlibvc.vcxproj +664 -0
- hdiffpatch/_c_src/zlib/contrib/vstudio/vc12/miniunz.vcxproj +316 -0
- hdiffpatch/_c_src/zlib/contrib/vstudio/vc12/minizip.vcxproj +313 -0
- hdiffpatch/_c_src/zlib/contrib/vstudio/vc12/testzlib.vcxproj +422 -0
- hdiffpatch/_c_src/zlib/contrib/vstudio/vc12/testzlibdll.vcxproj +316 -0
- hdiffpatch/_c_src/zlib/contrib/vstudio/vc12/zlib.rc +32 -0
- hdiffpatch/_c_src/zlib/contrib/vstudio/vc12/zlibstat.vcxproj +459 -0
- hdiffpatch/_c_src/zlib/contrib/vstudio/vc12/zlibvc.def +158 -0
- hdiffpatch/_c_src/zlib/contrib/vstudio/vc12/zlibvc.sln +119 -0
- hdiffpatch/_c_src/zlib/contrib/vstudio/vc12/zlibvc.vcxproj +668 -0
- hdiffpatch/_c_src/zlib/contrib/vstudio/vc14/miniunz.vcxproj +316 -0
- hdiffpatch/_c_src/zlib/contrib/vstudio/vc14/minizip.vcxproj +313 -0
- hdiffpatch/_c_src/zlib/contrib/vstudio/vc14/testzlib.vcxproj +422 -0
- hdiffpatch/_c_src/zlib/contrib/vstudio/vc14/testzlibdll.vcxproj +316 -0
- hdiffpatch/_c_src/zlib/contrib/vstudio/vc14/zlib.rc +32 -0
- hdiffpatch/_c_src/zlib/contrib/vstudio/vc14/zlibstat.vcxproj +459 -0
- hdiffpatch/_c_src/zlib/contrib/vstudio/vc14/zlibvc.def +158 -0
- hdiffpatch/_c_src/zlib/contrib/vstudio/vc14/zlibvc.sln +119 -0
- hdiffpatch/_c_src/zlib/contrib/vstudio/vc14/zlibvc.vcxproj +668 -0
- hdiffpatch/_c_src/zlib/contrib/vstudio/vc17/miniunz.vcxproj +409 -0
- hdiffpatch/_c_src/zlib/contrib/vstudio/vc17/minizip.vcxproj +405 -0
- hdiffpatch/_c_src/zlib/contrib/vstudio/vc17/testzlib.vcxproj +473 -0
- hdiffpatch/_c_src/zlib/contrib/vstudio/vc17/testzlibdll.vcxproj +409 -0
- hdiffpatch/_c_src/zlib/contrib/vstudio/vc17/zlib.rc +32 -0
- hdiffpatch/_c_src/zlib/contrib/vstudio/vc17/zlibstat.vcxproj +602 -0
- hdiffpatch/_c_src/zlib/contrib/vstudio/vc17/zlibvc.def +158 -0
- hdiffpatch/_c_src/zlib/contrib/vstudio/vc17/zlibvc.sln +179 -0
- hdiffpatch/_c_src/zlib/contrib/vstudio/vc17/zlibvc.vcxproj +875 -0
- hdiffpatch/_c_src/zlib/contrib/vstudio/vc9/miniunz.vcproj +565 -0
- hdiffpatch/_c_src/zlib/contrib/vstudio/vc9/minizip.vcproj +562 -0
- hdiffpatch/_c_src/zlib/contrib/vstudio/vc9/testzlib.vcproj +796 -0
- hdiffpatch/_c_src/zlib/contrib/vstudio/vc9/testzlibdll.vcproj +565 -0
- hdiffpatch/_c_src/zlib/contrib/vstudio/vc9/zlib.rc +32 -0
- hdiffpatch/_c_src/zlib/contrib/vstudio/vc9/zlibstat.vcproj +781 -0
- hdiffpatch/_c_src/zlib/contrib/vstudio/vc9/zlibvc.def +158 -0
- hdiffpatch/_c_src/zlib/contrib/vstudio/vc9/zlibvc.sln +144 -0
- hdiffpatch/_c_src/zlib/contrib/vstudio/vc9/zlibvc.vcproj +1100 -0
- hdiffpatch/_c_src/zlib/crc32.c +1049 -0
- hdiffpatch/_c_src/zlib/crc32.h +9446 -0
- hdiffpatch/_c_src/zlib/deflate.c +2159 -0
- hdiffpatch/_c_src/zlib/deflate.h +377 -0
- hdiffpatch/_c_src/zlib/doc/algorithm.txt +209 -0
- hdiffpatch/_c_src/zlib/doc/crc-doc.1.0.pdf +0 -0
- hdiffpatch/_c_src/zlib/doc/rfc1950.txt +619 -0
- hdiffpatch/_c_src/zlib/doc/rfc1951.txt +955 -0
- hdiffpatch/_c_src/zlib/doc/rfc1952.txt +675 -0
- hdiffpatch/_c_src/zlib/doc/txtvsbin.txt +107 -0
- hdiffpatch/_c_src/zlib/examples/README.examples +54 -0
- hdiffpatch/_c_src/zlib/examples/enough.c +597 -0
- hdiffpatch/_c_src/zlib/examples/fitblk.c +233 -0
- hdiffpatch/_c_src/zlib/examples/gun.c +702 -0
- hdiffpatch/_c_src/zlib/examples/gzappend.c +504 -0
- hdiffpatch/_c_src/zlib/examples/gzjoin.c +449 -0
- hdiffpatch/_c_src/zlib/examples/gzlog.c +1061 -0
- hdiffpatch/_c_src/zlib/examples/gzlog.h +91 -0
- hdiffpatch/_c_src/zlib/examples/gznorm.c +470 -0
- hdiffpatch/_c_src/zlib/examples/zlib_how.html +549 -0
- hdiffpatch/_c_src/zlib/examples/zpipe.c +205 -0
- hdiffpatch/_c_src/zlib/examples/zran.c +533 -0
- hdiffpatch/_c_src/zlib/examples/zran.h +51 -0
- hdiffpatch/_c_src/zlib/gzclose.c +23 -0
- hdiffpatch/_c_src/zlib/gzguts.h +214 -0
- hdiffpatch/_c_src/zlib/gzlib.c +582 -0
- hdiffpatch/_c_src/zlib/gzread.c +602 -0
- hdiffpatch/_c_src/zlib/gzwrite.c +631 -0
- hdiffpatch/_c_src/zlib/infback.c +628 -0
- hdiffpatch/_c_src/zlib/inffast.c +320 -0
- hdiffpatch/_c_src/zlib/inffast.h +11 -0
- hdiffpatch/_c_src/zlib/inffixed.h +94 -0
- hdiffpatch/_c_src/zlib/inflate.c +1546 -0
- hdiffpatch/_c_src/zlib/inflate.h +126 -0
- hdiffpatch/_c_src/zlib/inftrees.c +299 -0
- hdiffpatch/_c_src/zlib/inftrees.h +62 -0
- hdiffpatch/_c_src/zlib/make_vms.com +867 -0
- hdiffpatch/_c_src/zlib/msdos/Makefile.bor +115 -0
- hdiffpatch/_c_src/zlib/msdos/Makefile.dj2 +104 -0
- hdiffpatch/_c_src/zlib/msdos/Makefile.emx +69 -0
- hdiffpatch/_c_src/zlib/msdos/Makefile.msc +112 -0
- hdiffpatch/_c_src/zlib/msdos/Makefile.tc +100 -0
- hdiffpatch/_c_src/zlib/nintendods/Makefile +126 -0
- hdiffpatch/_c_src/zlib/nintendods/README +5 -0
- hdiffpatch/_c_src/zlib/old/Makefile.emx +69 -0
- hdiffpatch/_c_src/zlib/old/Makefile.riscos +151 -0
- hdiffpatch/_c_src/zlib/old/README +3 -0
- hdiffpatch/_c_src/zlib/old/descrip.mms +48 -0
- hdiffpatch/_c_src/zlib/old/os2/Makefile.os2 +136 -0
- hdiffpatch/_c_src/zlib/old/os2/zlib.def +51 -0
- hdiffpatch/_c_src/zlib/old/visual-basic.txt +160 -0
- hdiffpatch/_c_src/zlib/os400/README400 +48 -0
- hdiffpatch/_c_src/zlib/os400/bndsrc +127 -0
- hdiffpatch/_c_src/zlib/os400/make.sh +366 -0
- hdiffpatch/_c_src/zlib/os400/zlib.inc +527 -0
- hdiffpatch/_c_src/zlib/qnx/package.qpg +141 -0
- hdiffpatch/_c_src/zlib/test/example.c +546 -0
- hdiffpatch/_c_src/zlib/test/infcover.c +672 -0
- hdiffpatch/_c_src/zlib/test/minigzip.c +579 -0
- hdiffpatch/_c_src/zlib/treebuild.xml +116 -0
- hdiffpatch/_c_src/zlib/trees.c +1117 -0
- hdiffpatch/_c_src/zlib/trees.h +128 -0
- hdiffpatch/_c_src/zlib/uncompr.c +85 -0
- hdiffpatch/_c_src/zlib/watcom/watcom_f.mak +43 -0
- hdiffpatch/_c_src/zlib/watcom/watcom_l.mak +43 -0
- hdiffpatch/_c_src/zlib/win32/DLL_FAQ.txt +381 -0
- hdiffpatch/_c_src/zlib/win32/Makefile.bor +109 -0
- hdiffpatch/_c_src/zlib/win32/Makefile.gcc +177 -0
- hdiffpatch/_c_src/zlib/win32/Makefile.msc +159 -0
- hdiffpatch/_c_src/zlib/win32/README-WIN32.txt +103 -0
- hdiffpatch/_c_src/zlib/win32/VisualC.txt +3 -0
- hdiffpatch/_c_src/zlib/win32/zlib.def +97 -0
- hdiffpatch/_c_src/zlib/win32/zlib1.rc +40 -0
- hdiffpatch/_c_src/zlib/zconf.h +543 -0
- hdiffpatch/_c_src/zlib/zconf.h.cmakein +545 -0
- hdiffpatch/_c_src/zlib/zconf.h.in +543 -0
- hdiffpatch/_c_src/zlib/zlib.3 +149 -0
- hdiffpatch/_c_src/zlib/zlib.3.pdf +0 -0
- hdiffpatch/_c_src/zlib/zlib.h +1945 -0
- hdiffpatch/_c_src/zlib/zlib.map +100 -0
- hdiffpatch/_c_src/zlib/zlib.pc.cmakein +13 -0
- hdiffpatch/_c_src/zlib/zlib.pc.in +13 -0
- hdiffpatch/_c_src/zlib/zutil.c +299 -0
- hdiffpatch/_c_src/zlib/zutil.h +254 -0
- hdiffpatch/_c_src/zstd/.buckconfig +9 -0
- hdiffpatch/_c_src/zstd/.buckversion +1 -0
- hdiffpatch/_c_src/zstd/.cirrus.yml +9 -0
- hdiffpatch/_c_src/zstd/.git +1 -0
- hdiffpatch/_c_src/zstd/.gitattributes +21 -0
- hdiffpatch/_c_src/zstd/.github/ISSUE_TEMPLATE/bug_report.md +35 -0
- hdiffpatch/_c_src/zstd/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
- hdiffpatch/_c_src/zstd/.github/dependabot.yml +6 -0
- hdiffpatch/_c_src/zstd/.github/workflows/android-ndk-build.yml +39 -0
- hdiffpatch/_c_src/zstd/.github/workflows/commit.yml +104 -0
- hdiffpatch/_c_src/zstd/.github/workflows/dev-long-tests.yml +313 -0
- hdiffpatch/_c_src/zstd/.github/workflows/dev-short-tests.yml +725 -0
- hdiffpatch/_c_src/zstd/.github/workflows/nightly.yml +38 -0
- hdiffpatch/_c_src/zstd/.github/workflows/publish-release-artifacts.yml +73 -0
- hdiffpatch/_c_src/zstd/.github/workflows/scorecards.yml +64 -0
- hdiffpatch/_c_src/zstd/.github/workflows/windows-artifacts.yml +58 -0
- hdiffpatch/_c_src/zstd/.gitignore +63 -0
- hdiffpatch/_c_src/zstd/CHANGELOG +863 -0
- hdiffpatch/_c_src/zstd/CODE_OF_CONDUCT.md +5 -0
- hdiffpatch/_c_src/zstd/CONTRIBUTING.md +489 -0
- hdiffpatch/_c_src/zstd/COPYING +339 -0
- hdiffpatch/_c_src/zstd/LICENSE +30 -0
- hdiffpatch/_c_src/zstd/Makefile +471 -0
- hdiffpatch/_c_src/zstd/Package.swift +36 -0
- hdiffpatch/_c_src/zstd/README.md +237 -0
- hdiffpatch/_c_src/zstd/SECURITY.md +15 -0
- hdiffpatch/_c_src/zstd/TESTING.md +43 -0
- hdiffpatch/_c_src/zstd/build/.gitignore +33 -0
- hdiffpatch/_c_src/zstd/build/LICENSE +0 -0
- hdiffpatch/_c_src/zstd/build/README.md +56 -0
- hdiffpatch/_c_src/zstd/build/VS2008/fullbench/fullbench.vcproj +549 -0
- hdiffpatch/_c_src/zstd/build/VS2008/fuzzer/fuzzer.vcproj +585 -0
- hdiffpatch/_c_src/zstd/build/VS2008/zstd/zstd.vcproj +677 -0
- hdiffpatch/_c_src/zstd/build/VS2008/zstd.sln +56 -0
- hdiffpatch/_c_src/zstd/build/VS2008/zstdlib/zstdlib.vcproj +635 -0
- hdiffpatch/_c_src/zstd/build/VS2010/CompileAsCpp.props +8 -0
- hdiffpatch/_c_src/zstd/build/VS2010/datagen/datagen.vcxproj +170 -0
- hdiffpatch/_c_src/zstd/build/VS2010/fullbench/fullbench.vcxproj +220 -0
- hdiffpatch/_c_src/zstd/build/VS2010/fuzzer/fuzzer.vcxproj +224 -0
- hdiffpatch/_c_src/zstd/build/VS2010/libzstd/libzstd.vcxproj +243 -0
- hdiffpatch/_c_src/zstd/build/VS2010/libzstd-dll/libzstd-dll.rc +51 -0
- hdiffpatch/_c_src/zstd/build/VS2010/libzstd-dll/libzstd-dll.vcxproj +250 -0
- hdiffpatch/_c_src/zstd/build/VS2010/zstd/zstd.rc +51 -0
- hdiffpatch/_c_src/zstd/build/VS2010/zstd/zstd.vcxproj +266 -0
- hdiffpatch/_c_src/zstd/build/VS2010/zstd.sln +84 -0
- hdiffpatch/_c_src/zstd/build/VS_scripts/README.md +64 -0
- hdiffpatch/_c_src/zstd/build/VS_scripts/build.VS2010.cmd +7 -0
- hdiffpatch/_c_src/zstd/build/VS_scripts/build.VS2012.cmd +6 -0
- hdiffpatch/_c_src/zstd/build/VS_scripts/build.VS2013.cmd +7 -0
- hdiffpatch/_c_src/zstd/build/VS_scripts/build.VS2015.cmd +7 -0
- hdiffpatch/_c_src/zstd/build/VS_scripts/build.VS2017.cmd +7 -0
- hdiffpatch/_c_src/zstd/build/VS_scripts/build.VS2017Community.cmd +7 -0
- hdiffpatch/_c_src/zstd/build/VS_scripts/build.VS2017Enterprise.cmd +7 -0
- hdiffpatch/_c_src/zstd/build/VS_scripts/build.VS2017Professional.cmd +7 -0
- hdiffpatch/_c_src/zstd/build/VS_scripts/build.VSPreview.cmd +7 -0
- hdiffpatch/_c_src/zstd/build/VS_scripts/build.generic.cmd +67 -0
- hdiffpatch/_c_src/zstd/build/cmake/.gitignore +10 -0
- hdiffpatch/_c_src/zstd/build/cmake/CMakeLists.txt +228 -0
- hdiffpatch/_c_src/zstd/build/cmake/CMakeModules/AddZstdCompilationFlags.cmake +136 -0
- hdiffpatch/_c_src/zstd/build/cmake/CMakeModules/FindLibLZ4.cmake +49 -0
- hdiffpatch/_c_src/zstd/build/cmake/CMakeModules/GetZstdLibraryVersion.cmake +10 -0
- hdiffpatch/_c_src/zstd/build/cmake/CMakeModules/JoinPaths.cmake +23 -0
- hdiffpatch/_c_src/zstd/build/cmake/README.md +146 -0
- hdiffpatch/_c_src/zstd/build/cmake/contrib/CMakeLists.txt +13 -0
- hdiffpatch/_c_src/zstd/build/cmake/contrib/gen_html/CMakeLists.txt +30 -0
- hdiffpatch/_c_src/zstd/build/cmake/contrib/pzstd/CMakeLists.txt +39 -0
- hdiffpatch/_c_src/zstd/build/cmake/lib/.gitignore +2 -0
- hdiffpatch/_c_src/zstd/build/cmake/lib/CMakeLists.txt +295 -0
- hdiffpatch/_c_src/zstd/build/cmake/lib/cmake_uninstall.cmake.in +22 -0
- hdiffpatch/_c_src/zstd/build/cmake/programs/.gitignore +5 -0
- hdiffpatch/_c_src/zstd/build/cmake/programs/CMakeLists.txt +144 -0
- hdiffpatch/_c_src/zstd/build/cmake/tests/.gitignore +6 -0
- hdiffpatch/_c_src/zstd/build/cmake/tests/CMakeLists.txt +118 -0
- hdiffpatch/_c_src/zstd/build/cmake/zstdConfig.cmake.in +10 -0
- hdiffpatch/_c_src/zstd/build/meson/GetZstdLibraryVersion.py +39 -0
- hdiffpatch/_c_src/zstd/build/meson/InstallSymlink.py +55 -0
- hdiffpatch/_c_src/zstd/build/meson/README.md +38 -0
- hdiffpatch/_c_src/zstd/build/meson/contrib/gen_html/meson.build +30 -0
- hdiffpatch/_c_src/zstd/build/meson/contrib/meson.build +12 -0
- hdiffpatch/_c_src/zstd/build/meson/contrib/pzstd/meson.build +25 -0
- hdiffpatch/_c_src/zstd/build/meson/lib/meson.build +171 -0
- hdiffpatch/_c_src/zstd/build/meson/meson.build +156 -0
- hdiffpatch/_c_src/zstd/build/meson/meson_options.txt +36 -0
- hdiffpatch/_c_src/zstd/build/meson/programs/meson.build +124 -0
- hdiffpatch/_c_src/zstd/build/meson/tests/meson.build +217 -0
- hdiffpatch/_c_src/zstd/build/meson/tests/valgrindTest.py +90 -0
- hdiffpatch/_c_src/zstd/build/single_file_libs/.gitignore +10 -0
- hdiffpatch/_c_src/zstd/build/single_file_libs/README.md +33 -0
- hdiffpatch/_c_src/zstd/build/single_file_libs/build_decoder_test.sh +91 -0
- hdiffpatch/_c_src/zstd/build/single_file_libs/build_library_test.sh +98 -0
- hdiffpatch/_c_src/zstd/build/single_file_libs/combine.py +234 -0
- hdiffpatch/_c_src/zstd/build/single_file_libs/combine.sh +249 -0
- hdiffpatch/_c_src/zstd/build/single_file_libs/create_single_file_decoder.sh +19 -0
- hdiffpatch/_c_src/zstd/build/single_file_libs/create_single_file_library.sh +19 -0
- hdiffpatch/_c_src/zstd/build/single_file_libs/examples/README.md +11 -0
- hdiffpatch/_c_src/zstd/build/single_file_libs/examples/emscripten.c +340 -0
- hdiffpatch/_c_src/zstd/build/single_file_libs/examples/roundtrip.c +83 -0
- hdiffpatch/_c_src/zstd/build/single_file_libs/examples/shell.html +31 -0
- hdiffpatch/_c_src/zstd/build/single_file_libs/examples/simple.c +75 -0
- hdiffpatch/_c_src/zstd/build/single_file_libs/examples/testcard-dxt1.inl +2731 -0
- hdiffpatch/_c_src/zstd/build/single_file_libs/examples/testcard-zstd.inl +261 -0
- hdiffpatch/_c_src/zstd/build/single_file_libs/examples/testcard.png +0 -0
- hdiffpatch/_c_src/zstd/build/single_file_libs/zstd-in.c +91 -0
- hdiffpatch/_c_src/zstd/build/single_file_libs/zstddeclib-in.c +62 -0
- hdiffpatch/_c_src/zstd/contrib/VS2005/README.md +3 -0
- hdiffpatch/_c_src/zstd/contrib/VS2005/fullbench/fullbench.vcproj +440 -0
- hdiffpatch/_c_src/zstd/contrib/VS2005/fuzzer/fuzzer.vcproj +488 -0
- hdiffpatch/_c_src/zstd/contrib/VS2005/zstd/zstd.vcproj +552 -0
- hdiffpatch/_c_src/zstd/contrib/VS2005/zstd.sln +55 -0
- hdiffpatch/_c_src/zstd/contrib/VS2005/zstdlib/zstdlib.vcproj +546 -0
- hdiffpatch/_c_src/zstd/contrib/cleanTabs +2 -0
- hdiffpatch/_c_src/zstd/contrib/diagnose_corruption/.gitignore +1 -0
- hdiffpatch/_c_src/zstd/contrib/diagnose_corruption/Makefile +35 -0
- hdiffpatch/_c_src/zstd/contrib/diagnose_corruption/check_flipped_bits.c +400 -0
- hdiffpatch/_c_src/zstd/contrib/docker/Dockerfile +20 -0
- hdiffpatch/_c_src/zstd/contrib/docker/README.md +20 -0
- hdiffpatch/_c_src/zstd/contrib/externalSequenceProducer/.gitignore +2 -0
- hdiffpatch/_c_src/zstd/contrib/externalSequenceProducer/Makefile +40 -0
- hdiffpatch/_c_src/zstd/contrib/externalSequenceProducer/README.md +14 -0
- hdiffpatch/_c_src/zstd/contrib/externalSequenceProducer/main.c +107 -0
- hdiffpatch/_c_src/zstd/contrib/externalSequenceProducer/sequence_producer.c +80 -0
- hdiffpatch/_c_src/zstd/contrib/externalSequenceProducer/sequence_producer.h +26 -0
- hdiffpatch/_c_src/zstd/contrib/freestanding_lib/freestanding.py +774 -0
- hdiffpatch/_c_src/zstd/contrib/gen_html/.gitignore +3 -0
- hdiffpatch/_c_src/zstd/contrib/gen_html/Makefile +51 -0
- hdiffpatch/_c_src/zstd/contrib/gen_html/README.md +31 -0
- hdiffpatch/_c_src/zstd/contrib/gen_html/gen-zstd-manual.sh +9 -0
- hdiffpatch/_c_src/zstd/contrib/gen_html/gen_html.cpp +225 -0
- hdiffpatch/_c_src/zstd/contrib/largeNbDicts/.gitignore +2 -0
- hdiffpatch/_c_src/zstd/contrib/largeNbDicts/Makefile +58 -0
- hdiffpatch/_c_src/zstd/contrib/largeNbDicts/README.md +33 -0
- hdiffpatch/_c_src/zstd/contrib/largeNbDicts/largeNbDicts.c +1085 -0
- hdiffpatch/_c_src/zstd/contrib/linux-kernel/.gitignore +4 -0
- hdiffpatch/_c_src/zstd/contrib/linux-kernel/Makefile +108 -0
- hdiffpatch/_c_src/zstd/contrib/linux-kernel/README.md +14 -0
- hdiffpatch/_c_src/zstd/contrib/linux-kernel/btrfs-benchmark.sh +104 -0
- hdiffpatch/_c_src/zstd/contrib/linux-kernel/btrfs-extract-benchmark.sh +99 -0
- hdiffpatch/_c_src/zstd/contrib/linux-kernel/decompress_sources.h +34 -0
- hdiffpatch/_c_src/zstd/contrib/linux-kernel/linux.mk +44 -0
- hdiffpatch/_c_src/zstd/contrib/linux-kernel/linux_zstd.h +525 -0
- hdiffpatch/_c_src/zstd/contrib/linux-kernel/mem.h +262 -0
- hdiffpatch/_c_src/zstd/contrib/linux-kernel/squashfs-benchmark.sh +39 -0
- hdiffpatch/_c_src/zstd/contrib/linux-kernel/test/Makefile +49 -0
- hdiffpatch/_c_src/zstd/contrib/linux-kernel/test/include/linux/compiler.h +23 -0
- hdiffpatch/_c_src/zstd/contrib/linux-kernel/test/include/linux/errno.h +15 -0
- hdiffpatch/_c_src/zstd/contrib/linux-kernel/test/include/linux/kernel.h +19 -0
- hdiffpatch/_c_src/zstd/contrib/linux-kernel/test/include/linux/limits.h +15 -0
- hdiffpatch/_c_src/zstd/contrib/linux-kernel/test/include/linux/math64.h +15 -0
- hdiffpatch/_c_src/zstd/contrib/linux-kernel/test/include/linux/module.h +20 -0
- hdiffpatch/_c_src/zstd/contrib/linux-kernel/test/include/linux/printk.h +15 -0
- hdiffpatch/_c_src/zstd/contrib/linux-kernel/test/include/linux/stddef.h +15 -0
- hdiffpatch/_c_src/zstd/contrib/linux-kernel/test/include/linux/swab.h +16 -0
- hdiffpatch/_c_src/zstd/contrib/linux-kernel/test/include/linux/types.h +16 -0
- hdiffpatch/_c_src/zstd/contrib/linux-kernel/test/include/linux/unaligned.h +187 -0
- hdiffpatch/_c_src/zstd/contrib/linux-kernel/test/include/linux/xxhash.h +745 -0
- hdiffpatch/_c_src/zstd/contrib/linux-kernel/test/macro-test.sh +44 -0
- hdiffpatch/_c_src/zstd/contrib/linux-kernel/test/static_test.c +52 -0
- hdiffpatch/_c_src/zstd/contrib/linux-kernel/test/test.c +229 -0
- hdiffpatch/_c_src/zstd/contrib/linux-kernel/zstd_common_module.c +29 -0
- hdiffpatch/_c_src/zstd/contrib/linux-kernel/zstd_compress_module.c +237 -0
- hdiffpatch/_c_src/zstd/contrib/linux-kernel/zstd_decompress_module.c +105 -0
- hdiffpatch/_c_src/zstd/contrib/linux-kernel/zstd_deps.h +121 -0
- hdiffpatch/_c_src/zstd/contrib/match_finders/README.md +42 -0
- hdiffpatch/_c_src/zstd/contrib/match_finders/zstd_edist.c +558 -0
- hdiffpatch/_c_src/zstd/contrib/match_finders/zstd_edist.h +70 -0
- hdiffpatch/_c_src/zstd/contrib/premake/premake4.lua +6 -0
- hdiffpatch/_c_src/zstd/contrib/premake/zstd.lua +80 -0
- hdiffpatch/_c_src/zstd/contrib/pzstd/.gitignore +2 -0
- hdiffpatch/_c_src/zstd/contrib/pzstd/BUCK +72 -0
- hdiffpatch/_c_src/zstd/contrib/pzstd/ErrorHolder.h +54 -0
- hdiffpatch/_c_src/zstd/contrib/pzstd/Logging.h +72 -0
- hdiffpatch/_c_src/zstd/contrib/pzstd/Makefile +265 -0
- hdiffpatch/_c_src/zstd/contrib/pzstd/Options.cpp +424 -0
- hdiffpatch/_c_src/zstd/contrib/pzstd/Options.h +71 -0
- hdiffpatch/_c_src/zstd/contrib/pzstd/Pzstd.cpp +626 -0
- hdiffpatch/_c_src/zstd/contrib/pzstd/Pzstd.h +153 -0
- hdiffpatch/_c_src/zstd/contrib/pzstd/README.md +56 -0
- hdiffpatch/_c_src/zstd/contrib/pzstd/SkippableFrame.cpp +30 -0
- hdiffpatch/_c_src/zstd/contrib/pzstd/SkippableFrame.h +64 -0
- hdiffpatch/_c_src/zstd/contrib/pzstd/images/Cspeed.png +0 -0
- hdiffpatch/_c_src/zstd/contrib/pzstd/images/Dspeed.png +0 -0
- hdiffpatch/_c_src/zstd/contrib/pzstd/main.cpp +27 -0
- hdiffpatch/_c_src/zstd/contrib/pzstd/test/BUCK +37 -0
- hdiffpatch/_c_src/zstd/contrib/pzstd/test/OptionsTest.cpp +536 -0
- hdiffpatch/_c_src/zstd/contrib/pzstd/test/PzstdTest.cpp +147 -0
- hdiffpatch/_c_src/zstd/contrib/pzstd/test/RoundTrip.h +86 -0
- hdiffpatch/_c_src/zstd/contrib/pzstd/test/RoundTripTest.cpp +84 -0
- hdiffpatch/_c_src/zstd/contrib/pzstd/utils/BUCK +75 -0
- hdiffpatch/_c_src/zstd/contrib/pzstd/utils/Buffer.h +99 -0
- hdiffpatch/_c_src/zstd/contrib/pzstd/utils/FileSystem.h +96 -0
- hdiffpatch/_c_src/zstd/contrib/pzstd/utils/Likely.h +28 -0
- hdiffpatch/_c_src/zstd/contrib/pzstd/utils/Portability.h +16 -0
- hdiffpatch/_c_src/zstd/contrib/pzstd/utils/Range.h +133 -0
- hdiffpatch/_c_src/zstd/contrib/pzstd/utils/ResourcePool.h +96 -0
- hdiffpatch/_c_src/zstd/contrib/pzstd/utils/ScopeGuard.h +50 -0
- hdiffpatch/_c_src/zstd/contrib/pzstd/utils/ThreadPool.h +58 -0
- hdiffpatch/_c_src/zstd/contrib/pzstd/utils/WorkQueue.h +182 -0
- hdiffpatch/_c_src/zstd/contrib/pzstd/utils/test/BUCK +35 -0
- hdiffpatch/_c_src/zstd/contrib/pzstd/utils/test/BufferTest.cpp +89 -0
- hdiffpatch/_c_src/zstd/contrib/pzstd/utils/test/RangeTest.cpp +82 -0
- hdiffpatch/_c_src/zstd/contrib/pzstd/utils/test/ResourcePoolTest.cpp +72 -0
- hdiffpatch/_c_src/zstd/contrib/pzstd/utils/test/ScopeGuardTest.cpp +28 -0
- hdiffpatch/_c_src/zstd/contrib/pzstd/utils/test/ThreadPoolTest.cpp +71 -0
- hdiffpatch/_c_src/zstd/contrib/pzstd/utils/test/WorkQueueTest.cpp +282 -0
- hdiffpatch/_c_src/zstd/contrib/recovery/Makefile +35 -0
- hdiffpatch/_c_src/zstd/contrib/recovery/recover_directory.c +152 -0
- hdiffpatch/_c_src/zstd/contrib/seekable_format/README.md +42 -0
- hdiffpatch/_c_src/zstd/contrib/seekable_format/examples/.gitignore +5 -0
- hdiffpatch/_c_src/zstd/contrib/seekable_format/examples/Makefile +53 -0
- hdiffpatch/_c_src/zstd/contrib/seekable_format/examples/parallel_compression.c +214 -0
- hdiffpatch/_c_src/zstd/contrib/seekable_format/examples/parallel_processing.c +194 -0
- hdiffpatch/_c_src/zstd/contrib/seekable_format/examples/seekable_compression.c +136 -0
- hdiffpatch/_c_src/zstd/contrib/seekable_format/examples/seekable_decompression.c +141 -0
- hdiffpatch/_c_src/zstd/contrib/seekable_format/examples/seekable_decompression_mem.c +147 -0
- hdiffpatch/_c_src/zstd/contrib/seekable_format/tests/.gitignore +1 -0
- hdiffpatch/_c_src/zstd/contrib/seekable_format/tests/Makefile +38 -0
- hdiffpatch/_c_src/zstd/contrib/seekable_format/tests/seekable_tests.c +363 -0
- hdiffpatch/_c_src/zstd/contrib/seekable_format/zstd_seekable.h +226 -0
- hdiffpatch/_c_src/zstd/contrib/seekable_format/zstd_seekable_compression_format.md +116 -0
- hdiffpatch/_c_src/zstd/contrib/seekable_format/zstdseek_compress.c +365 -0
- hdiffpatch/_c_src/zstd/contrib/seekable_format/zstdseek_decompress.c +600 -0
- hdiffpatch/_c_src/zstd/contrib/seqBench/Makefile +58 -0
- hdiffpatch/_c_src/zstd/contrib/seqBench/seqBench.c +53 -0
- hdiffpatch/_c_src/zstd/contrib/snap/snapcraft.yaml +28 -0
- hdiffpatch/_c_src/zstd/doc/README.md +26 -0
- hdiffpatch/_c_src/zstd/doc/decompressor_errata.md +148 -0
- hdiffpatch/_c_src/zstd/doc/decompressor_permissive.md +80 -0
- hdiffpatch/_c_src/zstd/doc/educational_decoder/.gitignore +2 -0
- hdiffpatch/_c_src/zstd/doc/educational_decoder/Makefile +62 -0
- hdiffpatch/_c_src/zstd/doc/educational_decoder/README.md +36 -0
- hdiffpatch/_c_src/zstd/doc/educational_decoder/harness.c +119 -0
- hdiffpatch/_c_src/zstd/doc/educational_decoder/zstd_decompress.c +2323 -0
- hdiffpatch/_c_src/zstd/doc/educational_decoder/zstd_decompress.h +61 -0
- hdiffpatch/_c_src/zstd/doc/images/CSpeed2.png +0 -0
- hdiffpatch/_c_src/zstd/doc/images/DCspeed5.png +0 -0
- hdiffpatch/_c_src/zstd/doc/images/DSpeed3.png +0 -0
- hdiffpatch/_c_src/zstd/doc/images/cdict_v136.png +0 -0
- hdiffpatch/_c_src/zstd/doc/images/dict-cr.png +0 -0
- hdiffpatch/_c_src/zstd/doc/images/dict-cs.png +0 -0
- hdiffpatch/_c_src/zstd/doc/images/dict-ds.png +0 -0
- hdiffpatch/_c_src/zstd/doc/images/zstd_cdict_v1_3_5.png +0 -0
- hdiffpatch/_c_src/zstd/doc/images/zstd_logo86.png +0 -0
- hdiffpatch/_c_src/zstd/doc/zstd_compression_format.md +1771 -0
- hdiffpatch/_c_src/zstd/doc/zstd_manual.html +2237 -0
- hdiffpatch/_c_src/zstd/examples/.gitignore +15 -0
- hdiffpatch/_c_src/zstd/examples/Makefile +93 -0
- hdiffpatch/_c_src/zstd/examples/README.md +46 -0
- hdiffpatch/_c_src/zstd/examples/common.h +246 -0
- hdiffpatch/_c_src/zstd/examples/dictionary_compression.c +107 -0
- hdiffpatch/_c_src/zstd/examples/dictionary_decompression.c +99 -0
- hdiffpatch/_c_src/zstd/examples/multiple_simple_compression.c +116 -0
- hdiffpatch/_c_src/zstd/examples/multiple_streaming_compression.c +133 -0
- hdiffpatch/_c_src/zstd/examples/simple_compression.c +68 -0
- hdiffpatch/_c_src/zstd/examples/simple_decompression.c +65 -0
- hdiffpatch/_c_src/zstd/examples/streaming_compression.c +146 -0
- hdiffpatch/_c_src/zstd/examples/streaming_compression_thread_pool.c +180 -0
- hdiffpatch/_c_src/zstd/examples/streaming_decompression.c +100 -0
- hdiffpatch/_c_src/zstd/examples/streaming_memory_usage.c +137 -0
- hdiffpatch/_c_src/zstd/lib/.gitignore +3 -0
- hdiffpatch/_c_src/zstd/lib/BUCK +232 -0
- hdiffpatch/_c_src/zstd/lib/Makefile +389 -0
- hdiffpatch/_c_src/zstd/lib/README.md +248 -0
- hdiffpatch/_c_src/zstd/lib/common/allocations.h +55 -0
- hdiffpatch/_c_src/zstd/lib/common/bits.h +205 -0
- hdiffpatch/_c_src/zstd/lib/common/bitstream.h +454 -0
- hdiffpatch/_c_src/zstd/lib/common/compiler.h +464 -0
- hdiffpatch/_c_src/zstd/lib/common/cpu.h +249 -0
- hdiffpatch/_c_src/zstd/lib/common/debug.c +30 -0
- hdiffpatch/_c_src/zstd/lib/common/debug.h +107 -0
- hdiffpatch/_c_src/zstd/lib/common/entropy_common.c +340 -0
- hdiffpatch/_c_src/zstd/lib/common/error_private.c +64 -0
- hdiffpatch/_c_src/zstd/lib/common/error_private.h +158 -0
- hdiffpatch/_c_src/zstd/lib/common/fse.h +625 -0
- hdiffpatch/_c_src/zstd/lib/common/fse_decompress.c +315 -0
- hdiffpatch/_c_src/zstd/lib/common/huf.h +277 -0
- hdiffpatch/_c_src/zstd/lib/common/mem.h +422 -0
- hdiffpatch/_c_src/zstd/lib/common/pool.c +371 -0
- hdiffpatch/_c_src/zstd/lib/common/pool.h +81 -0
- hdiffpatch/_c_src/zstd/lib/common/portability_macros.h +171 -0
- hdiffpatch/_c_src/zstd/lib/common/threading.c +182 -0
- hdiffpatch/_c_src/zstd/lib/common/threading.h +142 -0
- hdiffpatch/_c_src/zstd/lib/common/xxhash.c +18 -0
- hdiffpatch/_c_src/zstd/lib/common/xxhash.h +7094 -0
- hdiffpatch/_c_src/zstd/lib/common/zstd_common.c +48 -0
- hdiffpatch/_c_src/zstd/lib/common/zstd_deps.h +123 -0
- hdiffpatch/_c_src/zstd/lib/common/zstd_internal.h +324 -0
- hdiffpatch/_c_src/zstd/lib/common/zstd_trace.h +156 -0
- hdiffpatch/_c_src/zstd/lib/compress/clevels.h +134 -0
- hdiffpatch/_c_src/zstd/lib/compress/fse_compress.c +625 -0
- hdiffpatch/_c_src/zstd/lib/compress/hist.c +191 -0
- hdiffpatch/_c_src/zstd/lib/compress/hist.h +82 -0
- hdiffpatch/_c_src/zstd/lib/compress/huf_compress.c +1464 -0
- hdiffpatch/_c_src/zstd/lib/compress/zstd_compress.c +7942 -0
- hdiffpatch/_c_src/zstd/lib/compress/zstd_compress_internal.h +1640 -0
- hdiffpatch/_c_src/zstd/lib/compress/zstd_compress_literals.c +235 -0
- hdiffpatch/_c_src/zstd/lib/compress/zstd_compress_literals.h +39 -0
- hdiffpatch/_c_src/zstd/lib/compress/zstd_compress_sequences.c +442 -0
- hdiffpatch/_c_src/zstd/lib/compress/zstd_compress_sequences.h +55 -0
- hdiffpatch/_c_src/zstd/lib/compress/zstd_compress_superblock.c +688 -0
- hdiffpatch/_c_src/zstd/lib/compress/zstd_compress_superblock.h +32 -0
- hdiffpatch/_c_src/zstd/lib/compress/zstd_cwksp.h +765 -0
- hdiffpatch/_c_src/zstd/lib/compress/zstd_double_fast.c +778 -0
- hdiffpatch/_c_src/zstd/lib/compress/zstd_double_fast.h +42 -0
- hdiffpatch/_c_src/zstd/lib/compress/zstd_fast.c +985 -0
- hdiffpatch/_c_src/zstd/lib/compress/zstd_fast.h +30 -0
- hdiffpatch/_c_src/zstd/lib/compress/zstd_lazy.c +2199 -0
- hdiffpatch/_c_src/zstd/lib/compress/zstd_lazy.h +193 -0
- hdiffpatch/_c_src/zstd/lib/compress/zstd_ldm.c +745 -0
- hdiffpatch/_c_src/zstd/lib/compress/zstd_ldm.h +109 -0
- hdiffpatch/_c_src/zstd/lib/compress/zstd_ldm_geartab.h +106 -0
- hdiffpatch/_c_src/zstd/lib/compress/zstd_opt.c +1580 -0
- hdiffpatch/_c_src/zstd/lib/compress/zstd_opt.h +72 -0
- hdiffpatch/_c_src/zstd/lib/compress/zstd_preSplit.c +238 -0
- hdiffpatch/_c_src/zstd/lib/compress/zstd_preSplit.h +33 -0
- hdiffpatch/_c_src/zstd/lib/compress/zstdmt_compress.c +1923 -0
- hdiffpatch/_c_src/zstd/lib/compress/zstdmt_compress.h +102 -0
- hdiffpatch/_c_src/zstd/lib/decompress/huf_decompress.c +1944 -0
- hdiffpatch/_c_src/zstd/lib/decompress/huf_decompress_amd64.S +602 -0
- hdiffpatch/_c_src/zstd/lib/decompress/zstd_ddict.c +244 -0
- hdiffpatch/_c_src/zstd/lib/decompress/zstd_ddict.h +44 -0
- hdiffpatch/_c_src/zstd/lib/decompress/zstd_decompress.c +2410 -0
- hdiffpatch/_c_src/zstd/lib/decompress/zstd_decompress_block.c +2209 -0
- hdiffpatch/_c_src/zstd/lib/decompress/zstd_decompress_block.h +73 -0
- hdiffpatch/_c_src/zstd/lib/decompress/zstd_decompress_internal.h +240 -0
- hdiffpatch/_c_src/zstd/lib/deprecated/zbuff.h +214 -0
- hdiffpatch/_c_src/zstd/lib/deprecated/zbuff_common.c +26 -0
- hdiffpatch/_c_src/zstd/lib/deprecated/zbuff_compress.c +167 -0
- hdiffpatch/_c_src/zstd/lib/deprecated/zbuff_decompress.c +77 -0
- hdiffpatch/_c_src/zstd/lib/dictBuilder/cover.c +1302 -0
- hdiffpatch/_c_src/zstd/lib/dictBuilder/cover.h +152 -0
- hdiffpatch/_c_src/zstd/lib/dictBuilder/divsufsort.c +1913 -0
- hdiffpatch/_c_src/zstd/lib/dictBuilder/divsufsort.h +57 -0
- hdiffpatch/_c_src/zstd/lib/dictBuilder/fastcover.c +766 -0
- hdiffpatch/_c_src/zstd/lib/dictBuilder/zdict.c +1133 -0
- hdiffpatch/_c_src/zstd/lib/dll/example/Makefile +48 -0
- hdiffpatch/_c_src/zstd/lib/dll/example/README.md +63 -0
- hdiffpatch/_c_src/zstd/lib/dll/example/build_package.bat +20 -0
- hdiffpatch/_c_src/zstd/lib/dll/example/fullbench-dll.sln +25 -0
- hdiffpatch/_c_src/zstd/lib/dll/example/fullbench-dll.vcxproj +181 -0
- hdiffpatch/_c_src/zstd/lib/legacy/zstd_legacy.h +452 -0
- hdiffpatch/_c_src/zstd/lib/legacy/zstd_v01.c +2127 -0
- hdiffpatch/_c_src/zstd/lib/legacy/zstd_v01.h +94 -0
- hdiffpatch/_c_src/zstd/lib/legacy/zstd_v02.c +3465 -0
- hdiffpatch/_c_src/zstd/lib/legacy/zstd_v02.h +93 -0
- hdiffpatch/_c_src/zstd/lib/legacy/zstd_v03.c +3105 -0
- hdiffpatch/_c_src/zstd/lib/legacy/zstd_v03.h +93 -0
- hdiffpatch/_c_src/zstd/lib/legacy/zstd_v04.c +3598 -0
- hdiffpatch/_c_src/zstd/lib/legacy/zstd_v04.h +142 -0
- hdiffpatch/_c_src/zstd/lib/legacy/zstd_v05.c +4005 -0
- hdiffpatch/_c_src/zstd/lib/legacy/zstd_v05.h +162 -0
- hdiffpatch/_c_src/zstd/lib/legacy/zstd_v06.c +4110 -0
- hdiffpatch/_c_src/zstd/lib/legacy/zstd_v06.h +172 -0
- hdiffpatch/_c_src/zstd/lib/legacy/zstd_v07.c +4490 -0
- hdiffpatch/_c_src/zstd/lib/legacy/zstd_v07.h +187 -0
- hdiffpatch/_c_src/zstd/lib/libzstd.mk +235 -0
- hdiffpatch/_c_src/zstd/lib/libzstd.pc.in +16 -0
- hdiffpatch/_c_src/zstd/lib/module.modulemap +35 -0
- hdiffpatch/_c_src/zstd/lib/zdict.h +481 -0
- hdiffpatch/_c_src/zstd/lib/zstd.h +3206 -0
- hdiffpatch/_c_src/zstd/lib/zstd_errors.h +107 -0
- hdiffpatch/_c_src/zstd/programs/.gitignore +41 -0
- hdiffpatch/_c_src/zstd/programs/BUCK +44 -0
- hdiffpatch/_c_src/zstd/programs/Makefile +445 -0
- hdiffpatch/_c_src/zstd/programs/README.md +344 -0
- hdiffpatch/_c_src/zstd/programs/benchfn.c +256 -0
- hdiffpatch/_c_src/zstd/programs/benchfn.h +173 -0
- hdiffpatch/_c_src/zstd/programs/benchzstd.c +1281 -0
- hdiffpatch/_c_src/zstd/programs/benchzstd.h +191 -0
- hdiffpatch/_c_src/zstd/programs/datagen.c +186 -0
- hdiffpatch/_c_src/zstd/programs/datagen.h +38 -0
- hdiffpatch/_c_src/zstd/programs/dibio.c +440 -0
- hdiffpatch/_c_src/zstd/programs/dibio.h +39 -0
- hdiffpatch/_c_src/zstd/programs/fileio.c +3464 -0
- hdiffpatch/_c_src/zstd/programs/fileio.h +171 -0
- hdiffpatch/_c_src/zstd/programs/fileio_asyncio.c +663 -0
- hdiffpatch/_c_src/zstd/programs/fileio_asyncio.h +195 -0
- hdiffpatch/_c_src/zstd/programs/fileio_common.h +121 -0
- hdiffpatch/_c_src/zstd/programs/fileio_types.h +86 -0
- hdiffpatch/_c_src/zstd/programs/lorem.c +285 -0
- hdiffpatch/_c_src/zstd/programs/lorem.h +32 -0
- hdiffpatch/_c_src/zstd/programs/platform.h +217 -0
- hdiffpatch/_c_src/zstd/programs/timefn.c +168 -0
- hdiffpatch/_c_src/zstd/programs/timefn.h +59 -0
- hdiffpatch/_c_src/zstd/programs/util.c +1643 -0
- hdiffpatch/_c_src/zstd/programs/util.h +362 -0
- hdiffpatch/_c_src/zstd/programs/windres/verrsrc.h +17 -0
- hdiffpatch/_c_src/zstd/programs/windres/zstd.rc +51 -0
- hdiffpatch/_c_src/zstd/programs/windres/zstd32.res +0 -0
- hdiffpatch/_c_src/zstd/programs/windres/zstd64.res +0 -0
- hdiffpatch/_c_src/zstd/programs/zstd.1 +392 -0
- hdiffpatch/_c_src/zstd/programs/zstd.1.md +714 -0
- hdiffpatch/_c_src/zstd/programs/zstdcli.c +1658 -0
- hdiffpatch/_c_src/zstd/programs/zstdcli_trace.c +172 -0
- hdiffpatch/_c_src/zstd/programs/zstdcli_trace.h +24 -0
- hdiffpatch/_c_src/zstd/programs/zstdgrep +134 -0
- hdiffpatch/_c_src/zstd/programs/zstdgrep.1 +26 -0
- hdiffpatch/_c_src/zstd/programs/zstdgrep.1.md +30 -0
- hdiffpatch/_c_src/zstd/programs/zstdless +8 -0
- hdiffpatch/_c_src/zstd/programs/zstdless.1 +14 -0
- hdiffpatch/_c_src/zstd/programs/zstdless.1.md +16 -0
- hdiffpatch/_c_src/zstd/tests/.gitignore +72 -0
- hdiffpatch/_c_src/zstd/tests/DEPRECATED-test-zstd-speed.py +378 -0
- hdiffpatch/_c_src/zstd/tests/Makefile +481 -0
- hdiffpatch/_c_src/zstd/tests/README.md +184 -0
- hdiffpatch/_c_src/zstd/tests/automated_benchmarking.py +326 -0
- hdiffpatch/_c_src/zstd/tests/bigdict.c +133 -0
- hdiffpatch/_c_src/zstd/tests/checkTag.c +65 -0
- hdiffpatch/_c_src/zstd/tests/check_size.py +31 -0
- hdiffpatch/_c_src/zstd/tests/cli-tests/.gitignore +6 -0
- hdiffpatch/_c_src/zstd/tests/cli-tests/README.md +258 -0
- hdiffpatch/_c_src/zstd/tests/cli-tests/basic/args.sh +10 -0
- hdiffpatch/_c_src/zstd/tests/cli-tests/basic/args.sh.exit +1 -0
- hdiffpatch/_c_src/zstd/tests/cli-tests/basic/args.sh.stderr.glob +28 -0
- hdiffpatch/_c_src/zstd/tests/cli-tests/basic/help.sh +10 -0
- hdiffpatch/_c_src/zstd/tests/cli-tests/basic/help.sh.stdout.glob +34 -0
- hdiffpatch/_c_src/zstd/tests/cli-tests/basic/memlimit.sh +40 -0
- hdiffpatch/_c_src/zstd/tests/cli-tests/basic/memlimit.sh.stderr.exact +13 -0
- hdiffpatch/_c_src/zstd/tests/cli-tests/basic/memlimit.sh.stdout.exact +13 -0
- hdiffpatch/_c_src/zstd/tests/cli-tests/basic/output_dir.sh +7 -0
- hdiffpatch/_c_src/zstd/tests/cli-tests/basic/output_dir.sh.stderr.exact +2 -0
- hdiffpatch/_c_src/zstd/tests/cli-tests/basic/output_dir.sh.stdout.exact +2 -0
- hdiffpatch/_c_src/zstd/tests/cli-tests/basic/version.sh +6 -0
- hdiffpatch/_c_src/zstd/tests/cli-tests/basic/version.sh.stdout.glob +2 -0
- hdiffpatch/_c_src/zstd/tests/cli-tests/bin/cmp_size +44 -0
- hdiffpatch/_c_src/zstd/tests/cli-tests/bin/datagen +3 -0
- hdiffpatch/_c_src/zstd/tests/cli-tests/bin/die +4 -0
- hdiffpatch/_c_src/zstd/tests/cli-tests/bin/println +2 -0
- hdiffpatch/_c_src/zstd/tests/cli-tests/bin/zstd +9 -0
- hdiffpatch/_c_src/zstd/tests/cli-tests/bin/zstdgrep +2 -0
- hdiffpatch/_c_src/zstd/tests/cli-tests/bin/zstdless +2 -0
- hdiffpatch/_c_src/zstd/tests/cli-tests/cltools/setup +6 -0
- hdiffpatch/_c_src/zstd/tests/cli-tests/cltools/zstdgrep.sh +8 -0
- hdiffpatch/_c_src/zstd/tests/cli-tests/cltools/zstdgrep.sh.exit +1 -0
- hdiffpatch/_c_src/zstd/tests/cli-tests/cltools/zstdgrep.sh.stderr.exact +1 -0
- hdiffpatch/_c_src/zstd/tests/cli-tests/cltools/zstdgrep.sh.stdout.glob +4 -0
- hdiffpatch/_c_src/zstd/tests/cli-tests/cltools/zstdless.sh +10 -0
- hdiffpatch/_c_src/zstd/tests/cli-tests/cltools/zstdless.sh.stderr.exact +2 -0
- hdiffpatch/_c_src/zstd/tests/cli-tests/cltools/zstdless.sh.stdout.glob +5 -0
- hdiffpatch/_c_src/zstd/tests/cli-tests/common/format.sh +19 -0
- hdiffpatch/_c_src/zstd/tests/cli-tests/common/mtime.sh +13 -0
- hdiffpatch/_c_src/zstd/tests/cli-tests/common/permissions.sh +18 -0
- hdiffpatch/_c_src/zstd/tests/cli-tests/common/platform.sh +36 -0
- hdiffpatch/_c_src/zstd/tests/cli-tests/compression/adapt.sh +14 -0
- hdiffpatch/_c_src/zstd/tests/cli-tests/compression/basic.sh +36 -0
- hdiffpatch/_c_src/zstd/tests/cli-tests/compression/compress-literals.sh +10 -0
- hdiffpatch/_c_src/zstd/tests/cli-tests/compression/format.sh +16 -0
- hdiffpatch/_c_src/zstd/tests/cli-tests/compression/golden.sh +16 -0
- hdiffpatch/_c_src/zstd/tests/cli-tests/compression/gzip-compat.sh +17 -0
- hdiffpatch/_c_src/zstd/tests/cli-tests/compression/levels.sh +75 -0
- hdiffpatch/_c_src/zstd/tests/cli-tests/compression/levels.sh.stderr.exact +80 -0
- hdiffpatch/_c_src/zstd/tests/cli-tests/compression/long-distance-matcher.sh +7 -0
- hdiffpatch/_c_src/zstd/tests/cli-tests/compression/multi-threaded.sh +15 -0
- hdiffpatch/_c_src/zstd/tests/cli-tests/compression/multi-threaded.sh.stderr.exact +11 -0
- hdiffpatch/_c_src/zstd/tests/cli-tests/compression/multiple-files.sh +21 -0
- hdiffpatch/_c_src/zstd/tests/cli-tests/compression/multiple-files.sh.stdout.exact +12 -0
- hdiffpatch/_c_src/zstd/tests/cli-tests/compression/row-match-finder.sh +7 -0
- hdiffpatch/_c_src/zstd/tests/cli-tests/compression/setup +7 -0
- hdiffpatch/_c_src/zstd/tests/cli-tests/compression/stream-size.sh +7 -0
- hdiffpatch/_c_src/zstd/tests/cli-tests/compression/verbose-wlog.sh +11 -0
- hdiffpatch/_c_src/zstd/tests/cli-tests/compression/verbose-wlog.sh.stderr.glob +5 -0
- hdiffpatch/_c_src/zstd/tests/cli-tests/compression/verbose-wlog.sh.stdout.glob +5 -0
- hdiffpatch/_c_src/zstd/tests/cli-tests/compression/window-resize.sh +9 -0
- hdiffpatch/_c_src/zstd/tests/cli-tests/compression/window-resize.sh.stderr.ignore +0 -0
- hdiffpatch/_c_src/zstd/tests/cli-tests/compression/window-resize.sh.stdout.glob +3 -0
- hdiffpatch/_c_src/zstd/tests/cli-tests/decompression/detectErrors.sh +11 -0
- hdiffpatch/_c_src/zstd/tests/cli-tests/decompression/golden.sh +7 -0
- hdiffpatch/_c_src/zstd/tests/cli-tests/decompression/pass-through.sh +57 -0
- hdiffpatch/_c_src/zstd/tests/cli-tests/decompression/pass-through.sh.stderr.exact +11 -0
- hdiffpatch/_c_src/zstd/tests/cli-tests/decompression/pass-through.sh.stdout.exact +25 -0
- hdiffpatch/_c_src/zstd/tests/cli-tests/dict-builder/empty-input.sh +9 -0
- hdiffpatch/_c_src/zstd/tests/cli-tests/dict-builder/empty-input.sh.stderr.exact +1 -0
- hdiffpatch/_c_src/zstd/tests/cli-tests/dict-builder/no-inputs.sh +3 -0
- hdiffpatch/_c_src/zstd/tests/cli-tests/dict-builder/no-inputs.sh.exit +1 -0
- hdiffpatch/_c_src/zstd/tests/cli-tests/dict-builder/no-inputs.sh.stderr.exact +5 -0
- hdiffpatch/_c_src/zstd/tests/cli-tests/dictionaries/dictionary-mismatch.sh +29 -0
- hdiffpatch/_c_src/zstd/tests/cli-tests/dictionaries/dictionary-mismatch.sh.stderr.exact +7 -0
- hdiffpatch/_c_src/zstd/tests/cli-tests/dictionaries/golden.sh +9 -0
- hdiffpatch/_c_src/zstd/tests/cli-tests/dictionaries/setup +6 -0
- hdiffpatch/_c_src/zstd/tests/cli-tests/dictionaries/setup_once +24 -0
- hdiffpatch/_c_src/zstd/tests/cli-tests/file-handling/directory-mirror.sh +49 -0
- hdiffpatch/_c_src/zstd/tests/cli-tests/file-handling/directory-mirror.sh.stderr.exact +0 -0
- hdiffpatch/_c_src/zstd/tests/cli-tests/file-handling/directory-mirror.sh.stdout.exact +0 -0
- hdiffpatch/_c_src/zstd/tests/cli-tests/file-stat/compress-file-to-dir-without-write-perm.sh +12 -0
- hdiffpatch/_c_src/zstd/tests/cli-tests/file-stat/compress-file-to-dir-without-write-perm.sh.stderr.exact +26 -0
- hdiffpatch/_c_src/zstd/tests/cli-tests/file-stat/compress-file-to-file.sh +9 -0
- hdiffpatch/_c_src/zstd/tests/cli-tests/file-stat/compress-file-to-file.sh.stderr.exact +42 -0
- hdiffpatch/_c_src/zstd/tests/cli-tests/file-stat/compress-file-to-stdout.sh +8 -0
- hdiffpatch/_c_src/zstd/tests/cli-tests/file-stat/compress-file-to-stdout.sh.stderr.exact +24 -0
- hdiffpatch/_c_src/zstd/tests/cli-tests/file-stat/compress-stdin-to-file.sh +8 -0
- hdiffpatch/_c_src/zstd/tests/cli-tests/file-stat/compress-stdin-to-file.sh.stderr.exact +24 -0
- hdiffpatch/_c_src/zstd/tests/cli-tests/file-stat/compress-stdin-to-stdout.sh +8 -0
- hdiffpatch/_c_src/zstd/tests/cli-tests/file-stat/compress-stdin-to-stdout.sh.stderr.exact +18 -0
- hdiffpatch/_c_src/zstd/tests/cli-tests/file-stat/decompress-file-to-file.sh +8 -0
- hdiffpatch/_c_src/zstd/tests/cli-tests/file-stat/decompress-file-to-file.sh.stderr.exact +38 -0
- hdiffpatch/_c_src/zstd/tests/cli-tests/file-stat/decompress-file-to-stdout.sh +7 -0
- hdiffpatch/_c_src/zstd/tests/cli-tests/file-stat/decompress-file-to-stdout.sh.stderr.exact +18 -0
- hdiffpatch/_c_src/zstd/tests/cli-tests/file-stat/decompress-stdin-to-file.sh +7 -0
- hdiffpatch/_c_src/zstd/tests/cli-tests/file-stat/decompress-stdin-to-file.sh.stderr.exact +20 -0
- hdiffpatch/_c_src/zstd/tests/cli-tests/file-stat/decompress-stdin-to-stdout.sh +7 -0
- hdiffpatch/_c_src/zstd/tests/cli-tests/file-stat/decompress-stdin-to-stdout.sh.stderr.exact +14 -0
- hdiffpatch/_c_src/zstd/tests/cli-tests/progress/no-progress.sh +46 -0
- hdiffpatch/_c_src/zstd/tests/cli-tests/progress/no-progress.sh.stderr.glob +96 -0
- hdiffpatch/_c_src/zstd/tests/cli-tests/progress/progress.sh +41 -0
- hdiffpatch/_c_src/zstd/tests/cli-tests/progress/progress.sh.stderr.glob +62 -0
- hdiffpatch/_c_src/zstd/tests/cli-tests/run.py +731 -0
- hdiffpatch/_c_src/zstd/tests/cli-tests/zstd-symlinks/setup +6 -0
- hdiffpatch/_c_src/zstd/tests/cli-tests/zstd-symlinks/zstdcat.sh +12 -0
- hdiffpatch/_c_src/zstd/tests/cli-tests/zstd-symlinks/zstdcat.sh.stdout.exact +8 -0
- hdiffpatch/_c_src/zstd/tests/datagencli.c +149 -0
- hdiffpatch/_c_src/zstd/tests/decodecorpus.c +1998 -0
- hdiffpatch/_c_src/zstd/tests/dict-files/zero-weight-dict +0 -0
- hdiffpatch/_c_src/zstd/tests/external_matchfinder.c +140 -0
- hdiffpatch/_c_src/zstd/tests/external_matchfinder.h +39 -0
- hdiffpatch/_c_src/zstd/tests/fullbench.c +1209 -0
- hdiffpatch/_c_src/zstd/tests/fuzz/.gitignore +31 -0
- hdiffpatch/_c_src/zstd/tests/fuzz/Makefile +278 -0
- hdiffpatch/_c_src/zstd/tests/fuzz/README.md +161 -0
- hdiffpatch/_c_src/zstd/tests/fuzz/block_decompress.c +53 -0
- hdiffpatch/_c_src/zstd/tests/fuzz/block_round_trip.c +103 -0
- hdiffpatch/_c_src/zstd/tests/fuzz/decompress_cross_format.c +130 -0
- hdiffpatch/_c_src/zstd/tests/fuzz/decompress_dstSize_tooSmall.c +74 -0
- hdiffpatch/_c_src/zstd/tests/fuzz/dictionary_decompress.c +77 -0
- hdiffpatch/_c_src/zstd/tests/fuzz/dictionary_loader.c +106 -0
- hdiffpatch/_c_src/zstd/tests/fuzz/dictionary_round_trip.c +155 -0
- hdiffpatch/_c_src/zstd/tests/fuzz/dictionary_stream_round_trip.c +209 -0
- hdiffpatch/_c_src/zstd/tests/fuzz/fse_read_ncount.c +100 -0
- hdiffpatch/_c_src/zstd/tests/fuzz/fuzz.h +57 -0
- hdiffpatch/_c_src/zstd/tests/fuzz/fuzz.py +910 -0
- hdiffpatch/_c_src/zstd/tests/fuzz/fuzz_data_producer.c +95 -0
- hdiffpatch/_c_src/zstd/tests/fuzz/fuzz_data_producer.h +66 -0
- hdiffpatch/_c_src/zstd/tests/fuzz/fuzz_helpers.c +48 -0
- hdiffpatch/_c_src/zstd/tests/fuzz/fuzz_helpers.h +81 -0
- hdiffpatch/_c_src/zstd/tests/fuzz/fuzz_third_party_seq_prod.h +116 -0
- hdiffpatch/_c_src/zstd/tests/fuzz/generate_sequences.c +88 -0
- hdiffpatch/_c_src/zstd/tests/fuzz/huf_decompress.c +68 -0
- hdiffpatch/_c_src/zstd/tests/fuzz/huf_round_trip.c +137 -0
- hdiffpatch/_c_src/zstd/tests/fuzz/raw_dictionary_round_trip.c +119 -0
- hdiffpatch/_c_src/zstd/tests/fuzz/regression_driver.c +90 -0
- hdiffpatch/_c_src/zstd/tests/fuzz/seekable_roundtrip.c +88 -0
- hdiffpatch/_c_src/zstd/tests/fuzz/seq_prod_fuzz_example/Makefile +16 -0
- hdiffpatch/_c_src/zstd/tests/fuzz/seq_prod_fuzz_example/README.md +12 -0
- hdiffpatch/_c_src/zstd/tests/fuzz/seq_prod_fuzz_example/example_seq_prod.c +52 -0
- hdiffpatch/_c_src/zstd/tests/fuzz/sequence_compression_api.c +452 -0
- hdiffpatch/_c_src/zstd/tests/fuzz/simple_compress.c +60 -0
- hdiffpatch/_c_src/zstd/tests/fuzz/simple_decompress.c +59 -0
- hdiffpatch/_c_src/zstd/tests/fuzz/simple_round_trip.c +182 -0
- hdiffpatch/_c_src/zstd/tests/fuzz/stream_decompress.c +119 -0
- hdiffpatch/_c_src/zstd/tests/fuzz/stream_round_trip.c +218 -0
- hdiffpatch/_c_src/zstd/tests/fuzz/zstd_frame_info.c +43 -0
- hdiffpatch/_c_src/zstd/tests/fuzz/zstd_helpers.c +208 -0
- hdiffpatch/_c_src/zstd/tests/fuzz/zstd_helpers.h +56 -0
- hdiffpatch/_c_src/zstd/tests/fuzzer.c +5147 -0
- hdiffpatch/_c_src/zstd/tests/golden-compression/PR-3517-block-splitter-corruption-test +1 -0
- hdiffpatch/_c_src/zstd/tests/golden-compression/http +1 -0
- hdiffpatch/_c_src/zstd/tests/golden-compression/huffman-compressed-larger +0 -0
- hdiffpatch/_c_src/zstd/tests/golden-compression/large-literal-and-match-lengths +0 -0
- hdiffpatch/_c_src/zstd/tests/golden-decompression/block-128k.zst +0 -0
- hdiffpatch/_c_src/zstd/tests/golden-decompression/empty-block.zst +0 -0
- hdiffpatch/_c_src/zstd/tests/golden-decompression/rle-first-block.zst +0 -0
- hdiffpatch/_c_src/zstd/tests/golden-decompression/zeroSeq_2B.zst +0 -0
- hdiffpatch/_c_src/zstd/tests/golden-decompression-errors/.gitignore +1 -0
- hdiffpatch/_c_src/zstd/tests/golden-decompression-errors/off0.bin.zst +0 -0
- hdiffpatch/_c_src/zstd/tests/golden-decompression-errors/truncated_huff_state.zst +0 -0
- hdiffpatch/_c_src/zstd/tests/golden-decompression-errors/zeroSeq_extraneous.zst +0 -0
- hdiffpatch/_c_src/zstd/tests/golden-dictionaries/http-dict-missing-symbols +0 -0
- hdiffpatch/_c_src/zstd/tests/gzip/Makefile +45 -0
- hdiffpatch/_c_src/zstd/tests/gzip/gzip-env.sh +46 -0
- hdiffpatch/_c_src/zstd/tests/gzip/helin-segv.sh +31 -0
- hdiffpatch/_c_src/zstd/tests/gzip/help-version.sh +270 -0
- hdiffpatch/_c_src/zstd/tests/gzip/hufts-segv.gz +0 -0
- hdiffpatch/_c_src/zstd/tests/gzip/hufts.sh +34 -0
- hdiffpatch/_c_src/zstd/tests/gzip/init.cfg +5 -0
- hdiffpatch/_c_src/zstd/tests/gzip/init.sh +616 -0
- hdiffpatch/_c_src/zstd/tests/gzip/keep.sh +51 -0
- hdiffpatch/_c_src/zstd/tests/gzip/list.sh +31 -0
- hdiffpatch/_c_src/zstd/tests/gzip/memcpy-abuse.sh +34 -0
- hdiffpatch/_c_src/zstd/tests/gzip/mixed.sh +68 -0
- hdiffpatch/_c_src/zstd/tests/gzip/null-suffix-clobber.sh +35 -0
- hdiffpatch/_c_src/zstd/tests/gzip/stdin.sh +31 -0
- hdiffpatch/_c_src/zstd/tests/gzip/test-driver.sh +150 -0
- hdiffpatch/_c_src/zstd/tests/gzip/trailing-nul.sh +37 -0
- hdiffpatch/_c_src/zstd/tests/gzip/unpack-invalid.sh +36 -0
- hdiffpatch/_c_src/zstd/tests/gzip/z-suffix.sh +30 -0
- hdiffpatch/_c_src/zstd/tests/gzip/zdiff.sh +48 -0
- hdiffpatch/_c_src/zstd/tests/gzip/zgrep-context.sh +47 -0
- hdiffpatch/_c_src/zstd/tests/gzip/zgrep-f.sh +43 -0
- hdiffpatch/_c_src/zstd/tests/gzip/zgrep-signal.sh +64 -0
- hdiffpatch/_c_src/zstd/tests/gzip/znew-k.sh +40 -0
- hdiffpatch/_c_src/zstd/tests/invalidDictionaries.c +61 -0
- hdiffpatch/_c_src/zstd/tests/largeDictionary.c +128 -0
- hdiffpatch/_c_src/zstd/tests/legacy.c +260 -0
- hdiffpatch/_c_src/zstd/tests/libzstd_builds.sh +104 -0
- hdiffpatch/_c_src/zstd/tests/longmatch.c +102 -0
- hdiffpatch/_c_src/zstd/tests/loremOut.c +50 -0
- hdiffpatch/_c_src/zstd/tests/loremOut.h +15 -0
- hdiffpatch/_c_src/zstd/tests/paramgrill.c +2965 -0
- hdiffpatch/_c_src/zstd/tests/playTests.sh +1925 -0
- hdiffpatch/_c_src/zstd/tests/poolTests.c +271 -0
- hdiffpatch/_c_src/zstd/tests/rateLimiter.py +41 -0
- hdiffpatch/_c_src/zstd/tests/regression/.gitignore +4 -0
- hdiffpatch/_c_src/zstd/tests/regression/Makefile +60 -0
- hdiffpatch/_c_src/zstd/tests/regression/README.md +28 -0
- hdiffpatch/_c_src/zstd/tests/regression/config.c +404 -0
- hdiffpatch/_c_src/zstd/tests/regression/config.h +91 -0
- hdiffpatch/_c_src/zstd/tests/regression/data.c +631 -0
- hdiffpatch/_c_src/zstd/tests/regression/data.h +121 -0
- hdiffpatch/_c_src/zstd/tests/regression/levels.h +59 -0
- hdiffpatch/_c_src/zstd/tests/regression/method.c +701 -0
- hdiffpatch/_c_src/zstd/tests/regression/method.h +65 -0
- hdiffpatch/_c_src/zstd/tests/regression/result.c +30 -0
- hdiffpatch/_c_src/zstd/tests/regression/result.h +103 -0
- hdiffpatch/_c_src/zstd/tests/regression/results.csv +1480 -0
- hdiffpatch/_c_src/zstd/tests/regression/test.c +362 -0
- hdiffpatch/_c_src/zstd/tests/roundTripCrash.c +241 -0
- hdiffpatch/_c_src/zstd/tests/seqgen.c +260 -0
- hdiffpatch/_c_src/zstd/tests/seqgen.h +58 -0
- hdiffpatch/_c_src/zstd/tests/test-license.py +156 -0
- hdiffpatch/_c_src/zstd/tests/test-variants.sh +115 -0
- hdiffpatch/_c_src/zstd/tests/test-zstd-versions.py +308 -0
- hdiffpatch/_c_src/zstd/tests/zstreamtest.c +3467 -0
- hdiffpatch/_c_src/zstd/zlibWrapper/.gitignore +28 -0
- hdiffpatch/_c_src/zstd/zlibWrapper/BUCK +22 -0
- hdiffpatch/_c_src/zstd/zlibWrapper/Makefile +120 -0
- hdiffpatch/_c_src/zstd/zlibWrapper/README.md +163 -0
- hdiffpatch/_c_src/zstd/zlibWrapper/examples/example.c +598 -0
- hdiffpatch/_c_src/zstd/zlibWrapper/examples/example_original.c +599 -0
- hdiffpatch/_c_src/zstd/zlibWrapper/examples/fitblk.c +254 -0
- hdiffpatch/_c_src/zstd/zlibWrapper/examples/fitblk_original.c +233 -0
- hdiffpatch/_c_src/zstd/zlibWrapper/examples/minigzip.c +605 -0
- hdiffpatch/_c_src/zstd/zlibWrapper/examples/zwrapbench.c +1018 -0
- hdiffpatch/_c_src/zstd/zlibWrapper/gzclose.c +26 -0
- hdiffpatch/_c_src/zstd/zlibWrapper/gzcompatibility.h +68 -0
- hdiffpatch/_c_src/zstd/zlibWrapper/gzguts.h +229 -0
- hdiffpatch/_c_src/zstd/zlibWrapper/gzlib.c +587 -0
- hdiffpatch/_c_src/zstd/zlibWrapper/gzread.c +637 -0
- hdiffpatch/_c_src/zstd/zlibWrapper/gzwrite.c +632 -0
- hdiffpatch/_c_src/zstd/zlibWrapper/zstd_zlibwrapper.c +1200 -0
- hdiffpatch/_c_src/zstd/zlibWrapper/zstd_zlibwrapper.h +91 -0
- hdiffpatch/_lzma_config.py +215 -0
- hdiffpatch/_tamp_config.py +85 -0
- hdiffpatch/_zlib_config.py +177 -0
- hdiffpatch/_zstd_config.py +113 -0
- hdiffpatch/py.typed +0 -0
- hdiffpatch-1.0.0.dist-info/LICENSE +201 -0
- hdiffpatch-1.0.0.dist-info/METADATA +376 -0
- hdiffpatch-1.0.0.dist-info/RECORD +2254 -0
- hdiffpatch-1.0.0.dist-info/WHEEL +4 -0
- hdiffpatch-1.0.0.dist-info/entry_points.txt +0 -0
|
@@ -0,0 +1,2965 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under both the BSD-style license (found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree) and the GPLv2 (found
|
|
7
|
+
* in the COPYING file in the root directory of this source tree).
|
|
8
|
+
* You may select, at your option, one of the above-listed licenses.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
/*-************************************
|
|
13
|
+
* Dependencies
|
|
14
|
+
**************************************/
|
|
15
|
+
#include "util.h" /* Ensure platform.h is compiled first; also : compiler options, UTIL_GetFileSize */
|
|
16
|
+
#include <stdlib.h> /* malloc */
|
|
17
|
+
#include <stdio.h> /* fprintf, fopen, ftello64 */
|
|
18
|
+
#include <string.h> /* strcmp */
|
|
19
|
+
#include <math.h> /* log */
|
|
20
|
+
#include <assert.h>
|
|
21
|
+
|
|
22
|
+
#include "timefn.h" /* SEC_TO_MICRO, UTIL_time_t, UTIL_clockSpanMicro, UTIL_clockSpanNano, UTIL_getTime */
|
|
23
|
+
#include "mem.h"
|
|
24
|
+
#define ZSTD_STATIC_LINKING_ONLY /* ZSTD_parameters, ZSTD_estimateCCtxSize */
|
|
25
|
+
#include "zstd.h"
|
|
26
|
+
#include "datagen.h"
|
|
27
|
+
#include "xxhash.h"
|
|
28
|
+
#include "benchfn.h"
|
|
29
|
+
#include "benchzstd.h"
|
|
30
|
+
#include "zstd_errors.h"
|
|
31
|
+
#include "zstd_internal.h" /* should not be needed */
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
/*-************************************
|
|
35
|
+
* Constants
|
|
36
|
+
**************************************/
|
|
37
|
+
#define PROGRAM_DESCRIPTION "ZSTD parameters tester"
|
|
38
|
+
#define AUTHOR "Yann Collet"
|
|
39
|
+
#define WELCOME_MESSAGE "*** %s %s %i-bits, by %s ***\n", PROGRAM_DESCRIPTION, ZSTD_VERSION_STRING, (int)(sizeof(void*)*8), AUTHOR
|
|
40
|
+
|
|
41
|
+
#define TIMELOOP_NANOSEC (1*1000000000ULL) /* 1 second */
|
|
42
|
+
#define NB_LEVELS_TRACKED 22 /* ensured being >= ZSTD_maxCLevel() in BMK_init_level_constraints() */
|
|
43
|
+
|
|
44
|
+
static const size_t maxMemory = (sizeof(size_t)==4) ? (2 GB - 64 MB) : (size_t)(1ULL << ((sizeof(size_t)*8)-31));
|
|
45
|
+
|
|
46
|
+
#define COMPRESSIBILITY_DEFAULT 0.50
|
|
47
|
+
|
|
48
|
+
static const U64 g_maxVariationTime = 60 * SEC_TO_MICRO;
|
|
49
|
+
static const int g_maxNbVariations = 64;
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
/*-************************************
|
|
53
|
+
* Macros
|
|
54
|
+
**************************************/
|
|
55
|
+
#define DISPLAY(...) fprintf(stderr, __VA_ARGS__)
|
|
56
|
+
#define DISPLAYLEVEL(n, ...) if(g_displayLevel >= n) { fprintf(stderr, __VA_ARGS__); }
|
|
57
|
+
#define DEBUGOUTPUT(...) { if (DEBUG) DISPLAY(__VA_ARGS__); }
|
|
58
|
+
|
|
59
|
+
#define TIMED 0
|
|
60
|
+
#ifndef DEBUG
|
|
61
|
+
# define DEBUG 0
|
|
62
|
+
#endif
|
|
63
|
+
|
|
64
|
+
#undef MIN
|
|
65
|
+
#undef MAX
|
|
66
|
+
#define MIN(a,b) ( (a) < (b) ? (a) : (b) )
|
|
67
|
+
#define MAX(a,b) ( (a) > (b) ? (a) : (b) )
|
|
68
|
+
#define CUSTOM_LEVEL 99
|
|
69
|
+
#define BASE_CLEVEL 1
|
|
70
|
+
|
|
71
|
+
#define FADT_MIN 0
|
|
72
|
+
#define FADT_MAX ((U32)-1)
|
|
73
|
+
|
|
74
|
+
#define WLOG_RANGE (ZSTD_WINDOWLOG_MAX - ZSTD_WINDOWLOG_MIN + 1)
|
|
75
|
+
#define CLOG_RANGE (ZSTD_CHAINLOG_MAX - ZSTD_CHAINLOG_MIN + 1)
|
|
76
|
+
#define HLOG_RANGE (ZSTD_HASHLOG_MAX - ZSTD_HASHLOG_MIN + 1)
|
|
77
|
+
#define SLOG_RANGE (ZSTD_SEARCHLOG_MAX - ZSTD_SEARCHLOG_MIN + 1)
|
|
78
|
+
#define MML_RANGE (ZSTD_MINMATCH_MAX - ZSTD_MINMATCH_MIN + 1)
|
|
79
|
+
#define TLEN_RANGE 17
|
|
80
|
+
#define STRT_RANGE (ZSTD_STRATEGY_MAX - ZSTD_STRATEGY_MIN + 1)
|
|
81
|
+
#define FADT_RANGE 3
|
|
82
|
+
|
|
83
|
+
#define CHECKTIME(r) { if(BMK_timeSpan_s(g_time) > g_timeLimit_s) { DEBUGOUTPUT("Time Limit Reached\n"); return r; } }
|
|
84
|
+
#define CHECKTIMEGT(ret, val, _gototag) { if(BMK_timeSpan_s(g_time) > g_timeLimit_s) { DEBUGOUTPUT("Time Limit Reached\n"); ret = val; goto _gototag; } }
|
|
85
|
+
|
|
86
|
+
#define PARAM_UNSET ((U32)-2) /* can't be -1 b/c fadt uses -1 */
|
|
87
|
+
|
|
88
|
+
static const char* g_stratName[ZSTD_STRATEGY_MAX+1] = {
|
|
89
|
+
"(none) ", "ZSTD_fast ", "ZSTD_dfast ",
|
|
90
|
+
"ZSTD_greedy ", "ZSTD_lazy ", "ZSTD_lazy2 ",
|
|
91
|
+
"ZSTD_btlazy2 ", "ZSTD_btopt ", "ZSTD_btultra ",
|
|
92
|
+
"ZSTD_btultra2"};
|
|
93
|
+
|
|
94
|
+
static const U32 tlen_table[TLEN_RANGE] = { 0, 1, 2, 4, 6, 8, 12, 16, 24, 32, 48, 64, 96, 128, 256, 512, 999 };
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
/*-************************************
|
|
98
|
+
* Setup for Adding new params
|
|
99
|
+
**************************************/
|
|
100
|
+
|
|
101
|
+
/* indices for each of the variables */
|
|
102
|
+
typedef enum {
|
|
103
|
+
wlog_ind = 0,
|
|
104
|
+
clog_ind = 1,
|
|
105
|
+
hlog_ind = 2,
|
|
106
|
+
slog_ind = 3,
|
|
107
|
+
mml_ind = 4,
|
|
108
|
+
tlen_ind = 5,
|
|
109
|
+
strt_ind = 6,
|
|
110
|
+
fadt_ind = 7, /* forceAttachDict */
|
|
111
|
+
NUM_PARAMS = 8
|
|
112
|
+
} varInds_t;
|
|
113
|
+
|
|
114
|
+
typedef struct {
|
|
115
|
+
U32 vals[NUM_PARAMS];
|
|
116
|
+
} paramValues_t;
|
|
117
|
+
|
|
118
|
+
/* minimum value of parameters */
|
|
119
|
+
static const U32 mintable[NUM_PARAMS] =
|
|
120
|
+
{ ZSTD_WINDOWLOG_MIN, ZSTD_CHAINLOG_MIN, ZSTD_HASHLOG_MIN, ZSTD_SEARCHLOG_MIN, ZSTD_MINMATCH_MIN, ZSTD_TARGETLENGTH_MIN, ZSTD_STRATEGY_MIN, FADT_MIN };
|
|
121
|
+
|
|
122
|
+
/* maximum value of parameters */
|
|
123
|
+
static const U32 maxtable[NUM_PARAMS] =
|
|
124
|
+
{ ZSTD_WINDOWLOG_MAX, ZSTD_CHAINLOG_MAX, ZSTD_HASHLOG_MAX, ZSTD_SEARCHLOG_MAX, ZSTD_MINMATCH_MAX, ZSTD_TARGETLENGTH_MAX, ZSTD_STRATEGY_MAX, FADT_MAX };
|
|
125
|
+
|
|
126
|
+
/* # of values parameters can take on */
|
|
127
|
+
static const U32 rangetable[NUM_PARAMS] =
|
|
128
|
+
{ WLOG_RANGE, CLOG_RANGE, HLOG_RANGE, SLOG_RANGE, MML_RANGE, TLEN_RANGE, STRT_RANGE, FADT_RANGE };
|
|
129
|
+
|
|
130
|
+
/* ZSTD_cctxSetParameter() index to set */
|
|
131
|
+
static const ZSTD_cParameter cctxSetParamTable[NUM_PARAMS] =
|
|
132
|
+
{ ZSTD_c_windowLog, ZSTD_c_chainLog, ZSTD_c_hashLog, ZSTD_c_searchLog, ZSTD_c_minMatch, ZSTD_c_targetLength, ZSTD_c_strategy, ZSTD_c_forceAttachDict };
|
|
133
|
+
|
|
134
|
+
/* names of parameters */
|
|
135
|
+
static const char* g_paramNames[NUM_PARAMS] =
|
|
136
|
+
{ "windowLog", "chainLog", "hashLog","searchLog", "minMatch", "targetLength", "strategy", "forceAttachDict" };
|
|
137
|
+
|
|
138
|
+
/* shortened names of parameters */
|
|
139
|
+
static const char* g_shortParamNames[NUM_PARAMS] =
|
|
140
|
+
{ "wlog", "clog", "hlog", "slog", "mml", "tlen", "strat", "fadt" };
|
|
141
|
+
|
|
142
|
+
/* maps value from { 0 to rangetable[param] - 1 } to valid paramvalues */
|
|
143
|
+
static U32 rangeMap(varInds_t param, int ind)
|
|
144
|
+
{
|
|
145
|
+
U32 const uind = (U32)MAX(MIN(ind, (int)rangetable[param] - 1), 0);
|
|
146
|
+
switch(param) {
|
|
147
|
+
case wlog_ind: /* using default: triggers -Wswitch-enum */
|
|
148
|
+
case clog_ind:
|
|
149
|
+
case hlog_ind:
|
|
150
|
+
case slog_ind:
|
|
151
|
+
case mml_ind:
|
|
152
|
+
case strt_ind:
|
|
153
|
+
return mintable[param] + uind;
|
|
154
|
+
case tlen_ind:
|
|
155
|
+
return tlen_table[uind];
|
|
156
|
+
case fadt_ind: /* 0, 1, 2 -> -1, 0, 1 */
|
|
157
|
+
return uind - 1;
|
|
158
|
+
case NUM_PARAMS:
|
|
159
|
+
default:;
|
|
160
|
+
}
|
|
161
|
+
DISPLAY("Error, not a valid param\n ");
|
|
162
|
+
assert(0);
|
|
163
|
+
return (U32)-1;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
/* inverse of rangeMap */
|
|
167
|
+
static int invRangeMap(varInds_t param, U32 value)
|
|
168
|
+
{
|
|
169
|
+
value = MIN(MAX(mintable[param], value), maxtable[param]);
|
|
170
|
+
switch(param) {
|
|
171
|
+
case wlog_ind:
|
|
172
|
+
case clog_ind:
|
|
173
|
+
case hlog_ind:
|
|
174
|
+
case slog_ind:
|
|
175
|
+
case mml_ind:
|
|
176
|
+
case strt_ind:
|
|
177
|
+
return (int)(value - mintable[param]);
|
|
178
|
+
case tlen_ind: /* bin search */
|
|
179
|
+
{
|
|
180
|
+
int lo = 0;
|
|
181
|
+
int hi = TLEN_RANGE;
|
|
182
|
+
while(lo < hi) {
|
|
183
|
+
int mid = (lo + hi) / 2;
|
|
184
|
+
if(tlen_table[mid] < value) {
|
|
185
|
+
lo = mid + 1;
|
|
186
|
+
} if(tlen_table[mid] == value) {
|
|
187
|
+
return mid;
|
|
188
|
+
} else {
|
|
189
|
+
hi = mid;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
return lo;
|
|
193
|
+
}
|
|
194
|
+
case fadt_ind:
|
|
195
|
+
return (int)value + 1;
|
|
196
|
+
case NUM_PARAMS:
|
|
197
|
+
default:;
|
|
198
|
+
}
|
|
199
|
+
DISPLAY("Error, not a valid param\n ");
|
|
200
|
+
assert(0);
|
|
201
|
+
return -2;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
/* display of params */
|
|
205
|
+
static void displayParamVal(FILE* f, varInds_t param, unsigned value, int width)
|
|
206
|
+
{
|
|
207
|
+
switch(param) {
|
|
208
|
+
case wlog_ind:
|
|
209
|
+
case clog_ind:
|
|
210
|
+
case hlog_ind:
|
|
211
|
+
case slog_ind:
|
|
212
|
+
case mml_ind:
|
|
213
|
+
case tlen_ind:
|
|
214
|
+
if(width) {
|
|
215
|
+
fprintf(f, "%*u", width, value);
|
|
216
|
+
} else {
|
|
217
|
+
fprintf(f, "%u", value);
|
|
218
|
+
}
|
|
219
|
+
break;
|
|
220
|
+
case strt_ind:
|
|
221
|
+
if(width) {
|
|
222
|
+
fprintf(f, "%*s", width, g_stratName[value]);
|
|
223
|
+
} else {
|
|
224
|
+
fprintf(f, "%s", g_stratName[value]);
|
|
225
|
+
}
|
|
226
|
+
break;
|
|
227
|
+
case fadt_ind: /* force attach dict */
|
|
228
|
+
if(width) {
|
|
229
|
+
fprintf(f, "%*d", width, (int)value);
|
|
230
|
+
} else {
|
|
231
|
+
fprintf(f, "%d", (int)value);
|
|
232
|
+
}
|
|
233
|
+
break;
|
|
234
|
+
case NUM_PARAMS:
|
|
235
|
+
default:
|
|
236
|
+
DISPLAY("Error, not a valid param\n ");
|
|
237
|
+
assert(0);
|
|
238
|
+
break;
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
/*-************************************
|
|
244
|
+
* Benchmark Parameters/Global Variables
|
|
245
|
+
**************************************/
|
|
246
|
+
|
|
247
|
+
/* General Utility */
|
|
248
|
+
static U32 g_timeLimit_s = 99999; /* about 27 hours */
|
|
249
|
+
static UTIL_time_t g_time; /* to be used to compare solution finding speeds to compare to original */
|
|
250
|
+
static U32 g_blockSize = 0;
|
|
251
|
+
static U32 g_rand = 1;
|
|
252
|
+
|
|
253
|
+
/* Display */
|
|
254
|
+
static int g_displayLevel = 3;
|
|
255
|
+
static BYTE g_silenceParams[NUM_PARAMS]; /* can selectively silence some params when displaying them */
|
|
256
|
+
|
|
257
|
+
/* Mode Selection */
|
|
258
|
+
static U32 g_singleRun = 0;
|
|
259
|
+
static U32 g_optimizer = 0;
|
|
260
|
+
static int g_optmode = 0;
|
|
261
|
+
|
|
262
|
+
/* For cLevel Table generation */
|
|
263
|
+
static U32 g_target = 0;
|
|
264
|
+
static U32 g_noSeed = 0;
|
|
265
|
+
|
|
266
|
+
/* For optimizer */
|
|
267
|
+
static paramValues_t g_params; /* Initialized at the beginning of main w/ emptyParams() function */
|
|
268
|
+
static double g_ratioMultiplier = 5.;
|
|
269
|
+
static U32 g_strictness = PARAM_UNSET; /* range 1 - 100, measure of how strict */
|
|
270
|
+
static BMK_benchResult_t g_lvltarget;
|
|
271
|
+
|
|
272
|
+
typedef enum {
|
|
273
|
+
directMap,
|
|
274
|
+
xxhashMap,
|
|
275
|
+
noMemo
|
|
276
|
+
} memoTableType_t;
|
|
277
|
+
|
|
278
|
+
typedef struct {
|
|
279
|
+
memoTableType_t tableType;
|
|
280
|
+
BYTE* table;
|
|
281
|
+
size_t tableLen;
|
|
282
|
+
varInds_t varArray[NUM_PARAMS];
|
|
283
|
+
size_t varLen;
|
|
284
|
+
} memoTable_t;
|
|
285
|
+
|
|
286
|
+
typedef struct {
|
|
287
|
+
BMK_benchResult_t result;
|
|
288
|
+
paramValues_t params;
|
|
289
|
+
} winnerInfo_t;
|
|
290
|
+
|
|
291
|
+
typedef struct {
|
|
292
|
+
U32 cSpeed; /* bytes / sec */
|
|
293
|
+
U32 dSpeed;
|
|
294
|
+
U32 cMem; /* bytes */
|
|
295
|
+
} constraint_t;
|
|
296
|
+
|
|
297
|
+
typedef struct winner_ll_node winner_ll_node;
|
|
298
|
+
struct winner_ll_node {
|
|
299
|
+
winnerInfo_t res;
|
|
300
|
+
winner_ll_node* next;
|
|
301
|
+
};
|
|
302
|
+
|
|
303
|
+
static winner_ll_node* g_winners; /* linked list sorted ascending by cSize & cSpeed */
|
|
304
|
+
|
|
305
|
+
/*
|
|
306
|
+
* Additional Global Variables (Defined Above Use)
|
|
307
|
+
* g_level_constraint
|
|
308
|
+
* g_alreadyTested
|
|
309
|
+
* g_maxTries
|
|
310
|
+
* g_clockGranularity
|
|
311
|
+
*/
|
|
312
|
+
|
|
313
|
+
|
|
314
|
+
/*-*******************************************************
|
|
315
|
+
* General Util Functions
|
|
316
|
+
*********************************************************/
|
|
317
|
+
|
|
318
|
+
/* nullified useless params, to ensure count stats */
|
|
319
|
+
/* cleans up params for memoizing / display */
|
|
320
|
+
static paramValues_t sanitizeParams(paramValues_t params)
|
|
321
|
+
{
|
|
322
|
+
if (params.vals[strt_ind] == ZSTD_fast)
|
|
323
|
+
params.vals[clog_ind] = 0, params.vals[slog_ind] = 0;
|
|
324
|
+
if (params.vals[strt_ind] == ZSTD_dfast)
|
|
325
|
+
params.vals[slog_ind] = 0;
|
|
326
|
+
if ( (params.vals[strt_ind] < ZSTD_btopt) && (params.vals[strt_ind] != ZSTD_fast) )
|
|
327
|
+
params.vals[tlen_ind] = 0;
|
|
328
|
+
|
|
329
|
+
return params;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
static ZSTD_compressionParameters pvalsToCParams(paramValues_t p)
|
|
333
|
+
{
|
|
334
|
+
ZSTD_compressionParameters c;
|
|
335
|
+
memset(&c, 0, sizeof(ZSTD_compressionParameters));
|
|
336
|
+
c.windowLog = p.vals[wlog_ind];
|
|
337
|
+
c.chainLog = p.vals[clog_ind];
|
|
338
|
+
c.hashLog = p.vals[hlog_ind];
|
|
339
|
+
c.searchLog = p.vals[slog_ind];
|
|
340
|
+
c.minMatch = p.vals[mml_ind];
|
|
341
|
+
c.targetLength = p.vals[tlen_ind];
|
|
342
|
+
c.strategy = p.vals[strt_ind];
|
|
343
|
+
/* no forceAttachDict */
|
|
344
|
+
return c;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
static paramValues_t cParamsToPVals(ZSTD_compressionParameters c)
|
|
348
|
+
{
|
|
349
|
+
paramValues_t p;
|
|
350
|
+
varInds_t i;
|
|
351
|
+
p.vals[wlog_ind] = c.windowLog;
|
|
352
|
+
p.vals[clog_ind] = c.chainLog;
|
|
353
|
+
p.vals[hlog_ind] = c.hashLog;
|
|
354
|
+
p.vals[slog_ind] = c.searchLog;
|
|
355
|
+
p.vals[mml_ind] = c.minMatch;
|
|
356
|
+
p.vals[tlen_ind] = c.targetLength;
|
|
357
|
+
p.vals[strt_ind] = c.strategy;
|
|
358
|
+
|
|
359
|
+
/* set all other params to their minimum value */
|
|
360
|
+
for (i = strt_ind + 1; i < NUM_PARAMS; i++) {
|
|
361
|
+
p.vals[i] = mintable[i];
|
|
362
|
+
}
|
|
363
|
+
return p;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
/* equivalent of ZSTD_adjustCParams for paramValues_t */
|
|
367
|
+
static paramValues_t
|
|
368
|
+
adjustParams(paramValues_t p, const size_t maxBlockSize, const size_t dictSize)
|
|
369
|
+
{
|
|
370
|
+
paramValues_t ot = p;
|
|
371
|
+
varInds_t i;
|
|
372
|
+
p = cParamsToPVals(ZSTD_adjustCParams(pvalsToCParams(p), maxBlockSize, dictSize));
|
|
373
|
+
if (!dictSize) { p.vals[fadt_ind] = 0; }
|
|
374
|
+
/* retain value of all other parameters */
|
|
375
|
+
for(i = strt_ind + 1; i < NUM_PARAMS; i++) {
|
|
376
|
+
p.vals[i] = ot.vals[i];
|
|
377
|
+
}
|
|
378
|
+
return p;
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
static size_t BMK_findMaxMem(U64 requiredMem)
|
|
382
|
+
{
|
|
383
|
+
size_t const step = 64 MB;
|
|
384
|
+
void* testmem = NULL;
|
|
385
|
+
|
|
386
|
+
requiredMem = (((requiredMem >> 26) + 1) << 26);
|
|
387
|
+
if (requiredMem > maxMemory) requiredMem = maxMemory;
|
|
388
|
+
|
|
389
|
+
requiredMem += 2 * step;
|
|
390
|
+
while (!testmem && requiredMem > 0) {
|
|
391
|
+
testmem = malloc ((size_t)requiredMem);
|
|
392
|
+
requiredMem -= step;
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
free (testmem);
|
|
396
|
+
return (size_t) requiredMem;
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
/* accuracy in seconds only, span can be multiple years */
|
|
400
|
+
static U32 BMK_timeSpan_s(const UTIL_time_t tStart)
|
|
401
|
+
{
|
|
402
|
+
return (U32)(UTIL_clockSpanMicro(tStart) / 1000000ULL);
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
static U32 FUZ_rotl32(U32 x, U32 r)
|
|
406
|
+
{
|
|
407
|
+
return ((x << r) | (x >> (32 - r)));
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
static U32 FUZ_rand(U32* src)
|
|
411
|
+
{
|
|
412
|
+
const U32 prime1 = 2654435761U;
|
|
413
|
+
const U32 prime2 = 2246822519U;
|
|
414
|
+
U32 rand32 = *src;
|
|
415
|
+
rand32 *= prime1;
|
|
416
|
+
rand32 += prime2;
|
|
417
|
+
rand32 = FUZ_rotl32(rand32, 13);
|
|
418
|
+
*src = rand32;
|
|
419
|
+
return rand32 >> 5;
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
#define BOUNDCHECK(val,min,max) { \
|
|
423
|
+
if (((val)<(min)) | ((val)>(max))) { \
|
|
424
|
+
DISPLAY("INVALID PARAMETER CONSTRAINTS\n"); \
|
|
425
|
+
return 0; \
|
|
426
|
+
} }
|
|
427
|
+
|
|
428
|
+
static int paramValid(const paramValues_t paramTarget)
|
|
429
|
+
{
|
|
430
|
+
U32 i;
|
|
431
|
+
for(i = 0; i < NUM_PARAMS; i++) {
|
|
432
|
+
BOUNDCHECK(paramTarget.vals[i], mintable[i], maxtable[i]);
|
|
433
|
+
}
|
|
434
|
+
return 1;
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
/* cParamUnsetMin() :
|
|
438
|
+
* if any parameter in paramTarget is not yet set,
|
|
439
|
+
* it will receive its corresponding minimal value.
|
|
440
|
+
* This function never fails */
|
|
441
|
+
static paramValues_t cParamUnsetMin(paramValues_t paramTarget)
|
|
442
|
+
{
|
|
443
|
+
varInds_t vi;
|
|
444
|
+
for (vi = 0; vi < NUM_PARAMS; vi++) {
|
|
445
|
+
if (paramTarget.vals[vi] == PARAM_UNSET) {
|
|
446
|
+
paramTarget.vals[vi] = mintable[vi];
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
return paramTarget;
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
static paramValues_t emptyParams(void)
|
|
453
|
+
{
|
|
454
|
+
U32 i;
|
|
455
|
+
paramValues_t p;
|
|
456
|
+
for(i = 0; i < NUM_PARAMS; i++) {
|
|
457
|
+
p.vals[i] = PARAM_UNSET;
|
|
458
|
+
}
|
|
459
|
+
return p;
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
static winnerInfo_t initWinnerInfo(const paramValues_t p)
|
|
463
|
+
{
|
|
464
|
+
winnerInfo_t w1;
|
|
465
|
+
w1.result.cSpeed = 0;
|
|
466
|
+
w1.result.dSpeed = 0;
|
|
467
|
+
w1.result.cMem = (size_t)-1;
|
|
468
|
+
w1.result.cSize = (size_t)-1;
|
|
469
|
+
w1.params = p;
|
|
470
|
+
return w1;
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
static paramValues_t
|
|
474
|
+
overwriteParams(paramValues_t base, const paramValues_t mask)
|
|
475
|
+
{
|
|
476
|
+
U32 i;
|
|
477
|
+
for(i = 0; i < NUM_PARAMS; i++) {
|
|
478
|
+
if(mask.vals[i] != PARAM_UNSET) {
|
|
479
|
+
base.vals[i] = mask.vals[i];
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
return base;
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
static void
|
|
486
|
+
paramVaryOnce(const varInds_t paramIndex, const int amt, paramValues_t* ptr)
|
|
487
|
+
{
|
|
488
|
+
ptr->vals[paramIndex] = rangeMap(paramIndex,
|
|
489
|
+
invRangeMap(paramIndex, ptr->vals[paramIndex]) + amt);
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
/* varies ptr by nbChanges respecting varyParams*/
|
|
493
|
+
static void
|
|
494
|
+
paramVariation(paramValues_t* ptr, memoTable_t* mtAll, const U32 nbChanges)
|
|
495
|
+
{
|
|
496
|
+
paramValues_t p;
|
|
497
|
+
int validated = 0;
|
|
498
|
+
while (!validated) {
|
|
499
|
+
U32 i;
|
|
500
|
+
p = *ptr;
|
|
501
|
+
for (i = 0 ; i < nbChanges ; i++) {
|
|
502
|
+
const U32 changeID = (U32)FUZ_rand(&g_rand) % (mtAll[p.vals[strt_ind]].varLen << 1);
|
|
503
|
+
paramVaryOnce(mtAll[p.vals[strt_ind]].varArray[changeID >> 1],
|
|
504
|
+
(int)((changeID & 1) << 1) - 1,
|
|
505
|
+
&p);
|
|
506
|
+
}
|
|
507
|
+
validated = paramValid(p);
|
|
508
|
+
}
|
|
509
|
+
*ptr = p;
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
/* Completely random parameter selection */
|
|
513
|
+
static paramValues_t randomParams(void)
|
|
514
|
+
{
|
|
515
|
+
varInds_t v; paramValues_t p;
|
|
516
|
+
for(v = 0; v < NUM_PARAMS; v++) {
|
|
517
|
+
p.vals[v] = rangeMap(v, (int)(FUZ_rand(&g_rand) % rangetable[v]));
|
|
518
|
+
}
|
|
519
|
+
return p;
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
static U64 g_clockGranularity = 100000000ULL;
|
|
523
|
+
|
|
524
|
+
static void init_clockGranularity(void)
|
|
525
|
+
{
|
|
526
|
+
UTIL_time_t const clockStart = UTIL_getTime();
|
|
527
|
+
U64 el1 = 0, el2 = 0;
|
|
528
|
+
int i = 0;
|
|
529
|
+
do {
|
|
530
|
+
el1 = el2;
|
|
531
|
+
el2 = UTIL_clockSpanNano(clockStart);
|
|
532
|
+
if(el1 < el2) {
|
|
533
|
+
U64 iv = el2 - el1;
|
|
534
|
+
if(g_clockGranularity > iv) {
|
|
535
|
+
g_clockGranularity = iv;
|
|
536
|
+
i = 0;
|
|
537
|
+
} else {
|
|
538
|
+
i++;
|
|
539
|
+
}
|
|
540
|
+
}
|
|
541
|
+
} while(i < 10);
|
|
542
|
+
DEBUGOUTPUT("Granularity: %llu\n", (unsigned long long)g_clockGranularity);
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
/*-************************************
|
|
546
|
+
* Optimizer Util Functions
|
|
547
|
+
**************************************/
|
|
548
|
+
|
|
549
|
+
/* checks results are feasible */
|
|
550
|
+
static int feasible(const BMK_benchResult_t results, const constraint_t target) {
|
|
551
|
+
return (results.cSpeed >= target.cSpeed)
|
|
552
|
+
&& (results.dSpeed >= target.dSpeed)
|
|
553
|
+
&& (results.cMem <= target.cMem)
|
|
554
|
+
&& (!g_optmode || results.cSize <= g_lvltarget.cSize);
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
/* hill climbing value for part 1 */
|
|
558
|
+
/* Scoring here is a linear reward for all set constraints normalized between 0 and 1
|
|
559
|
+
* (with 0 at 0 and 1 being fully fulfilling the constraint), summed with a logarithmic
|
|
560
|
+
* bonus to exceeding the constraint value. We also give linear ratio for compression ratio.
|
|
561
|
+
* The constant factors are experimental.
|
|
562
|
+
*/
|
|
563
|
+
static double
|
|
564
|
+
resultScore(const BMK_benchResult_t res, const size_t srcSize, const constraint_t target)
|
|
565
|
+
{
|
|
566
|
+
double cs = 0., ds = 0., rt, cm = 0.;
|
|
567
|
+
const double r1 = 1, r2 = 0.1, rtr = 0.5;
|
|
568
|
+
double ret;
|
|
569
|
+
if(target.cSpeed) { cs = (double)res.cSpeed / (double)target.cSpeed; }
|
|
570
|
+
if(target.dSpeed) { ds = (double)res.dSpeed / (double)target.dSpeed; }
|
|
571
|
+
if(target.cMem != (U32)-1) { cm = (double)target.cMem / (double)res.cMem; }
|
|
572
|
+
rt = ((double)srcSize / (double)res.cSize);
|
|
573
|
+
|
|
574
|
+
ret = (MIN(1, cs) + MIN(1, ds) + MIN(1, cm))*r1 + rt * rtr +
|
|
575
|
+
(MAX(0, log(cs))+ MAX(0, log(ds))+ MAX(0, log(cm))) * r2;
|
|
576
|
+
|
|
577
|
+
return ret;
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
/* calculates normalized squared euclidean distance of result1 if it is in the first quadrant relative to lvlRes */
|
|
581
|
+
static double
|
|
582
|
+
resultDistLvl(const BMK_benchResult_t result1, const BMK_benchResult_t lvlRes)
|
|
583
|
+
{
|
|
584
|
+
double normalizedCSpeedGain1 = ((double)result1.cSpeed / (double)lvlRes.cSpeed) - 1;
|
|
585
|
+
double normalizedRatioGain1 = ((double)lvlRes.cSize / (double)result1.cSize) - 1;
|
|
586
|
+
if(normalizedRatioGain1 < 0 || normalizedCSpeedGain1 < 0) {
|
|
587
|
+
return 0.0;
|
|
588
|
+
}
|
|
589
|
+
return normalizedRatioGain1 * g_ratioMultiplier + normalizedCSpeedGain1;
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
/* return true if r2 strictly better than r1 */
|
|
593
|
+
static int
|
|
594
|
+
compareResultLT(const BMK_benchResult_t result1, const BMK_benchResult_t result2, const constraint_t target, size_t srcSize)
|
|
595
|
+
{
|
|
596
|
+
if(feasible(result1, target) && feasible(result2, target)) {
|
|
597
|
+
if(g_optmode) {
|
|
598
|
+
return resultDistLvl(result1, g_lvltarget) < resultDistLvl(result2, g_lvltarget);
|
|
599
|
+
} else {
|
|
600
|
+
return (result1.cSize > result2.cSize)
|
|
601
|
+
|| (result1.cSize == result2.cSize && result2.cSpeed > result1.cSpeed)
|
|
602
|
+
|| (result1.cSize == result2.cSize && result2.cSpeed == result1.cSpeed && result2.dSpeed > result1.dSpeed);
|
|
603
|
+
}
|
|
604
|
+
}
|
|
605
|
+
return feasible(result2, target)
|
|
606
|
+
|| (!feasible(result1, target)
|
|
607
|
+
&& (resultScore(result1, srcSize, target) < resultScore(result2, srcSize, target)));
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
static constraint_t relaxTarget(constraint_t target) {
|
|
611
|
+
target.cMem = (U32)-1;
|
|
612
|
+
target.cSpeed = (target.cSpeed * g_strictness) / 100;
|
|
613
|
+
target.dSpeed = (target.dSpeed * g_strictness) / 100;
|
|
614
|
+
return target;
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
static void optimizerAdjustInput(paramValues_t* pc, const size_t maxBlockSize)
|
|
618
|
+
{
|
|
619
|
+
varInds_t v;
|
|
620
|
+
for(v = 0; v < NUM_PARAMS; v++) {
|
|
621
|
+
if(pc->vals[v] != PARAM_UNSET) {
|
|
622
|
+
U32 newval = MIN(MAX(pc->vals[v], mintable[v]), maxtable[v]);
|
|
623
|
+
if(newval != pc->vals[v]) {
|
|
624
|
+
pc->vals[v] = newval;
|
|
625
|
+
DISPLAY("Warning: parameter %s not in valid range, adjusting to ",
|
|
626
|
+
g_paramNames[v]);
|
|
627
|
+
displayParamVal(stderr, v, newval, 0); DISPLAY("\n");
|
|
628
|
+
}
|
|
629
|
+
}
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
if(pc->vals[wlog_ind] != PARAM_UNSET) {
|
|
633
|
+
|
|
634
|
+
U32 sshb = maxBlockSize > 1 ? ZSTD_highbit32((U32)(maxBlockSize-1)) + 1 : 1;
|
|
635
|
+
/* edge case of highBit not working for 0 */
|
|
636
|
+
|
|
637
|
+
if(maxBlockSize < (1ULL << 31) && sshb + 1 < pc->vals[wlog_ind]) {
|
|
638
|
+
U32 adjust = MAX(mintable[wlog_ind], sshb);
|
|
639
|
+
if(adjust != pc->vals[wlog_ind]) {
|
|
640
|
+
pc->vals[wlog_ind] = adjust;
|
|
641
|
+
DISPLAY("Warning: windowLog larger than src/block size, adjusted to %u\n",
|
|
642
|
+
(unsigned)pc->vals[wlog_ind]);
|
|
643
|
+
}
|
|
644
|
+
}
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
if(pc->vals[wlog_ind] != PARAM_UNSET && pc->vals[clog_ind] != PARAM_UNSET) {
|
|
648
|
+
U32 maxclog;
|
|
649
|
+
if(pc->vals[strt_ind] == PARAM_UNSET || pc->vals[strt_ind] >= (U32)ZSTD_btlazy2) {
|
|
650
|
+
maxclog = pc->vals[wlog_ind] + 1;
|
|
651
|
+
} else {
|
|
652
|
+
maxclog = pc->vals[wlog_ind];
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
if(pc->vals[clog_ind] > maxclog) {
|
|
656
|
+
pc->vals[clog_ind] = maxclog;
|
|
657
|
+
DISPLAY("Warning: chainlog too much larger than windowLog size, adjusted to %u\n",
|
|
658
|
+
(unsigned)pc->vals[clog_ind]);
|
|
659
|
+
}
|
|
660
|
+
}
|
|
661
|
+
|
|
662
|
+
if(pc->vals[wlog_ind] != PARAM_UNSET && pc->vals[hlog_ind] != PARAM_UNSET) {
|
|
663
|
+
if(pc->vals[wlog_ind] + 1 < pc->vals[hlog_ind]) {
|
|
664
|
+
pc->vals[hlog_ind] = pc->vals[wlog_ind] + 1;
|
|
665
|
+
DISPLAY("Warning: hashlog too much larger than windowLog size, adjusted to %u\n",
|
|
666
|
+
(unsigned)pc->vals[hlog_ind]);
|
|
667
|
+
}
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
if(pc->vals[slog_ind] != PARAM_UNSET && pc->vals[clog_ind] != PARAM_UNSET) {
|
|
671
|
+
if(pc->vals[slog_ind] > pc->vals[clog_ind]) {
|
|
672
|
+
pc->vals[clog_ind] = pc->vals[slog_ind];
|
|
673
|
+
DISPLAY("Warning: searchLog larger than chainLog, adjusted to %u\n",
|
|
674
|
+
(unsigned)pc->vals[slog_ind]);
|
|
675
|
+
}
|
|
676
|
+
}
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
static int
|
|
680
|
+
redundantParams(const paramValues_t paramValues, const constraint_t target, const size_t maxBlockSize)
|
|
681
|
+
{
|
|
682
|
+
return
|
|
683
|
+
(ZSTD_estimateCStreamSize_usingCParams(pvalsToCParams(paramValues)) > (size_t)target.cMem) /* Uses too much memory */
|
|
684
|
+
|| ((1ULL << (paramValues.vals[wlog_ind] - 1)) >= maxBlockSize && paramValues.vals[wlog_ind] != mintable[wlog_ind]) /* wlog too much bigger than src size */
|
|
685
|
+
|| (paramValues.vals[clog_ind] > (paramValues.vals[wlog_ind] + (paramValues.vals[strt_ind] > ZSTD_btlazy2))) /* chainLog larger than windowLog*/
|
|
686
|
+
|| (paramValues.vals[slog_ind] > paramValues.vals[clog_ind]) /* searchLog larger than chainLog */
|
|
687
|
+
|| (paramValues.vals[hlog_ind] > paramValues.vals[wlog_ind] + 1); /* hashLog larger than windowLog + 1 */
|
|
688
|
+
}
|
|
689
|
+
|
|
690
|
+
|
|
691
|
+
/*-************************************
|
|
692
|
+
* Display Functions
|
|
693
|
+
**************************************/
|
|
694
|
+
|
|
695
|
+
/* BMK_paramValues_into_commandLine() :
|
|
696
|
+
* transform a set of parameters paramValues_t
|
|
697
|
+
* into a command line compatible with `zstd` syntax
|
|
698
|
+
* and writes it into FILE* f.
|
|
699
|
+
* f must be already opened and writable */
|
|
700
|
+
static void
|
|
701
|
+
BMK_paramValues_into_commandLine(FILE* f, const paramValues_t params)
|
|
702
|
+
{
|
|
703
|
+
varInds_t v;
|
|
704
|
+
int first = 1;
|
|
705
|
+
fprintf(f,"--zstd=");
|
|
706
|
+
for (v = 0; v < NUM_PARAMS; v++) {
|
|
707
|
+
if (g_silenceParams[v]) { continue; }
|
|
708
|
+
if (!first) { fprintf(f, ","); }
|
|
709
|
+
fprintf(f,"%s=", g_paramNames[v]);
|
|
710
|
+
|
|
711
|
+
if (v == strt_ind) { fprintf(f,"%u", (unsigned)params.vals[v]); }
|
|
712
|
+
else { displayParamVal(f, v, params.vals[v], 0); }
|
|
713
|
+
first = 0;
|
|
714
|
+
}
|
|
715
|
+
fprintf(f, "\n");
|
|
716
|
+
}
|
|
717
|
+
|
|
718
|
+
|
|
719
|
+
/* comparison function: */
|
|
720
|
+
/* strictly better, strictly worse, equal, speed-side adv, size-side adv */
|
|
721
|
+
#define WORSE_RESULT 0
|
|
722
|
+
#define BETTER_RESULT 1
|
|
723
|
+
#define ERROR_RESULT 2
|
|
724
|
+
|
|
725
|
+
#define SPEED_RESULT 4
|
|
726
|
+
#define SIZE_RESULT 5
|
|
727
|
+
/* maybe have epsilon-eq to limit table size? */
|
|
728
|
+
static int
|
|
729
|
+
speedSizeCompare(const BMK_benchResult_t r1, const BMK_benchResult_t r2)
|
|
730
|
+
{
|
|
731
|
+
if(r1.cSpeed < r2.cSpeed) {
|
|
732
|
+
if(r1.cSize >= r2.cSize) {
|
|
733
|
+
return BETTER_RESULT;
|
|
734
|
+
}
|
|
735
|
+
return SPEED_RESULT; /* r2 is smaller but not faster. */
|
|
736
|
+
} else {
|
|
737
|
+
if(r1.cSize <= r2.cSize) {
|
|
738
|
+
return WORSE_RESULT;
|
|
739
|
+
}
|
|
740
|
+
return SIZE_RESULT; /* r2 is faster but not smaller */
|
|
741
|
+
}
|
|
742
|
+
}
|
|
743
|
+
|
|
744
|
+
/* 0 for insertion, 1 for no insert */
|
|
745
|
+
/* maintain invariant speedSizeCompare(n, n->next) = SPEED_RESULT */
|
|
746
|
+
static int
|
|
747
|
+
insertWinner(const winnerInfo_t w, const constraint_t targetConstraints)
|
|
748
|
+
{
|
|
749
|
+
BMK_benchResult_t r = w.result;
|
|
750
|
+
winner_ll_node* cur_node = g_winners;
|
|
751
|
+
/* first node to insert */
|
|
752
|
+
if(!feasible(r, targetConstraints)) {
|
|
753
|
+
return 1;
|
|
754
|
+
}
|
|
755
|
+
|
|
756
|
+
if(g_winners == NULL) {
|
|
757
|
+
winner_ll_node* first_node = malloc(sizeof(winner_ll_node));
|
|
758
|
+
if(first_node == NULL) {
|
|
759
|
+
return 1;
|
|
760
|
+
}
|
|
761
|
+
first_node->next = NULL;
|
|
762
|
+
first_node->res = w;
|
|
763
|
+
g_winners = first_node;
|
|
764
|
+
return 0;
|
|
765
|
+
}
|
|
766
|
+
|
|
767
|
+
while(cur_node->next != NULL) {
|
|
768
|
+
switch(speedSizeCompare(cur_node->res.result, r)) {
|
|
769
|
+
case WORSE_RESULT:
|
|
770
|
+
{
|
|
771
|
+
return 1; /* never insert if better */
|
|
772
|
+
}
|
|
773
|
+
case BETTER_RESULT:
|
|
774
|
+
{
|
|
775
|
+
winner_ll_node* tmp;
|
|
776
|
+
cur_node->res = cur_node->next->res;
|
|
777
|
+
tmp = cur_node->next;
|
|
778
|
+
cur_node->next = cur_node->next->next;
|
|
779
|
+
free(tmp);
|
|
780
|
+
break;
|
|
781
|
+
}
|
|
782
|
+
case SIZE_RESULT:
|
|
783
|
+
{
|
|
784
|
+
cur_node = cur_node->next;
|
|
785
|
+
break;
|
|
786
|
+
}
|
|
787
|
+
case SPEED_RESULT: /* insert after first size result, then return */
|
|
788
|
+
{
|
|
789
|
+
winner_ll_node* newnode = malloc(sizeof(winner_ll_node));
|
|
790
|
+
if(newnode == NULL) {
|
|
791
|
+
return 1;
|
|
792
|
+
}
|
|
793
|
+
newnode->res = cur_node->res;
|
|
794
|
+
cur_node->res = w;
|
|
795
|
+
newnode->next = cur_node->next;
|
|
796
|
+
cur_node->next = newnode;
|
|
797
|
+
return 0;
|
|
798
|
+
}
|
|
799
|
+
}
|
|
800
|
+
|
|
801
|
+
}
|
|
802
|
+
|
|
803
|
+
assert(cur_node->next == NULL);
|
|
804
|
+
switch(speedSizeCompare(cur_node->res.result, r)) {
|
|
805
|
+
case WORSE_RESULT:
|
|
806
|
+
{
|
|
807
|
+
return 1; /* never insert if better */
|
|
808
|
+
}
|
|
809
|
+
case BETTER_RESULT:
|
|
810
|
+
{
|
|
811
|
+
cur_node->res = w;
|
|
812
|
+
return 0;
|
|
813
|
+
}
|
|
814
|
+
case SIZE_RESULT:
|
|
815
|
+
{
|
|
816
|
+
winner_ll_node* newnode = malloc(sizeof(winner_ll_node));
|
|
817
|
+
if(newnode == NULL) {
|
|
818
|
+
return 1;
|
|
819
|
+
}
|
|
820
|
+
newnode->res = w;
|
|
821
|
+
newnode->next = NULL;
|
|
822
|
+
cur_node->next = newnode;
|
|
823
|
+
return 0;
|
|
824
|
+
}
|
|
825
|
+
case SPEED_RESULT: /* insert before first size result, then return */
|
|
826
|
+
{
|
|
827
|
+
winner_ll_node* newnode = malloc(sizeof(winner_ll_node));
|
|
828
|
+
if(newnode == NULL) {
|
|
829
|
+
return 1;
|
|
830
|
+
}
|
|
831
|
+
newnode->res = cur_node->res;
|
|
832
|
+
cur_node->res = w;
|
|
833
|
+
newnode->next = cur_node->next;
|
|
834
|
+
cur_node->next = newnode;
|
|
835
|
+
return 0;
|
|
836
|
+
}
|
|
837
|
+
default:
|
|
838
|
+
return 1;
|
|
839
|
+
}
|
|
840
|
+
}
|
|
841
|
+
|
|
842
|
+
static void
|
|
843
|
+
BMK_displayOneResult(FILE* f, winnerInfo_t res, const size_t srcSize)
|
|
844
|
+
{
|
|
845
|
+
varInds_t v;
|
|
846
|
+
int first = 1;
|
|
847
|
+
res.params = cParamUnsetMin(res.params);
|
|
848
|
+
fprintf(f, " {");
|
|
849
|
+
for (v = 0; v < NUM_PARAMS; v++) {
|
|
850
|
+
if (g_silenceParams[v]) { continue; }
|
|
851
|
+
if (!first) { fprintf(f, ","); }
|
|
852
|
+
displayParamVal(f, v, res.params.vals[v], 3);
|
|
853
|
+
first = 0;
|
|
854
|
+
}
|
|
855
|
+
|
|
856
|
+
{ double const ratio = res.result.cSize ?
|
|
857
|
+
(double)srcSize / (double)res.result.cSize : 0;
|
|
858
|
+
double const cSpeedMBps = (double)res.result.cSpeed / MB_UNIT;
|
|
859
|
+
double const dSpeedMBps = (double)res.result.dSpeed / MB_UNIT;
|
|
860
|
+
|
|
861
|
+
fprintf(f, " }, /* R:%5.3f at %5.1f MB/s - %5.1f MB/s */\n",
|
|
862
|
+
ratio, cSpeedMBps, dSpeedMBps);
|
|
863
|
+
}
|
|
864
|
+
}
|
|
865
|
+
|
|
866
|
+
/* Writes to f the results of a parameter benchmark */
|
|
867
|
+
/* when used with --optimize, will only print results better than previously discovered */
|
|
868
|
+
static void
|
|
869
|
+
BMK_printWinner(FILE* f, const int cLevel, const BMK_benchResult_t result, const paramValues_t params, const size_t srcSize)
|
|
870
|
+
{
|
|
871
|
+
char lvlstr[15] = "Custom Level";
|
|
872
|
+
winnerInfo_t w;
|
|
873
|
+
w.params = params;
|
|
874
|
+
w.result = result;
|
|
875
|
+
|
|
876
|
+
fprintf(f, "\r%79s\r", "");
|
|
877
|
+
|
|
878
|
+
if(cLevel != CUSTOM_LEVEL) {
|
|
879
|
+
snprintf(lvlstr, 15, " Level %2d ", cLevel);
|
|
880
|
+
}
|
|
881
|
+
|
|
882
|
+
if(TIMED) {
|
|
883
|
+
const U64 mn_in_ns = 60ULL * TIMELOOP_NANOSEC;
|
|
884
|
+
const U64 time_ns = UTIL_clockSpanNano(g_time);
|
|
885
|
+
const U64 minutes = time_ns / mn_in_ns;
|
|
886
|
+
fprintf(f, "%1lu:%2lu:%05.2f - ",
|
|
887
|
+
(unsigned long) minutes / 60,
|
|
888
|
+
(unsigned long) minutes % 60,
|
|
889
|
+
(double)(time_ns - (minutes * mn_in_ns)) / TIMELOOP_NANOSEC );
|
|
890
|
+
}
|
|
891
|
+
|
|
892
|
+
fprintf(f, "/* %s */ ", lvlstr);
|
|
893
|
+
BMK_displayOneResult(f, w, srcSize);
|
|
894
|
+
}
|
|
895
|
+
|
|
896
|
+
static void
|
|
897
|
+
BMK_printWinnerOpt(FILE* f, const U32 cLevel, const BMK_benchResult_t result, const paramValues_t params, const constraint_t targetConstraints, const size_t srcSize)
|
|
898
|
+
{
|
|
899
|
+
/* global winner used for constraints */
|
|
900
|
+
/* cSize, cSpeed, dSpeed, cMem */
|
|
901
|
+
static winnerInfo_t g_winner = { { (size_t)-1LL, 0, 0, (size_t)-1LL },
|
|
902
|
+
{ { PARAM_UNSET, PARAM_UNSET, PARAM_UNSET, PARAM_UNSET, PARAM_UNSET, PARAM_UNSET, PARAM_UNSET, PARAM_UNSET } }
|
|
903
|
+
};
|
|
904
|
+
if ( DEBUG
|
|
905
|
+
|| compareResultLT(g_winner.result, result, targetConstraints, srcSize)
|
|
906
|
+
|| g_displayLevel >= 4) {
|
|
907
|
+
if ( DEBUG
|
|
908
|
+
&& compareResultLT(g_winner.result, result, targetConstraints, srcSize)) {
|
|
909
|
+
DISPLAY("New Winner: \n");
|
|
910
|
+
}
|
|
911
|
+
|
|
912
|
+
if(g_displayLevel >= 2) {
|
|
913
|
+
BMK_printWinner(f, cLevel, result, params, srcSize);
|
|
914
|
+
}
|
|
915
|
+
|
|
916
|
+
if(compareResultLT(g_winner.result, result, targetConstraints, srcSize)) {
|
|
917
|
+
if(g_displayLevel >= 1) { BMK_paramValues_into_commandLine(f, params); }
|
|
918
|
+
g_winner.result = result;
|
|
919
|
+
g_winner.params = params;
|
|
920
|
+
}
|
|
921
|
+
}
|
|
922
|
+
|
|
923
|
+
if(g_optmode && g_optimizer && (DEBUG || g_displayLevel == 3)) {
|
|
924
|
+
winnerInfo_t w;
|
|
925
|
+
winner_ll_node* n;
|
|
926
|
+
w.result = result;
|
|
927
|
+
w.params = params;
|
|
928
|
+
insertWinner(w, targetConstraints);
|
|
929
|
+
|
|
930
|
+
if(!DEBUG) { fprintf(f, "\033c"); }
|
|
931
|
+
fprintf(f, "\n");
|
|
932
|
+
|
|
933
|
+
/* the table */
|
|
934
|
+
fprintf(f, "================================\n");
|
|
935
|
+
for(n = g_winners; n != NULL; n = n->next) {
|
|
936
|
+
BMK_displayOneResult(f, n->res, srcSize);
|
|
937
|
+
}
|
|
938
|
+
fprintf(f, "================================\n");
|
|
939
|
+
fprintf(f, "Level Bounds: R: > %.3f AND C: < %.1f MB/s \n\n",
|
|
940
|
+
(double)srcSize / (double)g_lvltarget.cSize, (double)g_lvltarget.cSpeed / MB_UNIT);
|
|
941
|
+
|
|
942
|
+
|
|
943
|
+
fprintf(f, "Overall Winner: \n");
|
|
944
|
+
BMK_displayOneResult(f, g_winner, srcSize);
|
|
945
|
+
BMK_paramValues_into_commandLine(f, g_winner.params);
|
|
946
|
+
|
|
947
|
+
fprintf(f, "Latest BMK: \n");\
|
|
948
|
+
BMK_displayOneResult(f, w, srcSize);
|
|
949
|
+
}
|
|
950
|
+
}
|
|
951
|
+
|
|
952
|
+
|
|
953
|
+
/* BMK_print_cLevelEntry() :
|
|
954
|
+
* Writes one cLevelTable entry, for one level.
|
|
955
|
+
* f must exist, be already opened, and be seekable.
|
|
956
|
+
* this function cannot error.
|
|
957
|
+
*/
|
|
958
|
+
static void
|
|
959
|
+
BMK_print_cLevelEntry(FILE* f, const int cLevel,
|
|
960
|
+
paramValues_t params,
|
|
961
|
+
const BMK_benchResult_t result, const size_t srcSize)
|
|
962
|
+
{
|
|
963
|
+
varInds_t v;
|
|
964
|
+
int first = 1;
|
|
965
|
+
|
|
966
|
+
assert(cLevel >= 0);
|
|
967
|
+
assert(cLevel <= NB_LEVELS_TRACKED);
|
|
968
|
+
params = cParamUnsetMin(params);
|
|
969
|
+
|
|
970
|
+
fprintf(f, " {");
|
|
971
|
+
/* print cParams.
|
|
972
|
+
* assumption : all cParams are present and in order in the following range */
|
|
973
|
+
for (v = 0; v <= strt_ind; v++) {
|
|
974
|
+
if (!first) { fprintf(f, ","); }
|
|
975
|
+
displayParamVal(f, v, params.vals[v], 3);
|
|
976
|
+
first = 0;
|
|
977
|
+
}
|
|
978
|
+
/* print comment */
|
|
979
|
+
{ double const ratio = result.cSize ?
|
|
980
|
+
(double)srcSize / (double)result.cSize : 0;
|
|
981
|
+
double const cSpeedMBps = (double)result.cSpeed / MB_UNIT;
|
|
982
|
+
double const dSpeedMBps = (double)result.dSpeed / MB_UNIT;
|
|
983
|
+
|
|
984
|
+
fprintf(f, " }, /* level %2i: R=%5.3f at %5.1f MB/s - %5.1f MB/s */\n",
|
|
985
|
+
cLevel, ratio, cSpeedMBps, dSpeedMBps);
|
|
986
|
+
}
|
|
987
|
+
}
|
|
988
|
+
|
|
989
|
+
|
|
990
|
+
/* BMK_print_cLevelTable() :
|
|
991
|
+
* print candidate compression table into proposed FILE* f.
|
|
992
|
+
* f must exist, be already opened, and be seekable.
|
|
993
|
+
* winners must be a table of NB_LEVELS_TRACKED+1 elements winnerInfo_t, all entries presumed initialized
|
|
994
|
+
* this function cannot error.
|
|
995
|
+
*/
|
|
996
|
+
static void
|
|
997
|
+
BMK_print_cLevelTable(FILE* f, const winnerInfo_t* winners, const size_t srcSize)
|
|
998
|
+
{
|
|
999
|
+
int cLevel;
|
|
1000
|
+
|
|
1001
|
+
fprintf(f, "\n /* Proposed configurations : */ \n");
|
|
1002
|
+
fprintf(f, " /* W, C, H, S, L, T, strat */ \n");
|
|
1003
|
+
|
|
1004
|
+
for (cLevel=0; cLevel <= NB_LEVELS_TRACKED; cLevel++)
|
|
1005
|
+
BMK_print_cLevelEntry(f,
|
|
1006
|
+
cLevel, winners[cLevel].params,
|
|
1007
|
+
winners[cLevel].result, srcSize);
|
|
1008
|
+
}
|
|
1009
|
+
|
|
1010
|
+
|
|
1011
|
+
/* BMK_saveAndPrint_cLevelTable() :
|
|
1012
|
+
* save candidate compression table into FILE* f,
|
|
1013
|
+
* and then to stdout.
|
|
1014
|
+
* f must exist, be already opened, and be seekable.
|
|
1015
|
+
* winners must be a table of NB_LEVELS_TRACKED+1 elements winnerInfo_t, all entries presumed initialized
|
|
1016
|
+
* this function cannot error.
|
|
1017
|
+
*/
|
|
1018
|
+
static void
|
|
1019
|
+
BMK_saveAndPrint_cLevelTable(FILE* const f,
|
|
1020
|
+
const winnerInfo_t* winners,
|
|
1021
|
+
const size_t srcSize)
|
|
1022
|
+
{
|
|
1023
|
+
fseek(f, 0, SEEK_SET);
|
|
1024
|
+
BMK_print_cLevelTable(f, winners, srcSize);
|
|
1025
|
+
fflush(f);
|
|
1026
|
+
BMK_print_cLevelTable(stdout, winners, srcSize);
|
|
1027
|
+
}
|
|
1028
|
+
|
|
1029
|
+
|
|
1030
|
+
/*-*******************************************************
|
|
1031
|
+
* Functions to Benchmark
|
|
1032
|
+
*********************************************************/
|
|
1033
|
+
|
|
1034
|
+
typedef struct {
|
|
1035
|
+
ZSTD_CCtx* cctx;
|
|
1036
|
+
const void* dictBuffer;
|
|
1037
|
+
size_t dictBufferSize;
|
|
1038
|
+
int cLevel;
|
|
1039
|
+
const paramValues_t* comprParams;
|
|
1040
|
+
} BMK_initCCtxArgs;
|
|
1041
|
+
|
|
1042
|
+
static size_t local_initCCtx(void* payload) {
|
|
1043
|
+
const BMK_initCCtxArgs* ag = (const BMK_initCCtxArgs*)payload;
|
|
1044
|
+
varInds_t i;
|
|
1045
|
+
ZSTD_CCtx_reset(ag->cctx, ZSTD_reset_session_and_parameters);
|
|
1046
|
+
ZSTD_CCtx_setParameter(ag->cctx, ZSTD_c_compressionLevel, ag->cLevel);
|
|
1047
|
+
|
|
1048
|
+
for(i = 0; i < NUM_PARAMS; i++) {
|
|
1049
|
+
if(ag->comprParams->vals[i] != PARAM_UNSET)
|
|
1050
|
+
ZSTD_CCtx_setParameter(ag->cctx, cctxSetParamTable[i], ag->comprParams->vals[i]);
|
|
1051
|
+
}
|
|
1052
|
+
ZSTD_CCtx_loadDictionary(ag->cctx, ag->dictBuffer, ag->dictBufferSize);
|
|
1053
|
+
|
|
1054
|
+
return 0;
|
|
1055
|
+
}
|
|
1056
|
+
|
|
1057
|
+
typedef struct {
|
|
1058
|
+
ZSTD_DCtx* dctx;
|
|
1059
|
+
const void* dictBuffer;
|
|
1060
|
+
size_t dictBufferSize;
|
|
1061
|
+
} BMK_initDCtxArgs;
|
|
1062
|
+
|
|
1063
|
+
static size_t local_initDCtx(void* payload) {
|
|
1064
|
+
const BMK_initDCtxArgs* ag = (const BMK_initDCtxArgs*)payload;
|
|
1065
|
+
ZSTD_DCtx_reset(ag->dctx, ZSTD_reset_session_and_parameters);
|
|
1066
|
+
ZSTD_DCtx_loadDictionary(ag->dctx, ag->dictBuffer, ag->dictBufferSize);
|
|
1067
|
+
return 0;
|
|
1068
|
+
}
|
|
1069
|
+
|
|
1070
|
+
/* additional argument is just the context */
|
|
1071
|
+
static size_t local_defaultCompress(
|
|
1072
|
+
const void* srcBuffer, size_t srcSize,
|
|
1073
|
+
void* dstBuffer, size_t dstSize,
|
|
1074
|
+
void* addArgs)
|
|
1075
|
+
{
|
|
1076
|
+
ZSTD_CCtx* cctx = (ZSTD_CCtx*)addArgs;
|
|
1077
|
+
assert(dstSize == ZSTD_compressBound(srcSize)); /* specific to this version, which is only used in paramgrill */
|
|
1078
|
+
return ZSTD_compress2(cctx, dstBuffer, dstSize, srcBuffer, srcSize);
|
|
1079
|
+
}
|
|
1080
|
+
|
|
1081
|
+
/* additional argument is just the context */
|
|
1082
|
+
static size_t local_defaultDecompress(
|
|
1083
|
+
const void* srcBuffer, size_t srcSize,
|
|
1084
|
+
void* dstBuffer, size_t dstSize,
|
|
1085
|
+
void* addArgs) {
|
|
1086
|
+
size_t moreToFlush = 1;
|
|
1087
|
+
ZSTD_DCtx* dctx = (ZSTD_DCtx*)addArgs;
|
|
1088
|
+
ZSTD_inBuffer in;
|
|
1089
|
+
ZSTD_outBuffer out;
|
|
1090
|
+
in.src = srcBuffer;
|
|
1091
|
+
in.size = srcSize;
|
|
1092
|
+
in.pos = 0;
|
|
1093
|
+
out.dst = dstBuffer;
|
|
1094
|
+
out.size = dstSize;
|
|
1095
|
+
out.pos = 0;
|
|
1096
|
+
while (moreToFlush) {
|
|
1097
|
+
if(out.pos == out.size) {
|
|
1098
|
+
return (size_t)-ZSTD_error_dstSize_tooSmall;
|
|
1099
|
+
}
|
|
1100
|
+
moreToFlush = ZSTD_decompressStream(dctx,
|
|
1101
|
+
&out, &in);
|
|
1102
|
+
if (ZSTD_isError(moreToFlush)) {
|
|
1103
|
+
return moreToFlush;
|
|
1104
|
+
}
|
|
1105
|
+
}
|
|
1106
|
+
return out.pos;
|
|
1107
|
+
|
|
1108
|
+
}
|
|
1109
|
+
|
|
1110
|
+
/*-************************************
|
|
1111
|
+
* Data Initialization Functions
|
|
1112
|
+
**************************************/
|
|
1113
|
+
|
|
1114
|
+
typedef struct {
|
|
1115
|
+
void* srcBuffer;
|
|
1116
|
+
size_t srcSize;
|
|
1117
|
+
const void** srcPtrs;
|
|
1118
|
+
size_t* srcSizes;
|
|
1119
|
+
void** dstPtrs;
|
|
1120
|
+
size_t* dstCapacities;
|
|
1121
|
+
size_t* dstSizes;
|
|
1122
|
+
void** resPtrs;
|
|
1123
|
+
size_t* resSizes;
|
|
1124
|
+
size_t nbBlocks;
|
|
1125
|
+
size_t maxBlockSize;
|
|
1126
|
+
} buffers_t;
|
|
1127
|
+
|
|
1128
|
+
typedef struct {
|
|
1129
|
+
size_t dictSize;
|
|
1130
|
+
void* dictBuffer;
|
|
1131
|
+
ZSTD_CCtx* cctx;
|
|
1132
|
+
ZSTD_DCtx* dctx;
|
|
1133
|
+
} contexts_t;
|
|
1134
|
+
|
|
1135
|
+
static void freeNonSrcBuffers(const buffers_t b) {
|
|
1136
|
+
free((void*)b.srcPtrs);
|
|
1137
|
+
free(b.srcSizes);
|
|
1138
|
+
|
|
1139
|
+
if(b.dstPtrs != NULL) {
|
|
1140
|
+
free(b.dstPtrs[0]);
|
|
1141
|
+
}
|
|
1142
|
+
free(b.dstPtrs);
|
|
1143
|
+
free(b.dstCapacities);
|
|
1144
|
+
free(b.dstSizes);
|
|
1145
|
+
|
|
1146
|
+
if(b.resPtrs != NULL) {
|
|
1147
|
+
free(b.resPtrs[0]);
|
|
1148
|
+
}
|
|
1149
|
+
free(b.resPtrs);
|
|
1150
|
+
free(b.resSizes);
|
|
1151
|
+
}
|
|
1152
|
+
|
|
1153
|
+
static void freeBuffers(const buffers_t b) {
|
|
1154
|
+
if(b.srcPtrs != NULL) {
|
|
1155
|
+
free(b.srcBuffer);
|
|
1156
|
+
}
|
|
1157
|
+
freeNonSrcBuffers(b);
|
|
1158
|
+
}
|
|
1159
|
+
|
|
1160
|
+
/* srcBuffer will be freed by freeBuffers now */
|
|
1161
|
+
static int createBuffersFromMemory(buffers_t* buff, void * srcBuffer, const size_t nbFiles,
|
|
1162
|
+
const size_t* fileSizes)
|
|
1163
|
+
{
|
|
1164
|
+
size_t pos = 0, n, blockSize;
|
|
1165
|
+
U32 maxNbBlocks, blockNb = 0;
|
|
1166
|
+
buff->srcSize = 0;
|
|
1167
|
+
for(n = 0; n < nbFiles; n++) {
|
|
1168
|
+
buff->srcSize += fileSizes[n];
|
|
1169
|
+
}
|
|
1170
|
+
|
|
1171
|
+
if(buff->srcSize == 0) {
|
|
1172
|
+
DISPLAY("No data to bench\n");
|
|
1173
|
+
return 1;
|
|
1174
|
+
}
|
|
1175
|
+
|
|
1176
|
+
blockSize = g_blockSize ? g_blockSize : buff->srcSize;
|
|
1177
|
+
maxNbBlocks = (U32) ((buff->srcSize + (blockSize-1)) / blockSize) + (U32)nbFiles;
|
|
1178
|
+
|
|
1179
|
+
buff->srcPtrs = (const void**)calloc(maxNbBlocks, sizeof(void*));
|
|
1180
|
+
buff->srcSizes = (size_t*)malloc(maxNbBlocks * sizeof(size_t));
|
|
1181
|
+
|
|
1182
|
+
buff->dstPtrs = (void**)calloc(maxNbBlocks, sizeof(void*));
|
|
1183
|
+
buff->dstCapacities = (size_t*)malloc(maxNbBlocks * sizeof(size_t));
|
|
1184
|
+
buff->dstSizes = (size_t*)malloc(maxNbBlocks * sizeof(size_t));
|
|
1185
|
+
|
|
1186
|
+
buff->resPtrs = (void**)calloc(maxNbBlocks, sizeof(void*));
|
|
1187
|
+
buff->resSizes = (size_t*)malloc(maxNbBlocks * sizeof(size_t));
|
|
1188
|
+
|
|
1189
|
+
if(!buff->srcPtrs || !buff->srcSizes || !buff->dstPtrs || !buff->dstCapacities || !buff->dstSizes || !buff->resPtrs || !buff->resSizes) {
|
|
1190
|
+
DISPLAY("alloc error\n");
|
|
1191
|
+
freeNonSrcBuffers(*buff);
|
|
1192
|
+
return 1;
|
|
1193
|
+
}
|
|
1194
|
+
|
|
1195
|
+
buff->srcBuffer = srcBuffer;
|
|
1196
|
+
buff->srcPtrs[0] = (const void*)buff->srcBuffer;
|
|
1197
|
+
buff->dstPtrs[0] = malloc(ZSTD_compressBound(buff->srcSize) + (maxNbBlocks * 1024));
|
|
1198
|
+
buff->resPtrs[0] = malloc(buff->srcSize);
|
|
1199
|
+
|
|
1200
|
+
if(!buff->dstPtrs[0] || !buff->resPtrs[0]) {
|
|
1201
|
+
DISPLAY("alloc error\n");
|
|
1202
|
+
freeNonSrcBuffers(*buff);
|
|
1203
|
+
return 1;
|
|
1204
|
+
}
|
|
1205
|
+
|
|
1206
|
+
for(n = 0; n < nbFiles; n++) {
|
|
1207
|
+
size_t pos_end = pos + fileSizes[n];
|
|
1208
|
+
for(; pos < pos_end; blockNb++) {
|
|
1209
|
+
buff->srcPtrs[blockNb] = (const void*)((char*)srcBuffer + pos);
|
|
1210
|
+
buff->srcSizes[blockNb] = blockSize;
|
|
1211
|
+
pos += blockSize;
|
|
1212
|
+
}
|
|
1213
|
+
|
|
1214
|
+
if(fileSizes[n] > 0) { buff->srcSizes[blockNb - 1] = ((fileSizes[n] - 1) % blockSize) + 1; }
|
|
1215
|
+
pos = pos_end;
|
|
1216
|
+
}
|
|
1217
|
+
|
|
1218
|
+
buff->dstCapacities[0] = ZSTD_compressBound(buff->srcSizes[0]);
|
|
1219
|
+
buff->dstSizes[0] = buff->dstCapacities[0];
|
|
1220
|
+
buff->resSizes[0] = buff->srcSizes[0];
|
|
1221
|
+
buff->maxBlockSize = buff->srcSizes[0];
|
|
1222
|
+
|
|
1223
|
+
for(n = 1; n < blockNb; n++) {
|
|
1224
|
+
buff->dstPtrs[n] = ((char*)buff->dstPtrs[n-1]) + buff->dstCapacities[n-1];
|
|
1225
|
+
buff->resPtrs[n] = ((char*)buff->resPtrs[n-1]) + buff->resSizes[n-1];
|
|
1226
|
+
buff->dstCapacities[n] = ZSTD_compressBound(buff->srcSizes[n]);
|
|
1227
|
+
buff->dstSizes[n] = buff->dstCapacities[n];
|
|
1228
|
+
buff->resSizes[n] = buff->srcSizes[n];
|
|
1229
|
+
|
|
1230
|
+
buff->maxBlockSize = MAX(buff->maxBlockSize, buff->srcSizes[n]);
|
|
1231
|
+
}
|
|
1232
|
+
|
|
1233
|
+
buff->nbBlocks = blockNb;
|
|
1234
|
+
|
|
1235
|
+
return 0;
|
|
1236
|
+
}
|
|
1237
|
+
|
|
1238
|
+
/* allocates buffer's arguments. returns success / failure */
|
|
1239
|
+
static int createBuffers(buffers_t* buff, const char* const * const fileNamesTable,
|
|
1240
|
+
size_t nbFiles) {
|
|
1241
|
+
size_t pos = 0;
|
|
1242
|
+
size_t n;
|
|
1243
|
+
size_t totalSizeToLoad = (size_t)UTIL_getTotalFileSize(fileNamesTable, (U32)nbFiles);
|
|
1244
|
+
size_t benchedSize = MIN(BMK_findMaxMem(totalSizeToLoad * 3) / 3, totalSizeToLoad);
|
|
1245
|
+
size_t* fileSizes = calloc(sizeof(size_t), nbFiles);
|
|
1246
|
+
void* srcBuffer = NULL;
|
|
1247
|
+
int ret = 0;
|
|
1248
|
+
|
|
1249
|
+
if(!totalSizeToLoad || !benchedSize) {
|
|
1250
|
+
ret = 1;
|
|
1251
|
+
DISPLAY("Nothing to Bench\n");
|
|
1252
|
+
goto _cleanUp;
|
|
1253
|
+
}
|
|
1254
|
+
|
|
1255
|
+
srcBuffer = malloc(benchedSize);
|
|
1256
|
+
|
|
1257
|
+
if(!fileSizes || !srcBuffer) {
|
|
1258
|
+
ret = 1;
|
|
1259
|
+
goto _cleanUp;
|
|
1260
|
+
}
|
|
1261
|
+
|
|
1262
|
+
for(n = 0; n < nbFiles; n++) {
|
|
1263
|
+
FILE* f;
|
|
1264
|
+
U64 fileSize = UTIL_getFileSize(fileNamesTable[n]);
|
|
1265
|
+
if (UTIL_isDirectory(fileNamesTable[n])) {
|
|
1266
|
+
DISPLAY("Ignoring %s directory... \n", fileNamesTable[n]);
|
|
1267
|
+
continue;
|
|
1268
|
+
}
|
|
1269
|
+
if (fileSize == UTIL_FILESIZE_UNKNOWN) {
|
|
1270
|
+
DISPLAY("Cannot evaluate size of %s, ignoring ... \n", fileNamesTable[n]);
|
|
1271
|
+
continue;
|
|
1272
|
+
}
|
|
1273
|
+
f = fopen(fileNamesTable[n], "rb");
|
|
1274
|
+
if (f==NULL) {
|
|
1275
|
+
DISPLAY("impossible to open file %s\n", fileNamesTable[n]);
|
|
1276
|
+
ret = 10;
|
|
1277
|
+
goto _cleanUp;
|
|
1278
|
+
}
|
|
1279
|
+
|
|
1280
|
+
DISPLAYLEVEL(2, "Loading %s... \r", fileNamesTable[n]);
|
|
1281
|
+
|
|
1282
|
+
if (fileSize + pos > benchedSize) fileSize = benchedSize - pos, nbFiles=n; /* buffer too small - stop after this file */
|
|
1283
|
+
{
|
|
1284
|
+
char* buffer = (char*)(srcBuffer);
|
|
1285
|
+
size_t const readSize = fread((buffer)+pos, 1, (size_t)fileSize, f);
|
|
1286
|
+
fclose(f);
|
|
1287
|
+
if (readSize != (size_t)fileSize) {
|
|
1288
|
+
DISPLAY("could not read %s", fileNamesTable[n]);
|
|
1289
|
+
ret = 1;
|
|
1290
|
+
goto _cleanUp;
|
|
1291
|
+
}
|
|
1292
|
+
|
|
1293
|
+
fileSizes[n] = readSize;
|
|
1294
|
+
pos += readSize;
|
|
1295
|
+
}
|
|
1296
|
+
}
|
|
1297
|
+
|
|
1298
|
+
ret = createBuffersFromMemory(buff, srcBuffer, nbFiles, fileSizes);
|
|
1299
|
+
|
|
1300
|
+
_cleanUp:
|
|
1301
|
+
if(ret) { free(srcBuffer); }
|
|
1302
|
+
free(fileSizes);
|
|
1303
|
+
return ret;
|
|
1304
|
+
}
|
|
1305
|
+
|
|
1306
|
+
static void freeContexts(const contexts_t ctx) {
|
|
1307
|
+
free(ctx.dictBuffer);
|
|
1308
|
+
ZSTD_freeCCtx(ctx.cctx);
|
|
1309
|
+
ZSTD_freeDCtx(ctx.dctx);
|
|
1310
|
+
}
|
|
1311
|
+
|
|
1312
|
+
static int createContexts(contexts_t* ctx, const char* dictFileName) {
|
|
1313
|
+
FILE* f;
|
|
1314
|
+
size_t readSize;
|
|
1315
|
+
ctx->cctx = ZSTD_createCCtx();
|
|
1316
|
+
ctx->dctx = ZSTD_createDCtx();
|
|
1317
|
+
assert(ctx->cctx != NULL);
|
|
1318
|
+
assert(ctx->dctx != NULL);
|
|
1319
|
+
|
|
1320
|
+
if(dictFileName == NULL) {
|
|
1321
|
+
ctx->dictSize = 0;
|
|
1322
|
+
ctx->dictBuffer = NULL;
|
|
1323
|
+
return 0;
|
|
1324
|
+
}
|
|
1325
|
+
{ U64 const dictFileSize = UTIL_getFileSize(dictFileName);
|
|
1326
|
+
assert(dictFileSize != UTIL_FILESIZE_UNKNOWN);
|
|
1327
|
+
ctx->dictSize = (size_t)dictFileSize;
|
|
1328
|
+
assert((U64)ctx->dictSize == dictFileSize); /* check overflow */
|
|
1329
|
+
}
|
|
1330
|
+
ctx->dictBuffer = malloc(ctx->dictSize);
|
|
1331
|
+
|
|
1332
|
+
f = fopen(dictFileName, "rb");
|
|
1333
|
+
|
|
1334
|
+
if (f==NULL) {
|
|
1335
|
+
DISPLAY("unable to open file\n");
|
|
1336
|
+
freeContexts(*ctx);
|
|
1337
|
+
return 1;
|
|
1338
|
+
}
|
|
1339
|
+
|
|
1340
|
+
if (ctx->dictSize > 64 MB || !(ctx->dictBuffer)) {
|
|
1341
|
+
DISPLAY("dictionary too large\n");
|
|
1342
|
+
fclose(f);
|
|
1343
|
+
freeContexts(*ctx);
|
|
1344
|
+
return 1;
|
|
1345
|
+
}
|
|
1346
|
+
readSize = fread(ctx->dictBuffer, 1, ctx->dictSize, f);
|
|
1347
|
+
fclose(f);
|
|
1348
|
+
if (readSize != ctx->dictSize) {
|
|
1349
|
+
DISPLAY("unable to read file\n");
|
|
1350
|
+
freeContexts(*ctx);
|
|
1351
|
+
return 1;
|
|
1352
|
+
}
|
|
1353
|
+
return 0;
|
|
1354
|
+
}
|
|
1355
|
+
|
|
1356
|
+
/*-************************************
|
|
1357
|
+
* Optimizer Memoization Functions
|
|
1358
|
+
**************************************/
|
|
1359
|
+
|
|
1360
|
+
/* return: new length */
|
|
1361
|
+
/* keep old array, will need if iter over strategy. */
|
|
1362
|
+
/* prunes useless params */
|
|
1363
|
+
static size_t sanitizeVarArray(varInds_t* varNew, const size_t varLength, const varInds_t* varArray, const ZSTD_strategy strat) {
|
|
1364
|
+
size_t i, j = 0;
|
|
1365
|
+
for(i = 0; i < varLength; i++) {
|
|
1366
|
+
if( !((varArray[i] == clog_ind && strat == ZSTD_fast)
|
|
1367
|
+
|| (varArray[i] == slog_ind && strat == ZSTD_fast)
|
|
1368
|
+
|| (varArray[i] == slog_ind && strat == ZSTD_dfast)
|
|
1369
|
+
|| (varArray[i] == tlen_ind && strat < ZSTD_btopt && strat != ZSTD_fast))) {
|
|
1370
|
+
varNew[j] = varArray[i];
|
|
1371
|
+
j++;
|
|
1372
|
+
}
|
|
1373
|
+
}
|
|
1374
|
+
return j;
|
|
1375
|
+
}
|
|
1376
|
+
|
|
1377
|
+
/* res should be NUM_PARAMS size */
|
|
1378
|
+
/* constructs varArray from paramValues_t style parameter */
|
|
1379
|
+
/* pass in using dict. */
|
|
1380
|
+
static size_t variableParams(const paramValues_t paramConstraints, varInds_t* res, const int usingDictionary) {
|
|
1381
|
+
varInds_t i;
|
|
1382
|
+
size_t j = 0;
|
|
1383
|
+
for(i = 0; i < NUM_PARAMS; i++) {
|
|
1384
|
+
if(paramConstraints.vals[i] == PARAM_UNSET) {
|
|
1385
|
+
if(i == fadt_ind && !usingDictionary) continue; /* don't use fadt if no dictionary */
|
|
1386
|
+
res[j] = i; j++;
|
|
1387
|
+
}
|
|
1388
|
+
}
|
|
1389
|
+
return j;
|
|
1390
|
+
}
|
|
1391
|
+
|
|
1392
|
+
/* length of memo table given free variables */
|
|
1393
|
+
static size_t memoTableLen(const varInds_t* varyParams, const size_t varyLen) {
|
|
1394
|
+
size_t arrayLen = 1;
|
|
1395
|
+
size_t i;
|
|
1396
|
+
for(i = 0; i < varyLen; i++) {
|
|
1397
|
+
if(varyParams[i] == strt_ind) continue; /* strategy separated by table */
|
|
1398
|
+
arrayLen *= rangetable[varyParams[i]];
|
|
1399
|
+
}
|
|
1400
|
+
return arrayLen;
|
|
1401
|
+
}
|
|
1402
|
+
|
|
1403
|
+
/* returns unique index in memotable of compression parameters */
|
|
1404
|
+
static unsigned memoTableIndDirect(const paramValues_t* ptr, const varInds_t* varyParams, const size_t varyLen) {
|
|
1405
|
+
size_t i;
|
|
1406
|
+
unsigned ind = 0;
|
|
1407
|
+
for(i = 0; i < varyLen; i++) {
|
|
1408
|
+
varInds_t v = varyParams[i];
|
|
1409
|
+
if(v == strt_ind) continue; /* exclude strategy from memotable */
|
|
1410
|
+
ind *= rangetable[v]; ind += (unsigned)invRangeMap(v, ptr->vals[v]);
|
|
1411
|
+
}
|
|
1412
|
+
return ind;
|
|
1413
|
+
}
|
|
1414
|
+
|
|
1415
|
+
static size_t memoTableGet(const memoTable_t* memoTableArray, const paramValues_t p) {
|
|
1416
|
+
const memoTable_t mt = memoTableArray[p.vals[strt_ind]];
|
|
1417
|
+
switch(mt.tableType) {
|
|
1418
|
+
case directMap:
|
|
1419
|
+
return mt.table[memoTableIndDirect(&p, mt.varArray, mt.varLen)];
|
|
1420
|
+
case xxhashMap:
|
|
1421
|
+
return mt.table[(XXH64(&p.vals, sizeof(U32) * NUM_PARAMS, 0) >> 3) % mt.tableLen];
|
|
1422
|
+
case noMemo:
|
|
1423
|
+
return 0;
|
|
1424
|
+
}
|
|
1425
|
+
return 0; /* should never happen, stop compiler warnings */
|
|
1426
|
+
}
|
|
1427
|
+
|
|
1428
|
+
static void memoTableSet(const memoTable_t* memoTableArray, const paramValues_t p, const BYTE value) {
|
|
1429
|
+
const memoTable_t mt = memoTableArray[p.vals[strt_ind]];
|
|
1430
|
+
switch(mt.tableType) {
|
|
1431
|
+
case directMap:
|
|
1432
|
+
mt.table[memoTableIndDirect(&p, mt.varArray, mt.varLen)] = value; break;
|
|
1433
|
+
case xxhashMap:
|
|
1434
|
+
mt.table[(XXH64(&p.vals, sizeof(U32) * NUM_PARAMS, 0) >> 3) % mt.tableLen] = value; break;
|
|
1435
|
+
case noMemo:
|
|
1436
|
+
break;
|
|
1437
|
+
}
|
|
1438
|
+
}
|
|
1439
|
+
|
|
1440
|
+
/* frees all allocated memotables */
|
|
1441
|
+
/* secret contract :
|
|
1442
|
+
* mtAll is a table of (ZSTD_STRATEGY_MAX+1) memoTable_t */
|
|
1443
|
+
static void freeMemoTableArray(memoTable_t* const mtAll) {
|
|
1444
|
+
int i;
|
|
1445
|
+
if(mtAll == NULL) { return; }
|
|
1446
|
+
for(i = 1; i <= (int)ZSTD_STRATEGY_MAX; i++) {
|
|
1447
|
+
free(mtAll[i].table);
|
|
1448
|
+
}
|
|
1449
|
+
free(mtAll);
|
|
1450
|
+
}
|
|
1451
|
+
|
|
1452
|
+
/* inits memotables for all (including mallocs), all strategies */
|
|
1453
|
+
/* takes unsanitized varyParams */
|
|
1454
|
+
static memoTable_t*
|
|
1455
|
+
createMemoTableArray(const paramValues_t p,
|
|
1456
|
+
const varInds_t* const varyParams,
|
|
1457
|
+
const size_t varyLen,
|
|
1458
|
+
const U32 memoTableLog)
|
|
1459
|
+
{
|
|
1460
|
+
memoTable_t* const mtAll = (memoTable_t*)calloc(sizeof(memoTable_t),(ZSTD_STRATEGY_MAX + 1));
|
|
1461
|
+
ZSTD_strategy i, stratMin = ZSTD_STRATEGY_MIN, stratMax = ZSTD_STRATEGY_MAX;
|
|
1462
|
+
|
|
1463
|
+
if(mtAll == NULL) {
|
|
1464
|
+
return NULL;
|
|
1465
|
+
}
|
|
1466
|
+
|
|
1467
|
+
for(i = 1; i <= (int)ZSTD_STRATEGY_MAX; i++) {
|
|
1468
|
+
mtAll[i].varLen = sanitizeVarArray(mtAll[i].varArray, varyLen, varyParams, i);
|
|
1469
|
+
}
|
|
1470
|
+
|
|
1471
|
+
/* no memoization */
|
|
1472
|
+
if(memoTableLog == 0) {
|
|
1473
|
+
for(i = 1; i <= (int)ZSTD_STRATEGY_MAX; i++) {
|
|
1474
|
+
mtAll[i].tableType = noMemo;
|
|
1475
|
+
mtAll[i].table = NULL;
|
|
1476
|
+
mtAll[i].tableLen = 0;
|
|
1477
|
+
}
|
|
1478
|
+
return mtAll;
|
|
1479
|
+
}
|
|
1480
|
+
|
|
1481
|
+
|
|
1482
|
+
if(p.vals[strt_ind] != PARAM_UNSET) {
|
|
1483
|
+
stratMin = p.vals[strt_ind];
|
|
1484
|
+
stratMax = p.vals[strt_ind];
|
|
1485
|
+
}
|
|
1486
|
+
|
|
1487
|
+
|
|
1488
|
+
for(i = stratMin; i <= stratMax; i++) {
|
|
1489
|
+
size_t mtl = memoTableLen(mtAll[i].varArray, mtAll[i].varLen);
|
|
1490
|
+
mtAll[i].tableType = directMap;
|
|
1491
|
+
|
|
1492
|
+
if(memoTableLog != PARAM_UNSET && mtl > (1ULL << memoTableLog)) { /* use hash table */ /* provide some option to only use hash tables? */
|
|
1493
|
+
mtAll[i].tableType = xxhashMap;
|
|
1494
|
+
mtl = ((size_t)1 << memoTableLog);
|
|
1495
|
+
}
|
|
1496
|
+
|
|
1497
|
+
mtAll[i].table = (BYTE*)calloc(sizeof(BYTE), mtl);
|
|
1498
|
+
mtAll[i].tableLen = mtl;
|
|
1499
|
+
|
|
1500
|
+
if(mtAll[i].table == NULL) {
|
|
1501
|
+
freeMemoTableArray(mtAll);
|
|
1502
|
+
return NULL;
|
|
1503
|
+
}
|
|
1504
|
+
}
|
|
1505
|
+
|
|
1506
|
+
return mtAll;
|
|
1507
|
+
}
|
|
1508
|
+
|
|
1509
|
+
/* Sets pc to random unmeasured set of parameters */
|
|
1510
|
+
/* specify strategy */
|
|
1511
|
+
static void randomConstrainedParams(paramValues_t* pc, const memoTable_t* memoTableArray, const ZSTD_strategy st)
|
|
1512
|
+
{
|
|
1513
|
+
size_t j;
|
|
1514
|
+
const memoTable_t mt = memoTableArray[st];
|
|
1515
|
+
pc->vals[strt_ind] = st;
|
|
1516
|
+
for(j = 0; j < mt.tableLen; j++) {
|
|
1517
|
+
int i;
|
|
1518
|
+
for(i = 0; i < NUM_PARAMS; i++) {
|
|
1519
|
+
varInds_t v = mt.varArray[i];
|
|
1520
|
+
if(v == strt_ind) continue;
|
|
1521
|
+
pc->vals[v] = rangeMap(v, FUZ_rand(&g_rand) % rangetable[v]);
|
|
1522
|
+
}
|
|
1523
|
+
|
|
1524
|
+
if(!(memoTableGet(memoTableArray, *pc))) break; /* only pick unpicked params. */
|
|
1525
|
+
}
|
|
1526
|
+
}
|
|
1527
|
+
|
|
1528
|
+
/*-************************************
|
|
1529
|
+
* Benchmarking Functions
|
|
1530
|
+
**************************************/
|
|
1531
|
+
|
|
1532
|
+
static void display_params_tested(paramValues_t cParams)
|
|
1533
|
+
{
|
|
1534
|
+
varInds_t vi;
|
|
1535
|
+
DISPLAYLEVEL(3, "\r testing :");
|
|
1536
|
+
for (vi=0; vi < NUM_PARAMS; vi++) {
|
|
1537
|
+
DISPLAYLEVEL(3, "%3u,", (unsigned)cParams.vals[vi]);
|
|
1538
|
+
}
|
|
1539
|
+
DISPLAYLEVEL(3, "\b \r");
|
|
1540
|
+
}
|
|
1541
|
+
|
|
1542
|
+
/* Replicate functionality of benchMemAdvanced, but with pre-split src / dst buffers */
|
|
1543
|
+
/* The purpose is so that sufficient information is returned so that a decompression call to benchMemInvertible is possible */
|
|
1544
|
+
/* BMK_benchMemAdvanced(srcBuffer,srcSize, dstBuffer, dstSize, fileSizes, nbFiles, 0, &cParams, dictBuffer, dictSize, ctx, dctx, 0, "File", &adv); */
|
|
1545
|
+
/* nbSeconds used in same way as in BMK_advancedParams_t */
|
|
1546
|
+
/* if in decodeOnly, then srcPtr's will be compressed blocks, and uncompressedBlocks will be written to dstPtrs */
|
|
1547
|
+
/* dictionary nullable, nothing else though. */
|
|
1548
|
+
/* note : it would be a lot better if this function was present in benchzstd.c,
|
|
1549
|
+
* sharing code with benchMemAdvanced(), since it's technically a part of it */
|
|
1550
|
+
static BMK_benchOutcome_t
|
|
1551
|
+
BMK_benchMemInvertible( buffers_t buf, contexts_t ctx,
|
|
1552
|
+
int cLevel, const paramValues_t* comprParams,
|
|
1553
|
+
BMK_mode_t mode, unsigned nbSeconds)
|
|
1554
|
+
{
|
|
1555
|
+
U32 i;
|
|
1556
|
+
BMK_benchResult_t bResult;
|
|
1557
|
+
const void *const *const srcPtrs = (const void *const *const)buf.srcPtrs;
|
|
1558
|
+
size_t const *const srcSizes = buf.srcSizes;
|
|
1559
|
+
void** const dstPtrs = buf.dstPtrs;
|
|
1560
|
+
size_t const *const dstCapacities = buf.dstCapacities;
|
|
1561
|
+
size_t* const dstSizes = buf.dstSizes;
|
|
1562
|
+
void** const resPtrs = buf.resPtrs;
|
|
1563
|
+
size_t const *const resSizes = buf.resSizes;
|
|
1564
|
+
const void* dictBuffer = ctx.dictBuffer;
|
|
1565
|
+
const size_t dictBufferSize = ctx.dictSize;
|
|
1566
|
+
const size_t nbBlocks = buf.nbBlocks;
|
|
1567
|
+
const size_t srcSize = buf.srcSize;
|
|
1568
|
+
ZSTD_CCtx* cctx = ctx.cctx;
|
|
1569
|
+
ZSTD_DCtx* dctx = ctx.dctx;
|
|
1570
|
+
|
|
1571
|
+
/* init */
|
|
1572
|
+
display_params_tested(*comprParams);
|
|
1573
|
+
memset(&bResult, 0, sizeof(bResult));
|
|
1574
|
+
|
|
1575
|
+
/* warming up memory */
|
|
1576
|
+
for (i = 0; i < buf.nbBlocks; i++) {
|
|
1577
|
+
if (mode != BMK_decodeOnly) {
|
|
1578
|
+
RDG_genBuffer(dstPtrs[i], dstCapacities[i], 0.10, 0.50, 1);
|
|
1579
|
+
} else {
|
|
1580
|
+
RDG_genBuffer(resPtrs[i], resSizes[i], 0.10, 0.50, 1);
|
|
1581
|
+
}
|
|
1582
|
+
}
|
|
1583
|
+
|
|
1584
|
+
/* Bench */
|
|
1585
|
+
{
|
|
1586
|
+
/* init args */
|
|
1587
|
+
int compressionCompleted = (mode == BMK_decodeOnly);
|
|
1588
|
+
int decompressionCompleted = (mode == BMK_compressOnly);
|
|
1589
|
+
BMK_timedFnState_t* timeStateCompress = BMK_createTimedFnState(nbSeconds * 1000, 1000);
|
|
1590
|
+
BMK_timedFnState_t* timeStateDecompress = BMK_createTimedFnState(nbSeconds * 1000, 1000);
|
|
1591
|
+
BMK_benchParams_t cbp, dbp;
|
|
1592
|
+
BMK_initCCtxArgs cctxprep;
|
|
1593
|
+
BMK_initDCtxArgs dctxprep;
|
|
1594
|
+
|
|
1595
|
+
cbp.benchFn = local_defaultCompress;
|
|
1596
|
+
cbp.benchPayload = cctx;
|
|
1597
|
+
cbp.initFn = local_initCCtx;
|
|
1598
|
+
cbp.initPayload = &cctxprep;
|
|
1599
|
+
cbp.errorFn = ZSTD_isError;
|
|
1600
|
+
cbp.blockCount = nbBlocks;
|
|
1601
|
+
cbp.srcBuffers = srcPtrs;
|
|
1602
|
+
cbp.srcSizes = srcSizes;
|
|
1603
|
+
cbp.dstBuffers = dstPtrs;
|
|
1604
|
+
cbp.dstCapacities = dstCapacities;
|
|
1605
|
+
cbp.blockResults = dstSizes;
|
|
1606
|
+
|
|
1607
|
+
cctxprep.cctx = cctx;
|
|
1608
|
+
cctxprep.dictBuffer = dictBuffer;
|
|
1609
|
+
cctxprep.dictBufferSize = dictBufferSize;
|
|
1610
|
+
cctxprep.cLevel = cLevel;
|
|
1611
|
+
cctxprep.comprParams = comprParams;
|
|
1612
|
+
|
|
1613
|
+
dbp.benchFn = local_defaultDecompress;
|
|
1614
|
+
dbp.benchPayload = dctx;
|
|
1615
|
+
dbp.initFn = local_initDCtx;
|
|
1616
|
+
dbp.initPayload = &dctxprep;
|
|
1617
|
+
dbp.errorFn = ZSTD_isError;
|
|
1618
|
+
dbp.blockCount = nbBlocks;
|
|
1619
|
+
dbp.srcBuffers = (const void* const *) dstPtrs;
|
|
1620
|
+
dbp.srcSizes = dstCapacities;
|
|
1621
|
+
dbp.dstBuffers = resPtrs;
|
|
1622
|
+
dbp.dstCapacities = resSizes;
|
|
1623
|
+
dbp.blockResults = NULL;
|
|
1624
|
+
|
|
1625
|
+
dctxprep.dctx = dctx;
|
|
1626
|
+
dctxprep.dictBuffer = dictBuffer;
|
|
1627
|
+
dctxprep.dictBufferSize = dictBufferSize;
|
|
1628
|
+
|
|
1629
|
+
assert(timeStateCompress != NULL);
|
|
1630
|
+
assert(timeStateDecompress != NULL);
|
|
1631
|
+
while(!compressionCompleted) {
|
|
1632
|
+
BMK_runOutcome_t const cOutcome = BMK_benchTimedFn(timeStateCompress, cbp);
|
|
1633
|
+
|
|
1634
|
+
if (!BMK_isSuccessful_runOutcome(cOutcome)) {
|
|
1635
|
+
BMK_benchOutcome_t bOut;
|
|
1636
|
+
memset(&bOut, 0, sizeof(bOut));
|
|
1637
|
+
bOut.tag = 1; /* should rather be a function or a constant */
|
|
1638
|
+
BMK_freeTimedFnState(timeStateCompress);
|
|
1639
|
+
BMK_freeTimedFnState(timeStateDecompress);
|
|
1640
|
+
return bOut;
|
|
1641
|
+
}
|
|
1642
|
+
{ BMK_runTime_t const rResult = BMK_extract_runTime(cOutcome);
|
|
1643
|
+
bResult.cSpeed = (unsigned long long)((double)srcSize * TIMELOOP_NANOSEC / rResult.nanoSecPerRun);
|
|
1644
|
+
bResult.cSize = rResult.sumOfReturn;
|
|
1645
|
+
}
|
|
1646
|
+
compressionCompleted = BMK_isCompleted_TimedFn(timeStateCompress);
|
|
1647
|
+
}
|
|
1648
|
+
|
|
1649
|
+
while (!decompressionCompleted) {
|
|
1650
|
+
BMK_runOutcome_t const dOutcome = BMK_benchTimedFn(timeStateDecompress, dbp);
|
|
1651
|
+
|
|
1652
|
+
if (!BMK_isSuccessful_runOutcome(dOutcome)) {
|
|
1653
|
+
BMK_benchOutcome_t bOut;
|
|
1654
|
+
memset(&bOut, 0, sizeof(bOut));
|
|
1655
|
+
bOut.tag = 1; /* should rather be a function or a constant */
|
|
1656
|
+
BMK_freeTimedFnState(timeStateCompress);
|
|
1657
|
+
BMK_freeTimedFnState(timeStateDecompress);
|
|
1658
|
+
return bOut;
|
|
1659
|
+
}
|
|
1660
|
+
{ BMK_runTime_t const rResult = BMK_extract_runTime(dOutcome);
|
|
1661
|
+
bResult.dSpeed = (unsigned long long)((double)srcSize * TIMELOOP_NANOSEC / rResult.nanoSecPerRun);
|
|
1662
|
+
}
|
|
1663
|
+
decompressionCompleted = BMK_isCompleted_TimedFn(timeStateDecompress);
|
|
1664
|
+
}
|
|
1665
|
+
|
|
1666
|
+
BMK_freeTimedFnState(timeStateCompress);
|
|
1667
|
+
BMK_freeTimedFnState(timeStateDecompress);
|
|
1668
|
+
}
|
|
1669
|
+
|
|
1670
|
+
/* Bench */
|
|
1671
|
+
bResult.cMem = ((size_t)1 << (comprParams->vals[wlog_ind])) + ZSTD_sizeof_CCtx(cctx);
|
|
1672
|
+
|
|
1673
|
+
{ BMK_benchOutcome_t bOut;
|
|
1674
|
+
bOut.tag = 0;
|
|
1675
|
+
bOut.internal_never_use_directly = bResult; /* should be a function */
|
|
1676
|
+
return bOut;
|
|
1677
|
+
}
|
|
1678
|
+
}
|
|
1679
|
+
|
|
1680
|
+
/* BMK_benchParam() :
|
|
1681
|
+
* benchmark a set of `cParams` over sample `buf`,
|
|
1682
|
+
* store the result in `resultPtr`.
|
|
1683
|
+
* @return : 0 if success, 1 if error */
|
|
1684
|
+
static int BMK_benchParam ( BMK_benchResult_t* resultPtr,
|
|
1685
|
+
buffers_t buf, contexts_t ctx,
|
|
1686
|
+
paramValues_t cParams)
|
|
1687
|
+
{
|
|
1688
|
+
BMK_benchOutcome_t const outcome = BMK_benchMemInvertible(buf, ctx,
|
|
1689
|
+
BASE_CLEVEL, &cParams,
|
|
1690
|
+
BMK_both, 3);
|
|
1691
|
+
if (!BMK_isSuccessful_benchOutcome(outcome)) return 1;
|
|
1692
|
+
*resultPtr = BMK_extract_benchResult(outcome);
|
|
1693
|
+
return 0;
|
|
1694
|
+
}
|
|
1695
|
+
|
|
1696
|
+
|
|
1697
|
+
/* Benchmarking which stops when we are sufficiently sure the solution is infeasible / worse than the winner */
|
|
1698
|
+
#define VARIANCE 1.2
|
|
1699
|
+
static int allBench(BMK_benchResult_t* resultPtr,
|
|
1700
|
+
const buffers_t buf, const contexts_t ctx,
|
|
1701
|
+
const paramValues_t cParams,
|
|
1702
|
+
const constraint_t target,
|
|
1703
|
+
BMK_benchResult_t* winnerResult, int feas)
|
|
1704
|
+
{
|
|
1705
|
+
BMK_benchResult_t benchres;
|
|
1706
|
+
double uncertaintyConstantC = 3., uncertaintyConstantD = 3.;
|
|
1707
|
+
double winnerRS;
|
|
1708
|
+
|
|
1709
|
+
BMK_benchOutcome_t const outcome = BMK_benchMemInvertible(buf, ctx, BASE_CLEVEL, &cParams, BMK_both, 2);
|
|
1710
|
+
if (!BMK_isSuccessful_benchOutcome(outcome)) {
|
|
1711
|
+
DEBUGOUTPUT("Benchmarking failed \n");
|
|
1712
|
+
return ERROR_RESULT;
|
|
1713
|
+
}
|
|
1714
|
+
benchres = BMK_extract_benchResult(outcome);
|
|
1715
|
+
|
|
1716
|
+
winnerRS = resultScore(*winnerResult, buf.srcSize, target);
|
|
1717
|
+
DEBUGOUTPUT("WinnerScore: %f \n ", winnerRS);
|
|
1718
|
+
|
|
1719
|
+
*resultPtr = benchres;
|
|
1720
|
+
|
|
1721
|
+
/* anything with worse ratio in feas is definitely worse, discard */
|
|
1722
|
+
if(feas && benchres.cSize < winnerResult->cSize && !g_optmode) {
|
|
1723
|
+
return WORSE_RESULT;
|
|
1724
|
+
}
|
|
1725
|
+
|
|
1726
|
+
/* calculate uncertainty in compression / decompression runs */
|
|
1727
|
+
if (benchres.cSpeed) {
|
|
1728
|
+
double const loopDurationC = (double)(((U64)buf.srcSize * TIMELOOP_NANOSEC) / benchres.cSpeed);
|
|
1729
|
+
uncertaintyConstantC = ((loopDurationC + (double)(2 * g_clockGranularity))/loopDurationC);
|
|
1730
|
+
}
|
|
1731
|
+
|
|
1732
|
+
if (benchres.dSpeed) {
|
|
1733
|
+
double const loopDurationD = (double)(((U64)buf.srcSize * TIMELOOP_NANOSEC) / benchres.dSpeed);
|
|
1734
|
+
uncertaintyConstantD = ((loopDurationD + (double)(2 * g_clockGranularity))/loopDurationD);
|
|
1735
|
+
}
|
|
1736
|
+
|
|
1737
|
+
/* optimistic assumption of benchres */
|
|
1738
|
+
{ BMK_benchResult_t resultMax = benchres;
|
|
1739
|
+
resultMax.cSpeed = (unsigned long long)((double)resultMax.cSpeed * uncertaintyConstantC * VARIANCE);
|
|
1740
|
+
resultMax.dSpeed = (unsigned long long)((double)resultMax.dSpeed * uncertaintyConstantD * VARIANCE);
|
|
1741
|
+
|
|
1742
|
+
/* disregard infeasible results in feas mode */
|
|
1743
|
+
/* disregard if resultMax < winner in infeas mode */
|
|
1744
|
+
if((feas && !feasible(resultMax, target)) ||
|
|
1745
|
+
(!feas && (winnerRS > resultScore(resultMax, buf.srcSize, target)))) {
|
|
1746
|
+
return WORSE_RESULT;
|
|
1747
|
+
}
|
|
1748
|
+
}
|
|
1749
|
+
|
|
1750
|
+
/* compare by resultScore when in infeas */
|
|
1751
|
+
/* compare by compareResultLT when in feas */
|
|
1752
|
+
if((!feas && (resultScore(benchres, buf.srcSize, target) > resultScore(*winnerResult, buf.srcSize, target))) ||
|
|
1753
|
+
(feas && (compareResultLT(*winnerResult, benchres, target, buf.srcSize))) ) {
|
|
1754
|
+
return BETTER_RESULT;
|
|
1755
|
+
} else {
|
|
1756
|
+
return WORSE_RESULT;
|
|
1757
|
+
}
|
|
1758
|
+
}
|
|
1759
|
+
|
|
1760
|
+
|
|
1761
|
+
#define INFEASIBLE_THRESHOLD 200
|
|
1762
|
+
/* Memoized benchmarking, won't benchmark anything which has already been benchmarked before. */
|
|
1763
|
+
static int benchMemo(BMK_benchResult_t* resultPtr,
|
|
1764
|
+
const buffers_t buf, const contexts_t ctx,
|
|
1765
|
+
const paramValues_t cParams,
|
|
1766
|
+
const constraint_t target,
|
|
1767
|
+
BMK_benchResult_t* winnerResult, memoTable_t* const memoTableArray,
|
|
1768
|
+
const int feas) {
|
|
1769
|
+
static int bmcount = 0;
|
|
1770
|
+
int res;
|
|
1771
|
+
|
|
1772
|
+
if ( memoTableGet(memoTableArray, cParams) >= INFEASIBLE_THRESHOLD
|
|
1773
|
+
|| redundantParams(cParams, target, buf.maxBlockSize) ) {
|
|
1774
|
+
return WORSE_RESULT;
|
|
1775
|
+
}
|
|
1776
|
+
|
|
1777
|
+
res = allBench(resultPtr, buf, ctx, cParams, target, winnerResult, feas);
|
|
1778
|
+
|
|
1779
|
+
if(DEBUG && !(bmcount % 250)) {
|
|
1780
|
+
DISPLAY("Count: %d\n", bmcount);
|
|
1781
|
+
bmcount++;
|
|
1782
|
+
}
|
|
1783
|
+
BMK_printWinnerOpt(stdout, CUSTOM_LEVEL, *resultPtr, cParams, target, buf.srcSize);
|
|
1784
|
+
|
|
1785
|
+
if(res == BETTER_RESULT || feas) {
|
|
1786
|
+
memoTableSet(memoTableArray, cParams, 255); /* what happens if collisions are frequent */
|
|
1787
|
+
}
|
|
1788
|
+
return res;
|
|
1789
|
+
}
|
|
1790
|
+
|
|
1791
|
+
|
|
1792
|
+
typedef struct {
|
|
1793
|
+
U64 cSpeed_min;
|
|
1794
|
+
U64 dSpeed_min;
|
|
1795
|
+
U32 windowLog_max;
|
|
1796
|
+
ZSTD_strategy strategy_max;
|
|
1797
|
+
} level_constraints_t;
|
|
1798
|
+
|
|
1799
|
+
static level_constraints_t g_level_constraint[NB_LEVELS_TRACKED+1];
|
|
1800
|
+
|
|
1801
|
+
static void BMK_init_level_constraints(int bytePerSec_level1)
|
|
1802
|
+
{
|
|
1803
|
+
assert(NB_LEVELS_TRACKED >= ZSTD_maxCLevel());
|
|
1804
|
+
memset(g_level_constraint, 0, sizeof(g_level_constraint));
|
|
1805
|
+
g_level_constraint[1].cSpeed_min = bytePerSec_level1;
|
|
1806
|
+
g_level_constraint[1].dSpeed_min = 0;
|
|
1807
|
+
g_level_constraint[1].windowLog_max = 19;
|
|
1808
|
+
g_level_constraint[1].strategy_max = ZSTD_fast;
|
|
1809
|
+
|
|
1810
|
+
/* establish speed objectives (relative to level 1) */
|
|
1811
|
+
{ int l;
|
|
1812
|
+
for (l=2; l<=NB_LEVELS_TRACKED; l++) {
|
|
1813
|
+
g_level_constraint[l].cSpeed_min = (g_level_constraint[l-1].cSpeed_min * 49) / 64;
|
|
1814
|
+
g_level_constraint[l].dSpeed_min = 0;
|
|
1815
|
+
g_level_constraint[l].windowLog_max = (l<20) ? 23 : l+5; /* only --ultra levels >= 20 can use windowlog > 23 */
|
|
1816
|
+
g_level_constraint[l].strategy_max = ZSTD_STRATEGY_MAX;
|
|
1817
|
+
} }
|
|
1818
|
+
}
|
|
1819
|
+
|
|
1820
|
+
static int BMK_seed(winnerInfo_t* winners,
|
|
1821
|
+
const paramValues_t params,
|
|
1822
|
+
const buffers_t buf,
|
|
1823
|
+
const contexts_t ctx)
|
|
1824
|
+
{
|
|
1825
|
+
BMK_benchResult_t testResult;
|
|
1826
|
+
int better = 0;
|
|
1827
|
+
int cLevel;
|
|
1828
|
+
|
|
1829
|
+
BMK_benchParam(&testResult, buf, ctx, params);
|
|
1830
|
+
|
|
1831
|
+
for (cLevel = 1; cLevel <= NB_LEVELS_TRACKED; cLevel++) {
|
|
1832
|
+
|
|
1833
|
+
if (testResult.cSpeed < g_level_constraint[cLevel].cSpeed_min)
|
|
1834
|
+
continue; /* not fast enough for this level */
|
|
1835
|
+
if (testResult.dSpeed < g_level_constraint[cLevel].dSpeed_min)
|
|
1836
|
+
continue; /* not fast enough for this level */
|
|
1837
|
+
if (params.vals[wlog_ind] > g_level_constraint[cLevel].windowLog_max)
|
|
1838
|
+
continue; /* too much memory for this level */
|
|
1839
|
+
if (params.vals[strt_ind] > (U32)g_level_constraint[cLevel].strategy_max)
|
|
1840
|
+
continue; /* forbidden strategy for this level */
|
|
1841
|
+
if (winners[cLevel].result.cSize==0) {
|
|
1842
|
+
/* first solution for this cLevel */
|
|
1843
|
+
winners[cLevel].result = testResult;
|
|
1844
|
+
winners[cLevel].params = params;
|
|
1845
|
+
BMK_print_cLevelEntry(stdout, cLevel, params, testResult, buf.srcSize);
|
|
1846
|
+
better = 1;
|
|
1847
|
+
continue;
|
|
1848
|
+
}
|
|
1849
|
+
|
|
1850
|
+
if ((double)testResult.cSize <= ((double)winners[cLevel].result.cSize * (1. + (0.02 / cLevel))) ) {
|
|
1851
|
+
/* Validate solution is "good enough" */
|
|
1852
|
+
double W_ratio = (double)buf.srcSize / (double)testResult.cSize;
|
|
1853
|
+
double O_ratio = (double)buf.srcSize / (double)winners[cLevel].result.cSize;
|
|
1854
|
+
double W_ratioNote = log (W_ratio);
|
|
1855
|
+
double O_ratioNote = log (O_ratio);
|
|
1856
|
+
size_t W_DMemUsed = (1 << params.vals[wlog_ind]) + (16 KB);
|
|
1857
|
+
size_t O_DMemUsed = (1 << winners[cLevel].params.vals[wlog_ind]) + (16 KB);
|
|
1858
|
+
double W_DMemUsed_note = W_ratioNote * ( 40 + 9*cLevel) - log((double)W_DMemUsed);
|
|
1859
|
+
double O_DMemUsed_note = O_ratioNote * ( 40 + 9*cLevel) - log((double)O_DMemUsed);
|
|
1860
|
+
|
|
1861
|
+
size_t W_CMemUsed = ((size_t)1 << params.vals[wlog_ind]) + ZSTD_estimateCCtxSize_usingCParams(pvalsToCParams(params));
|
|
1862
|
+
size_t O_CMemUsed = ((size_t)1 << winners[cLevel].params.vals[wlog_ind]) + ZSTD_estimateCCtxSize_usingCParams(pvalsToCParams(winners[cLevel].params));
|
|
1863
|
+
double W_CMemUsed_note = W_ratioNote * ( 50 + 13*cLevel) - log((double)W_CMemUsed);
|
|
1864
|
+
double O_CMemUsed_note = O_ratioNote * ( 50 + 13*cLevel) - log((double)O_CMemUsed);
|
|
1865
|
+
|
|
1866
|
+
double W_CSpeed_note = W_ratioNote * (double)( 30 + 10*cLevel) + log((double)testResult.cSpeed);
|
|
1867
|
+
double O_CSpeed_note = O_ratioNote * (double)( 30 + 10*cLevel) + log((double)winners[cLevel].result.cSpeed);
|
|
1868
|
+
|
|
1869
|
+
double W_DSpeed_note = W_ratioNote * (double)( 20 + 2*cLevel) + log((double)testResult.dSpeed);
|
|
1870
|
+
double O_DSpeed_note = O_ratioNote * (double)( 20 + 2*cLevel) + log((double)winners[cLevel].result.dSpeed);
|
|
1871
|
+
|
|
1872
|
+
if (W_DMemUsed_note < O_DMemUsed_note) {
|
|
1873
|
+
/* uses too much Decompression memory for too little benefit */
|
|
1874
|
+
if (W_ratio > O_ratio)
|
|
1875
|
+
DISPLAYLEVEL(3, "Decompression Memory : %5.3f @ %4.1f MB vs %5.3f @ %4.1f MB : not enough for level %i\n",
|
|
1876
|
+
W_ratio, (double)(W_DMemUsed) / 1024 / 1024,
|
|
1877
|
+
O_ratio, (double)(O_DMemUsed) / 1024 / 1024, cLevel);
|
|
1878
|
+
continue;
|
|
1879
|
+
}
|
|
1880
|
+
if (W_CMemUsed_note < O_CMemUsed_note) {
|
|
1881
|
+
/* uses too much memory for compression for too little benefit */
|
|
1882
|
+
if (W_ratio > O_ratio)
|
|
1883
|
+
DISPLAYLEVEL(3, "Compression Memory : %5.3f @ %4.1f MB vs %5.3f @ %4.1f MB : not enough for level %i\n",
|
|
1884
|
+
W_ratio, (double)(W_CMemUsed) / 1024 / 1024,
|
|
1885
|
+
O_ratio, (double)(O_CMemUsed) / 1024 / 1024,
|
|
1886
|
+
cLevel);
|
|
1887
|
+
continue;
|
|
1888
|
+
}
|
|
1889
|
+
if (W_CSpeed_note < O_CSpeed_note ) {
|
|
1890
|
+
/* too large compression speed difference for the compression benefit */
|
|
1891
|
+
if (W_ratio > O_ratio)
|
|
1892
|
+
DISPLAYLEVEL(3, "Compression Speed : %5.3f @ %4.1f MB/s vs %5.3f @ %4.1f MB/s : not enough for level %i\n",
|
|
1893
|
+
W_ratio, (double)testResult.cSpeed / MB_UNIT,
|
|
1894
|
+
O_ratio, (double)winners[cLevel].result.cSpeed / MB_UNIT,
|
|
1895
|
+
cLevel);
|
|
1896
|
+
continue;
|
|
1897
|
+
}
|
|
1898
|
+
if (W_DSpeed_note < O_DSpeed_note ) {
|
|
1899
|
+
/* too large decompression speed difference for the compression benefit */
|
|
1900
|
+
if (W_ratio > O_ratio)
|
|
1901
|
+
DISPLAYLEVEL(3, "Decompression Speed : %5.3f @ %4.1f MB/s vs %5.3f @ %4.1f MB/s : not enough for level %i\n",
|
|
1902
|
+
W_ratio, (double)testResult.dSpeed / MB_UNIT,
|
|
1903
|
+
O_ratio, (double)winners[cLevel].result.dSpeed / MB_UNIT,
|
|
1904
|
+
cLevel);
|
|
1905
|
+
continue;
|
|
1906
|
+
}
|
|
1907
|
+
|
|
1908
|
+
if (W_ratio < O_ratio)
|
|
1909
|
+
DISPLAYLEVEL(3, "Solution %4.3f selected over %4.3f at level %i, due to better secondary statistics \n",
|
|
1910
|
+
W_ratio, O_ratio, cLevel);
|
|
1911
|
+
|
|
1912
|
+
winners[cLevel].result = testResult;
|
|
1913
|
+
winners[cLevel].params = params;
|
|
1914
|
+
BMK_print_cLevelEntry(stdout, cLevel, params, testResult, buf.srcSize);
|
|
1915
|
+
|
|
1916
|
+
better = 1;
|
|
1917
|
+
} }
|
|
1918
|
+
|
|
1919
|
+
return better;
|
|
1920
|
+
}
|
|
1921
|
+
|
|
1922
|
+
/*-************************************
|
|
1923
|
+
* Compression Level Table Generation Functions
|
|
1924
|
+
**************************************/
|
|
1925
|
+
|
|
1926
|
+
#define PARAMTABLELOG 25
|
|
1927
|
+
#define PARAMTABLESIZE (1<<PARAMTABLELOG)
|
|
1928
|
+
#define PARAMTABLEMASK (PARAMTABLESIZE-1)
|
|
1929
|
+
static BYTE g_alreadyTested[PARAMTABLESIZE] = {0}; /* init to zero */
|
|
1930
|
+
|
|
1931
|
+
static BYTE* NB_TESTS_PLAYED(paramValues_t p)
|
|
1932
|
+
{
|
|
1933
|
+
ZSTD_compressionParameters const cParams = pvalsToCParams(sanitizeParams(p));
|
|
1934
|
+
unsigned long long const h64 = XXH64(&cParams, sizeof(cParams), 0);
|
|
1935
|
+
return &g_alreadyTested[(h64 >> 3) & PARAMTABLEMASK];
|
|
1936
|
+
}
|
|
1937
|
+
|
|
1938
|
+
static void playAround(FILE* f,
|
|
1939
|
+
winnerInfo_t* winners,
|
|
1940
|
+
paramValues_t p,
|
|
1941
|
+
const buffers_t buf, const contexts_t ctx)
|
|
1942
|
+
{
|
|
1943
|
+
int nbVariations = 0;
|
|
1944
|
+
UTIL_time_t const clockStart = UTIL_getTime();
|
|
1945
|
+
|
|
1946
|
+
while (UTIL_clockSpanMicro(clockStart) < g_maxVariationTime) {
|
|
1947
|
+
if (nbVariations++ > g_maxNbVariations) break;
|
|
1948
|
+
|
|
1949
|
+
do {
|
|
1950
|
+
int i;
|
|
1951
|
+
for(i = 0; i < 4; i++) {
|
|
1952
|
+
paramVaryOnce(FUZ_rand(&g_rand) % (strt_ind + 1),
|
|
1953
|
+
((FUZ_rand(&g_rand) & 1) << 1) - 1,
|
|
1954
|
+
&p);
|
|
1955
|
+
}
|
|
1956
|
+
} while (!paramValid(p));
|
|
1957
|
+
|
|
1958
|
+
/* exclude faster if already played params */
|
|
1959
|
+
if (FUZ_rand(&g_rand) & ((1 << *NB_TESTS_PLAYED(p))-1))
|
|
1960
|
+
continue;
|
|
1961
|
+
|
|
1962
|
+
/* test */
|
|
1963
|
+
{ BYTE* const b = NB_TESTS_PLAYED(p);
|
|
1964
|
+
(*b)++;
|
|
1965
|
+
}
|
|
1966
|
+
if (!BMK_seed(winners, p, buf, ctx)) continue;
|
|
1967
|
+
|
|
1968
|
+
/* improvement found => search more */
|
|
1969
|
+
BMK_saveAndPrint_cLevelTable(f, winners, buf.srcSize);
|
|
1970
|
+
playAround(f, winners, p, buf, ctx);
|
|
1971
|
+
}
|
|
1972
|
+
|
|
1973
|
+
}
|
|
1974
|
+
|
|
1975
|
+
static void
|
|
1976
|
+
BMK_selectRandomStart( FILE* f,
|
|
1977
|
+
winnerInfo_t* winners,
|
|
1978
|
+
const buffers_t buf, const contexts_t ctx)
|
|
1979
|
+
{
|
|
1980
|
+
U32 const id = FUZ_rand(&g_rand) % (NB_LEVELS_TRACKED+1);
|
|
1981
|
+
if ((id==0) || (winners[id].params.vals[wlog_ind]==0)) {
|
|
1982
|
+
/* use some random entry */
|
|
1983
|
+
paramValues_t const p = adjustParams(cParamsToPVals(pvalsToCParams(randomParams())), /* defaults nonCompression parameters */
|
|
1984
|
+
buf.srcSize, 0);
|
|
1985
|
+
playAround(f, winners, p, buf, ctx);
|
|
1986
|
+
} else {
|
|
1987
|
+
playAround(f, winners, winners[id].params, buf, ctx);
|
|
1988
|
+
}
|
|
1989
|
+
}
|
|
1990
|
+
|
|
1991
|
+
|
|
1992
|
+
/* BMK_generate_cLevelTable() :
|
|
1993
|
+
* test a large number of configurations
|
|
1994
|
+
* and distribute them across compression levels according to speed conditions.
|
|
1995
|
+
* display and save all intermediate results into rfName = "grillResults.txt".
|
|
1996
|
+
* the function automatically stops after g_timeLimit_s.
|
|
1997
|
+
* this function cannot error, it directly exit() in case of problem.
|
|
1998
|
+
*/
|
|
1999
|
+
static void BMK_generate_cLevelTable(const buffers_t buf, const contexts_t ctx)
|
|
2000
|
+
{
|
|
2001
|
+
paramValues_t params;
|
|
2002
|
+
winnerInfo_t winners[NB_LEVELS_TRACKED+1];
|
|
2003
|
+
const char* const rfName = "grillResults.txt";
|
|
2004
|
+
FILE* const f = fopen(rfName, "w");
|
|
2005
|
+
|
|
2006
|
+
/* init */
|
|
2007
|
+
assert(g_singleRun==0);
|
|
2008
|
+
memset(winners, 0, sizeof(winners));
|
|
2009
|
+
if (f==NULL) { DISPLAY("error opening %s \n", rfName); exit(1); }
|
|
2010
|
+
|
|
2011
|
+
if (g_target) {
|
|
2012
|
+
BMK_init_level_constraints(g_target * MB_UNIT);
|
|
2013
|
+
} else {
|
|
2014
|
+
/* baseline config for level 1 */
|
|
2015
|
+
paramValues_t const l1params = cParamsToPVals(ZSTD_getCParams(1, buf.maxBlockSize, ctx.dictSize));
|
|
2016
|
+
BMK_benchResult_t testResult;
|
|
2017
|
+
BMK_benchParam(&testResult, buf, ctx, l1params);
|
|
2018
|
+
BMK_init_level_constraints((int)((testResult.cSpeed * 31) / 32));
|
|
2019
|
+
}
|
|
2020
|
+
|
|
2021
|
+
/* populate initial solution */
|
|
2022
|
+
{ const int maxSeeds = g_noSeed ? 1 : ZSTD_maxCLevel();
|
|
2023
|
+
int i;
|
|
2024
|
+
for (i=0; i<=maxSeeds; i++) {
|
|
2025
|
+
params = cParamsToPVals(ZSTD_getCParams(i, buf.maxBlockSize, 0));
|
|
2026
|
+
BMK_seed(winners, params, buf, ctx);
|
|
2027
|
+
} }
|
|
2028
|
+
BMK_saveAndPrint_cLevelTable(f, winners, buf.srcSize);
|
|
2029
|
+
|
|
2030
|
+
/* start tests */
|
|
2031
|
+
{ const UTIL_time_t grillStart = UTIL_getTime();
|
|
2032
|
+
do {
|
|
2033
|
+
BMK_selectRandomStart(f, winners, buf, ctx);
|
|
2034
|
+
} while (BMK_timeSpan_s(grillStart) < g_timeLimit_s);
|
|
2035
|
+
}
|
|
2036
|
+
|
|
2037
|
+
/* end summary */
|
|
2038
|
+
BMK_saveAndPrint_cLevelTable(f, winners, buf.srcSize);
|
|
2039
|
+
DISPLAY("grillParams operations completed \n");
|
|
2040
|
+
|
|
2041
|
+
/* clean up*/
|
|
2042
|
+
fclose(f);
|
|
2043
|
+
}
|
|
2044
|
+
|
|
2045
|
+
|
|
2046
|
+
/*-************************************
|
|
2047
|
+
* Single Benchmark Functions
|
|
2048
|
+
**************************************/
|
|
2049
|
+
|
|
2050
|
+
static int
|
|
2051
|
+
benchOnce(const buffers_t buf, const contexts_t ctx, const int cLevel)
|
|
2052
|
+
{
|
|
2053
|
+
BMK_benchResult_t testResult;
|
|
2054
|
+
g_params = adjustParams(overwriteParams(cParamsToPVals(ZSTD_getCParams(cLevel, buf.maxBlockSize, ctx.dictSize)), g_params), buf.maxBlockSize, ctx.dictSize);
|
|
2055
|
+
|
|
2056
|
+
if (BMK_benchParam(&testResult, buf, ctx, g_params)) {
|
|
2057
|
+
DISPLAY("Error during benchmarking\n");
|
|
2058
|
+
return 1;
|
|
2059
|
+
}
|
|
2060
|
+
|
|
2061
|
+
BMK_printWinner(stdout, CUSTOM_LEVEL, testResult, g_params, buf.srcSize);
|
|
2062
|
+
|
|
2063
|
+
return 0;
|
|
2064
|
+
}
|
|
2065
|
+
|
|
2066
|
+
static int benchSample(double compressibility, int cLevel)
|
|
2067
|
+
{
|
|
2068
|
+
const char* const name = "Sample 10MB";
|
|
2069
|
+
size_t const benchedSize = 10 MB;
|
|
2070
|
+
void* const srcBuffer = malloc(benchedSize);
|
|
2071
|
+
int ret = 0;
|
|
2072
|
+
|
|
2073
|
+
buffers_t buf;
|
|
2074
|
+
contexts_t ctx;
|
|
2075
|
+
|
|
2076
|
+
if(srcBuffer == NULL) {
|
|
2077
|
+
DISPLAY("Out of Memory\n");
|
|
2078
|
+
return 2;
|
|
2079
|
+
}
|
|
2080
|
+
|
|
2081
|
+
RDG_genBuffer(srcBuffer, benchedSize, compressibility, 0.0, 0);
|
|
2082
|
+
|
|
2083
|
+
if(createBuffersFromMemory(&buf, srcBuffer, 1, &benchedSize)) {
|
|
2084
|
+
DISPLAY("Buffer Creation Error\n");
|
|
2085
|
+
free(srcBuffer);
|
|
2086
|
+
return 3;
|
|
2087
|
+
}
|
|
2088
|
+
|
|
2089
|
+
if(createContexts(&ctx, NULL)) {
|
|
2090
|
+
DISPLAY("Context Creation Error\n");
|
|
2091
|
+
freeBuffers(buf);
|
|
2092
|
+
return 1;
|
|
2093
|
+
}
|
|
2094
|
+
|
|
2095
|
+
/* bench */
|
|
2096
|
+
DISPLAY("\r%79s\r", "");
|
|
2097
|
+
DISPLAY("using %s %i%%: \n", name, (int)(compressibility*100));
|
|
2098
|
+
|
|
2099
|
+
if(g_singleRun) {
|
|
2100
|
+
ret = benchOnce(buf, ctx, cLevel);
|
|
2101
|
+
} else {
|
|
2102
|
+
BMK_generate_cLevelTable(buf, ctx);
|
|
2103
|
+
}
|
|
2104
|
+
|
|
2105
|
+
freeBuffers(buf);
|
|
2106
|
+
freeContexts(ctx);
|
|
2107
|
+
|
|
2108
|
+
return ret;
|
|
2109
|
+
}
|
|
2110
|
+
|
|
2111
|
+
/* benchFiles() :
|
|
2112
|
+
* note: while this function takes a table of filenames,
|
|
2113
|
+
* in practice, only the first filename will be used */
|
|
2114
|
+
static int benchFiles(const char** fileNamesTable, int nbFiles,
|
|
2115
|
+
const char* dictFileName, int cLevel)
|
|
2116
|
+
{
|
|
2117
|
+
buffers_t buf;
|
|
2118
|
+
contexts_t ctx;
|
|
2119
|
+
int ret = 0;
|
|
2120
|
+
|
|
2121
|
+
if (createBuffers(&buf, fileNamesTable, nbFiles)) {
|
|
2122
|
+
DISPLAY("unable to load files\n");
|
|
2123
|
+
return 1;
|
|
2124
|
+
}
|
|
2125
|
+
|
|
2126
|
+
if (createContexts(&ctx, dictFileName)) {
|
|
2127
|
+
DISPLAY("unable to load dictionary\n");
|
|
2128
|
+
freeBuffers(buf);
|
|
2129
|
+
return 2;
|
|
2130
|
+
}
|
|
2131
|
+
|
|
2132
|
+
DISPLAY("\r%79s\r", "");
|
|
2133
|
+
if (nbFiles == 1) {
|
|
2134
|
+
DISPLAY("using %s : \n", fileNamesTable[0]);
|
|
2135
|
+
} else {
|
|
2136
|
+
DISPLAY("using %d Files : \n", nbFiles);
|
|
2137
|
+
}
|
|
2138
|
+
|
|
2139
|
+
if (g_singleRun) {
|
|
2140
|
+
ret = benchOnce(buf, ctx, cLevel);
|
|
2141
|
+
} else {
|
|
2142
|
+
BMK_generate_cLevelTable(buf, ctx);
|
|
2143
|
+
}
|
|
2144
|
+
|
|
2145
|
+
freeBuffers(buf);
|
|
2146
|
+
freeContexts(ctx);
|
|
2147
|
+
return ret;
|
|
2148
|
+
}
|
|
2149
|
+
|
|
2150
|
+
|
|
2151
|
+
/*-************************************
|
|
2152
|
+
* Local Optimization Functions
|
|
2153
|
+
**************************************/
|
|
2154
|
+
|
|
2155
|
+
/* One iteration of hill climbing. Specifically, it first tries all
|
|
2156
|
+
* valid parameter configurations w/ manhattan distance 1 and picks the best one
|
|
2157
|
+
* failing that, it progressively tries candidates further and further away (up to #dim + 2)
|
|
2158
|
+
* if it finds a candidate exceeding winnerInfo, it will repeat. Otherwise, it will stop the
|
|
2159
|
+
* current stage of hill climbing.
|
|
2160
|
+
* Each iteration of hill climbing proceeds in 2 'phases'. Phase 1 climbs according to
|
|
2161
|
+
* the resultScore function, which is effectively a linear increase in reward until it reaches
|
|
2162
|
+
* the constraint-satisfying value, it which point any excess results in only logarithmic reward.
|
|
2163
|
+
* This aims to find some constraint-satisfying point.
|
|
2164
|
+
* Phase 2 optimizes in accordance with what the original function sets out to maximize, with
|
|
2165
|
+
* all feasible solutions valued over all infeasible solutions.
|
|
2166
|
+
*/
|
|
2167
|
+
|
|
2168
|
+
/* sanitize all params here.
|
|
2169
|
+
* all generation after random should be sanitized. (maybe sanitize random)
|
|
2170
|
+
*/
|
|
2171
|
+
static winnerInfo_t climbOnce(const constraint_t target,
|
|
2172
|
+
memoTable_t* mtAll,
|
|
2173
|
+
const buffers_t buf, const contexts_t ctx,
|
|
2174
|
+
const paramValues_t init)
|
|
2175
|
+
{
|
|
2176
|
+
/*
|
|
2177
|
+
* cparam - currently considered 'center'
|
|
2178
|
+
* candidate - params to benchmark/results
|
|
2179
|
+
* winner - best option found so far.
|
|
2180
|
+
*/
|
|
2181
|
+
paramValues_t cparam = init;
|
|
2182
|
+
winnerInfo_t candidateInfo, winnerInfo;
|
|
2183
|
+
int better = 1;
|
|
2184
|
+
int feas = 0;
|
|
2185
|
+
|
|
2186
|
+
winnerInfo = initWinnerInfo(init);
|
|
2187
|
+
candidateInfo = winnerInfo;
|
|
2188
|
+
|
|
2189
|
+
{ winnerInfo_t bestFeasible1 = initWinnerInfo(cparam);
|
|
2190
|
+
DEBUGOUTPUT("Climb Part 1\n");
|
|
2191
|
+
while(better) {
|
|
2192
|
+
int offset;
|
|
2193
|
+
size_t i, dist;
|
|
2194
|
+
const size_t varLen = mtAll[cparam.vals[strt_ind]].varLen;
|
|
2195
|
+
better = 0;
|
|
2196
|
+
DEBUGOUTPUT("Start\n");
|
|
2197
|
+
cparam = winnerInfo.params;
|
|
2198
|
+
candidateInfo.params = cparam;
|
|
2199
|
+
/* all dist-1 candidates */
|
|
2200
|
+
for (i = 0; i < varLen; i++) {
|
|
2201
|
+
for (offset = -1; offset <= 1; offset += 2) {
|
|
2202
|
+
CHECKTIME(winnerInfo);
|
|
2203
|
+
candidateInfo.params = cparam;
|
|
2204
|
+
paramVaryOnce(mtAll[cparam.vals[strt_ind]].varArray[i],
|
|
2205
|
+
offset,
|
|
2206
|
+
&candidateInfo.params);
|
|
2207
|
+
|
|
2208
|
+
if(paramValid(candidateInfo.params)) {
|
|
2209
|
+
int res;
|
|
2210
|
+
res = benchMemo(&candidateInfo.result, buf, ctx,
|
|
2211
|
+
sanitizeParams(candidateInfo.params), target, &winnerInfo.result, mtAll, feas);
|
|
2212
|
+
DEBUGOUTPUT("Res: %d\n", res);
|
|
2213
|
+
if(res == BETTER_RESULT) { /* synonymous with better when called w/ infeasibleBM */
|
|
2214
|
+
winnerInfo = candidateInfo;
|
|
2215
|
+
better = 1;
|
|
2216
|
+
if(compareResultLT(bestFeasible1.result, winnerInfo.result, target, buf.srcSize)) {
|
|
2217
|
+
bestFeasible1 = winnerInfo;
|
|
2218
|
+
}
|
|
2219
|
+
}
|
|
2220
|
+
}
|
|
2221
|
+
} /* for (offset = -1; offset <= 1; offset += 2) */
|
|
2222
|
+
} /* for (i = 0; i < varLen; i++) */
|
|
2223
|
+
|
|
2224
|
+
if(better) {
|
|
2225
|
+
continue;
|
|
2226
|
+
}
|
|
2227
|
+
|
|
2228
|
+
for (dist = 2; dist < varLen + 2; dist++) { /* varLen is # dimensions */
|
|
2229
|
+
for (i = 0; i < (1ULL << varLen) / varLen + 2; i++) {
|
|
2230
|
+
int res;
|
|
2231
|
+
CHECKTIME(winnerInfo);
|
|
2232
|
+
candidateInfo.params = cparam;
|
|
2233
|
+
/* param error checking already done here */
|
|
2234
|
+
paramVariation(&candidateInfo.params, mtAll, (U32)dist);
|
|
2235
|
+
|
|
2236
|
+
res = benchMemo(&candidateInfo.result,
|
|
2237
|
+
buf, ctx,
|
|
2238
|
+
sanitizeParams(candidateInfo.params), target,
|
|
2239
|
+
&winnerInfo.result, mtAll, feas);
|
|
2240
|
+
DEBUGOUTPUT("Res: %d\n", res);
|
|
2241
|
+
if (res == BETTER_RESULT) { /* synonymous with better in this case*/
|
|
2242
|
+
winnerInfo = candidateInfo;
|
|
2243
|
+
better = 1;
|
|
2244
|
+
if (compareResultLT(bestFeasible1.result, winnerInfo.result, target, buf.srcSize)) {
|
|
2245
|
+
bestFeasible1 = winnerInfo;
|
|
2246
|
+
}
|
|
2247
|
+
break;
|
|
2248
|
+
}
|
|
2249
|
+
}
|
|
2250
|
+
|
|
2251
|
+
if (better) {
|
|
2252
|
+
break;
|
|
2253
|
+
}
|
|
2254
|
+
} /* for(dist = 2; dist < varLen + 2; dist++) */
|
|
2255
|
+
|
|
2256
|
+
if (!better) { /* infeas -> feas -> stop */
|
|
2257
|
+
if (feas) return winnerInfo;
|
|
2258
|
+
feas = 1;
|
|
2259
|
+
better = 1;
|
|
2260
|
+
winnerInfo = bestFeasible1; /* note with change, bestFeasible may not necessarily be feasible, but if one has been benchmarked, it will be. */
|
|
2261
|
+
DEBUGOUTPUT("Climb Part 2\n");
|
|
2262
|
+
}
|
|
2263
|
+
}
|
|
2264
|
+
winnerInfo = bestFeasible1;
|
|
2265
|
+
}
|
|
2266
|
+
|
|
2267
|
+
return winnerInfo;
|
|
2268
|
+
}
|
|
2269
|
+
|
|
2270
|
+
/* Optimizes for a fixed strategy */
|
|
2271
|
+
|
|
2272
|
+
/* flexible parameters: iterations of failed climbing (or if we do non-random, maybe this is when everything is close to visited)
|
|
2273
|
+
weight more on visit for bad results, less on good results/more on later results / ones with more failures.
|
|
2274
|
+
allocate memoTable here.
|
|
2275
|
+
*/
|
|
2276
|
+
static winnerInfo_t
|
|
2277
|
+
optimizeFixedStrategy(const buffers_t buf, const contexts_t ctx,
|
|
2278
|
+
const constraint_t target, paramValues_t paramTarget,
|
|
2279
|
+
const ZSTD_strategy strat,
|
|
2280
|
+
memoTable_t* memoTableArray, const int tries)
|
|
2281
|
+
{
|
|
2282
|
+
int i = 0;
|
|
2283
|
+
|
|
2284
|
+
paramValues_t init;
|
|
2285
|
+
winnerInfo_t winnerInfo, candidateInfo;
|
|
2286
|
+
winnerInfo = initWinnerInfo(emptyParams());
|
|
2287
|
+
/* so climb is given the right fixed strategy */
|
|
2288
|
+
paramTarget.vals[strt_ind] = strat;
|
|
2289
|
+
/* to pass ZSTD_checkCParams */
|
|
2290
|
+
paramTarget = cParamUnsetMin(paramTarget);
|
|
2291
|
+
|
|
2292
|
+
init = paramTarget;
|
|
2293
|
+
|
|
2294
|
+
for(i = 0; i < tries; i++) {
|
|
2295
|
+
DEBUGOUTPUT("Restart\n");
|
|
2296
|
+
do {
|
|
2297
|
+
randomConstrainedParams(&init, memoTableArray, strat);
|
|
2298
|
+
} while(redundantParams(init, target, buf.maxBlockSize));
|
|
2299
|
+
candidateInfo = climbOnce(target, memoTableArray, buf, ctx, init);
|
|
2300
|
+
if (compareResultLT(winnerInfo.result, candidateInfo.result, target, buf.srcSize)) {
|
|
2301
|
+
winnerInfo = candidateInfo;
|
|
2302
|
+
BMK_printWinnerOpt(stdout, CUSTOM_LEVEL, winnerInfo.result, winnerInfo.params, target, buf.srcSize);
|
|
2303
|
+
i = 0;
|
|
2304
|
+
continue;
|
|
2305
|
+
}
|
|
2306
|
+
CHECKTIME(winnerInfo);
|
|
2307
|
+
i++;
|
|
2308
|
+
}
|
|
2309
|
+
return winnerInfo;
|
|
2310
|
+
}
|
|
2311
|
+
|
|
2312
|
+
/* goes best, best-1, best+1, best-2, ... */
|
|
2313
|
+
/* return 0 if nothing remaining */
|
|
2314
|
+
static int nextStrategy(const int currentStrategy, const int bestStrategy)
|
|
2315
|
+
{
|
|
2316
|
+
if(bestStrategy <= currentStrategy) {
|
|
2317
|
+
int candidate = 2 * bestStrategy - currentStrategy - 1;
|
|
2318
|
+
if(candidate < 1) {
|
|
2319
|
+
candidate = currentStrategy + 1;
|
|
2320
|
+
if(candidate > (int)ZSTD_STRATEGY_MAX) {
|
|
2321
|
+
return 0;
|
|
2322
|
+
} else {
|
|
2323
|
+
return candidate;
|
|
2324
|
+
}
|
|
2325
|
+
} else {
|
|
2326
|
+
return candidate;
|
|
2327
|
+
}
|
|
2328
|
+
} else { /* bestStrategy >= currentStrategy */
|
|
2329
|
+
int candidate = 2 * bestStrategy - currentStrategy;
|
|
2330
|
+
if(candidate > (int)ZSTD_STRATEGY_MAX) {
|
|
2331
|
+
candidate = currentStrategy - 1;
|
|
2332
|
+
if(candidate < 1) {
|
|
2333
|
+
return 0;
|
|
2334
|
+
} else {
|
|
2335
|
+
return candidate;
|
|
2336
|
+
}
|
|
2337
|
+
} else {
|
|
2338
|
+
return candidate;
|
|
2339
|
+
}
|
|
2340
|
+
}
|
|
2341
|
+
}
|
|
2342
|
+
|
|
2343
|
+
/* experiment with playing with this and decay value */
|
|
2344
|
+
|
|
2345
|
+
/* main fn called when using --optimize */
|
|
2346
|
+
/* Does strategy selection by benchmarking default compression levels
|
|
2347
|
+
* then optimizes by strategy, starting with the best one and moving
|
|
2348
|
+
* progressively moving further away by number
|
|
2349
|
+
* args:
|
|
2350
|
+
* fileNamesTable - list of files to benchmark
|
|
2351
|
+
* nbFiles - length of fileNamesTable
|
|
2352
|
+
* dictFileName - name of dictionary file if one, else NULL
|
|
2353
|
+
* target - performance constraints (cSpeed, dSpeed, cMem)
|
|
2354
|
+
* paramTarget - parameter constraints (i.e. restriction search space to where strategy = ZSTD_fast)
|
|
2355
|
+
* cLevel - compression level to exceed (all solutions must be > lvl in cSpeed + ratio)
|
|
2356
|
+
*/
|
|
2357
|
+
|
|
2358
|
+
static unsigned g_maxTries = 5;
|
|
2359
|
+
#define TRY_DECAY 1
|
|
2360
|
+
|
|
2361
|
+
static int
|
|
2362
|
+
optimizeForSize(const char* const * const fileNamesTable, const size_t nbFiles,
|
|
2363
|
+
const char* dictFileName,
|
|
2364
|
+
constraint_t target, paramValues_t paramTarget,
|
|
2365
|
+
const int cLevelOpt, const int cLevelRun,
|
|
2366
|
+
const U32 memoTableLog)
|
|
2367
|
+
{
|
|
2368
|
+
varInds_t varArray [NUM_PARAMS];
|
|
2369
|
+
int ret = 0;
|
|
2370
|
+
const size_t varLen = variableParams(paramTarget, varArray, dictFileName != NULL);
|
|
2371
|
+
winnerInfo_t winner = initWinnerInfo(emptyParams());
|
|
2372
|
+
memoTable_t* allMT = NULL;
|
|
2373
|
+
paramValues_t paramBase;
|
|
2374
|
+
contexts_t ctx;
|
|
2375
|
+
buffers_t buf;
|
|
2376
|
+
g_time = UTIL_getTime();
|
|
2377
|
+
|
|
2378
|
+
if (createBuffers(&buf, fileNamesTable, nbFiles)) {
|
|
2379
|
+
DISPLAY("unable to load files\n");
|
|
2380
|
+
return 1;
|
|
2381
|
+
}
|
|
2382
|
+
|
|
2383
|
+
if (createContexts(&ctx, dictFileName)) {
|
|
2384
|
+
DISPLAY("unable to load dictionary\n");
|
|
2385
|
+
freeBuffers(buf);
|
|
2386
|
+
return 2;
|
|
2387
|
+
}
|
|
2388
|
+
|
|
2389
|
+
if (nbFiles == 1) {
|
|
2390
|
+
DISPLAYLEVEL(2, "Loading %s... \r", fileNamesTable[0]);
|
|
2391
|
+
} else {
|
|
2392
|
+
DISPLAYLEVEL(2, "Loading %lu Files... \r", (unsigned long)nbFiles);
|
|
2393
|
+
}
|
|
2394
|
+
|
|
2395
|
+
/* sanitize paramTarget */
|
|
2396
|
+
optimizerAdjustInput(¶mTarget, buf.maxBlockSize);
|
|
2397
|
+
paramBase = cParamUnsetMin(paramTarget);
|
|
2398
|
+
|
|
2399
|
+
allMT = createMemoTableArray(paramTarget, varArray, varLen, memoTableLog);
|
|
2400
|
+
|
|
2401
|
+
if (!allMT) {
|
|
2402
|
+
DISPLAY("MemoTable Init Error\n");
|
|
2403
|
+
ret = 2;
|
|
2404
|
+
goto _cleanUp;
|
|
2405
|
+
}
|
|
2406
|
+
|
|
2407
|
+
/* default strictnesses */
|
|
2408
|
+
if (g_strictness == PARAM_UNSET) {
|
|
2409
|
+
if(g_optmode) {
|
|
2410
|
+
g_strictness = 100;
|
|
2411
|
+
} else {
|
|
2412
|
+
g_strictness = 90;
|
|
2413
|
+
}
|
|
2414
|
+
} else {
|
|
2415
|
+
if(0 >= g_strictness || g_strictness > 100) {
|
|
2416
|
+
DISPLAY("Strictness Outside of Bounds\n");
|
|
2417
|
+
ret = 4;
|
|
2418
|
+
goto _cleanUp;
|
|
2419
|
+
}
|
|
2420
|
+
}
|
|
2421
|
+
|
|
2422
|
+
/* use level'ing mode instead of normal target mode */
|
|
2423
|
+
if (g_optmode) {
|
|
2424
|
+
winner.params = cParamsToPVals(ZSTD_getCParams(cLevelOpt, buf.maxBlockSize, ctx.dictSize));
|
|
2425
|
+
if(BMK_benchParam(&winner.result, buf, ctx, winner.params)) {
|
|
2426
|
+
ret = 3;
|
|
2427
|
+
goto _cleanUp;
|
|
2428
|
+
}
|
|
2429
|
+
|
|
2430
|
+
g_lvltarget = winner.result;
|
|
2431
|
+
g_lvltarget.cSpeed = (g_lvltarget.cSpeed * g_strictness) / 100;
|
|
2432
|
+
g_lvltarget.dSpeed = (g_lvltarget.dSpeed * g_strictness) / 100;
|
|
2433
|
+
g_lvltarget.cSize = (g_lvltarget.cSize * 100) / g_strictness;
|
|
2434
|
+
|
|
2435
|
+
target.cSpeed = (U32)g_lvltarget.cSpeed;
|
|
2436
|
+
target.dSpeed = (U32)g_lvltarget.dSpeed;
|
|
2437
|
+
|
|
2438
|
+
BMK_printWinnerOpt(stdout, cLevelOpt, winner.result, winner.params, target, buf.srcSize);
|
|
2439
|
+
}
|
|
2440
|
+
|
|
2441
|
+
/* Don't want it to return anything worse than the best known result */
|
|
2442
|
+
if (g_singleRun) {
|
|
2443
|
+
BMK_benchResult_t res;
|
|
2444
|
+
g_params = adjustParams(overwriteParams(cParamsToPVals(ZSTD_getCParams(cLevelRun, buf.maxBlockSize, ctx.dictSize)), g_params), buf.maxBlockSize, ctx.dictSize);
|
|
2445
|
+
if (BMK_benchParam(&res, buf, ctx, g_params)) {
|
|
2446
|
+
ret = 45;
|
|
2447
|
+
goto _cleanUp;
|
|
2448
|
+
}
|
|
2449
|
+
if(compareResultLT(winner.result, res, relaxTarget(target), buf.srcSize)) {
|
|
2450
|
+
winner.result = res;
|
|
2451
|
+
winner.params = g_params;
|
|
2452
|
+
}
|
|
2453
|
+
}
|
|
2454
|
+
|
|
2455
|
+
/* bench */
|
|
2456
|
+
DISPLAYLEVEL(2, "\r%79s\r", "");
|
|
2457
|
+
if(nbFiles == 1) {
|
|
2458
|
+
DISPLAYLEVEL(2, "optimizing for %s", fileNamesTable[0]);
|
|
2459
|
+
} else {
|
|
2460
|
+
DISPLAYLEVEL(2, "optimizing for %lu Files", (unsigned long)nbFiles);
|
|
2461
|
+
}
|
|
2462
|
+
|
|
2463
|
+
if(target.cSpeed != 0) { DISPLAYLEVEL(2," - limit compression speed %u MB/s", (unsigned)(target.cSpeed >> 20)); }
|
|
2464
|
+
if(target.dSpeed != 0) { DISPLAYLEVEL(2, " - limit decompression speed %u MB/s", (unsigned)(target.dSpeed >> 20)); }
|
|
2465
|
+
if(target.cMem != (U32)-1) { DISPLAYLEVEL(2, " - limit memory %u MB", (unsigned)(target.cMem >> 20)); }
|
|
2466
|
+
|
|
2467
|
+
DISPLAYLEVEL(2, "\n");
|
|
2468
|
+
init_clockGranularity();
|
|
2469
|
+
|
|
2470
|
+
{ paramValues_t CParams;
|
|
2471
|
+
|
|
2472
|
+
/* find best solution from default params */
|
|
2473
|
+
{ const int maxSeeds = g_noSeed ? 1 : ZSTD_maxCLevel();
|
|
2474
|
+
DEBUGOUTPUT("Strategy Selection\n");
|
|
2475
|
+
if (paramTarget.vals[strt_ind] == PARAM_UNSET) {
|
|
2476
|
+
BMK_benchResult_t candidate;
|
|
2477
|
+
int i;
|
|
2478
|
+
for (i=1; i<=maxSeeds; i++) {
|
|
2479
|
+
int ec;
|
|
2480
|
+
CParams = overwriteParams(cParamsToPVals(ZSTD_getCParams(i, buf.maxBlockSize, ctx.dictSize)), paramTarget);
|
|
2481
|
+
ec = BMK_benchParam(&candidate, buf, ctx, CParams);
|
|
2482
|
+
BMK_printWinnerOpt(stdout, i, candidate, CParams, target, buf.srcSize);
|
|
2483
|
+
|
|
2484
|
+
if(!ec && compareResultLT(winner.result, candidate, relaxTarget(target), buf.srcSize)) {
|
|
2485
|
+
winner.result = candidate;
|
|
2486
|
+
winner.params = CParams;
|
|
2487
|
+
}
|
|
2488
|
+
|
|
2489
|
+
CHECKTIMEGT(ret, 0, _displayCleanUp); /* if pass time limit, stop */
|
|
2490
|
+
/* if the current params are too slow, just stop. */
|
|
2491
|
+
if(target.cSpeed > candidate.cSpeed * 3 / 2) { break; }
|
|
2492
|
+
}
|
|
2493
|
+
|
|
2494
|
+
BMK_printWinnerOpt(stdout, CUSTOM_LEVEL, winner.result, winner.params, target, buf.srcSize);
|
|
2495
|
+
}
|
|
2496
|
+
}
|
|
2497
|
+
|
|
2498
|
+
DEBUGOUTPUT("Real Opt\n");
|
|
2499
|
+
/* start 'real' optimization */
|
|
2500
|
+
{ int bestStrategy = (int)winner.params.vals[strt_ind];
|
|
2501
|
+
if (paramTarget.vals[strt_ind] == PARAM_UNSET) {
|
|
2502
|
+
int st = bestStrategy;
|
|
2503
|
+
int tries = g_maxTries;
|
|
2504
|
+
|
|
2505
|
+
/* one iterations of hill climbing with the level-defined parameters. */
|
|
2506
|
+
{ winnerInfo_t const w1 = climbOnce(target, allMT, buf, ctx, winner.params);
|
|
2507
|
+
if (compareResultLT(winner.result, w1.result, target, buf.srcSize)) {
|
|
2508
|
+
winner = w1;
|
|
2509
|
+
}
|
|
2510
|
+
CHECKTIMEGT(ret, 0, _displayCleanUp);
|
|
2511
|
+
}
|
|
2512
|
+
|
|
2513
|
+
while(st && tries > 0) {
|
|
2514
|
+
winnerInfo_t wc;
|
|
2515
|
+
DEBUGOUTPUT("StrategySwitch: %s\n", g_stratName[st]);
|
|
2516
|
+
|
|
2517
|
+
wc = optimizeFixedStrategy(buf, ctx, target, paramBase, st, allMT, tries);
|
|
2518
|
+
|
|
2519
|
+
if(compareResultLT(winner.result, wc.result, target, buf.srcSize)) {
|
|
2520
|
+
winner = wc;
|
|
2521
|
+
tries = g_maxTries;
|
|
2522
|
+
bestStrategy = st;
|
|
2523
|
+
} else {
|
|
2524
|
+
st = nextStrategy(st, bestStrategy);
|
|
2525
|
+
tries -= TRY_DECAY;
|
|
2526
|
+
}
|
|
2527
|
+
CHECKTIMEGT(ret, 0, _displayCleanUp);
|
|
2528
|
+
}
|
|
2529
|
+
} else {
|
|
2530
|
+
winner = optimizeFixedStrategy(buf, ctx, target, paramBase, paramTarget.vals[strt_ind], allMT, g_maxTries);
|
|
2531
|
+
}
|
|
2532
|
+
|
|
2533
|
+
}
|
|
2534
|
+
|
|
2535
|
+
/* no solution found */
|
|
2536
|
+
if(winner.result.cSize == (size_t)-1) {
|
|
2537
|
+
ret = 1;
|
|
2538
|
+
DISPLAY("No feasible solution found\n");
|
|
2539
|
+
goto _cleanUp;
|
|
2540
|
+
}
|
|
2541
|
+
|
|
2542
|
+
/* end summary */
|
|
2543
|
+
_displayCleanUp:
|
|
2544
|
+
if (g_displayLevel >= 0) {
|
|
2545
|
+
BMK_displayOneResult(stdout, winner, buf.srcSize);
|
|
2546
|
+
}
|
|
2547
|
+
BMK_paramValues_into_commandLine(stdout, winner.params);
|
|
2548
|
+
DISPLAYLEVEL(1, "grillParams size - optimizer completed \n");
|
|
2549
|
+
}
|
|
2550
|
+
|
|
2551
|
+
_cleanUp:
|
|
2552
|
+
freeContexts(ctx);
|
|
2553
|
+
freeBuffers(buf);
|
|
2554
|
+
freeMemoTableArray(allMT);
|
|
2555
|
+
return ret;
|
|
2556
|
+
}
|
|
2557
|
+
|
|
2558
|
+
/*-************************************
|
|
2559
|
+
* CLI parsing functions
|
|
2560
|
+
**************************************/
|
|
2561
|
+
|
|
2562
|
+
/** longCommandWArg() :
|
|
2563
|
+
* check if *stringPtr is the same as longCommand.
|
|
2564
|
+
* If yes, @return 1 and advances *stringPtr to the position which immediately follows longCommand.
|
|
2565
|
+
* @return 0 and doesn't modify *stringPtr otherwise.
|
|
2566
|
+
* from zstdcli.c
|
|
2567
|
+
*/
|
|
2568
|
+
static int longCommandWArg(const char** stringPtr, const char* longCommand)
|
|
2569
|
+
{
|
|
2570
|
+
size_t const comSize = strlen(longCommand);
|
|
2571
|
+
int const result = !strncmp(*stringPtr, longCommand, comSize);
|
|
2572
|
+
if (result) *stringPtr += comSize;
|
|
2573
|
+
return result;
|
|
2574
|
+
}
|
|
2575
|
+
|
|
2576
|
+
static void errorOut(const char* msg)
|
|
2577
|
+
{
|
|
2578
|
+
DISPLAY("%s \n", msg); exit(1);
|
|
2579
|
+
}
|
|
2580
|
+
|
|
2581
|
+
/*! readU32FromChar() :
|
|
2582
|
+
* @return : unsigned integer value read from input in `char` format.
|
|
2583
|
+
* allows and interprets K, KB, KiB, M, MB and MiB suffix.
|
|
2584
|
+
* Will also modify `*stringPtr`, advancing it to position where it stopped reading.
|
|
2585
|
+
* Note : function will exit() program if digit sequence overflows */
|
|
2586
|
+
static unsigned readU32FromChar(const char** stringPtr)
|
|
2587
|
+
{
|
|
2588
|
+
const char errorMsg[] = "error: numeric value too large";
|
|
2589
|
+
unsigned sign = 1;
|
|
2590
|
+
unsigned result = 0;
|
|
2591
|
+
if(**stringPtr == '-') { sign = (unsigned)-1; (*stringPtr)++; }
|
|
2592
|
+
while ((**stringPtr >='0') && (**stringPtr <='9')) {
|
|
2593
|
+
unsigned const max = (((unsigned)(-1)) / 10) - 1;
|
|
2594
|
+
if (result > max) errorOut(errorMsg);
|
|
2595
|
+
result *= 10;
|
|
2596
|
+
assert(**stringPtr >= '0');
|
|
2597
|
+
result += (unsigned)(**stringPtr - '0');
|
|
2598
|
+
(*stringPtr)++ ;
|
|
2599
|
+
}
|
|
2600
|
+
if ((**stringPtr=='K') || (**stringPtr=='M')) {
|
|
2601
|
+
unsigned const maxK = ((unsigned)(-1)) >> 10;
|
|
2602
|
+
if (result > maxK) errorOut(errorMsg);
|
|
2603
|
+
result <<= 10;
|
|
2604
|
+
if (**stringPtr=='M') {
|
|
2605
|
+
if (result > maxK) errorOut(errorMsg);
|
|
2606
|
+
result <<= 10;
|
|
2607
|
+
}
|
|
2608
|
+
(*stringPtr)++; /* skip `K` or `M` */
|
|
2609
|
+
if (**stringPtr=='i') (*stringPtr)++;
|
|
2610
|
+
if (**stringPtr=='B') (*stringPtr)++;
|
|
2611
|
+
}
|
|
2612
|
+
return result * sign;
|
|
2613
|
+
}
|
|
2614
|
+
|
|
2615
|
+
static double readDoubleFromChar(const char** stringPtr)
|
|
2616
|
+
{
|
|
2617
|
+
double result = 0, divide = 10;
|
|
2618
|
+
while ((**stringPtr >='0') && (**stringPtr <='9')) {
|
|
2619
|
+
result *= 10, result += **stringPtr - '0', (*stringPtr)++ ;
|
|
2620
|
+
}
|
|
2621
|
+
if(**stringPtr!='.') {
|
|
2622
|
+
return result;
|
|
2623
|
+
}
|
|
2624
|
+
(*stringPtr)++;
|
|
2625
|
+
while ((**stringPtr >='0') && (**stringPtr <='9')) {
|
|
2626
|
+
result += (double)(**stringPtr - '0') / divide, divide *= 10, (*stringPtr)++ ;
|
|
2627
|
+
}
|
|
2628
|
+
return result;
|
|
2629
|
+
}
|
|
2630
|
+
|
|
2631
|
+
static int usage(const char* exename)
|
|
2632
|
+
{
|
|
2633
|
+
DISPLAY( "Usage :\n");
|
|
2634
|
+
DISPLAY( " %s [arg] file\n", exename);
|
|
2635
|
+
DISPLAY( "Arguments :\n");
|
|
2636
|
+
DISPLAY( " file : path to the file used as reference (if none, generates a compressible sample)\n");
|
|
2637
|
+
DISPLAY( " -H/-h : Help (this text + advanced options)\n");
|
|
2638
|
+
return 0;
|
|
2639
|
+
}
|
|
2640
|
+
|
|
2641
|
+
static int usage_advanced(void)
|
|
2642
|
+
{
|
|
2643
|
+
DISPLAY( "\nAdvanced options :\n");
|
|
2644
|
+
DISPLAY( " -T# : set level 1 speed objective \n");
|
|
2645
|
+
DISPLAY( " -B# : cut input into blocks of size # (default : single block) \n");
|
|
2646
|
+
DISPLAY( " --optimize= : same as -O with more verbose syntax (see README.md)\n");
|
|
2647
|
+
DISPLAY( " -S : Single run \n");
|
|
2648
|
+
DISPLAY( " --zstd : Single run, parameter selection same as zstdcli \n");
|
|
2649
|
+
DISPLAY( " -P# : generated sample compressibility (default : %.1f%%) \n", COMPRESSIBILITY_DEFAULT * 100);
|
|
2650
|
+
DISPLAY( " -t# : Caps runtime of operation in seconds (default : %u seconds (%.1f hours)) \n",
|
|
2651
|
+
(unsigned)g_timeLimit_s, (double)g_timeLimit_s / 3600);
|
|
2652
|
+
DISPLAY( " -v : Prints Benchmarking output\n");
|
|
2653
|
+
DISPLAY( " -D : Next argument dictionary file\n");
|
|
2654
|
+
DISPLAY( " -s : Separate Files\n");
|
|
2655
|
+
return 0;
|
|
2656
|
+
}
|
|
2657
|
+
|
|
2658
|
+
static int badusage(const char* exename)
|
|
2659
|
+
{
|
|
2660
|
+
DISPLAY("Wrong parameters\n");
|
|
2661
|
+
usage(exename);
|
|
2662
|
+
return 1;
|
|
2663
|
+
}
|
|
2664
|
+
|
|
2665
|
+
#define PARSE_SUB_ARGS(stringLong, stringShort, variable) { \
|
|
2666
|
+
if ( longCommandWArg(&argument, stringLong) \
|
|
2667
|
+
|| longCommandWArg(&argument, stringShort) ) { \
|
|
2668
|
+
variable = readU32FromChar(&argument); \
|
|
2669
|
+
if (argument[0]==',') { \
|
|
2670
|
+
argument++; continue; \
|
|
2671
|
+
} else break; \
|
|
2672
|
+
} }
|
|
2673
|
+
|
|
2674
|
+
/* 1 if successful parse, 0 otherwise */
|
|
2675
|
+
static int parse_params(const char** argptr, paramValues_t* pv) {
|
|
2676
|
+
int matched = 0;
|
|
2677
|
+
const char* argOrig = *argptr;
|
|
2678
|
+
varInds_t v;
|
|
2679
|
+
for(v = 0; v < NUM_PARAMS; v++) {
|
|
2680
|
+
if ( longCommandWArg(argptr,g_shortParamNames[v])
|
|
2681
|
+
|| longCommandWArg(argptr, g_paramNames[v]) ) {
|
|
2682
|
+
if(**argptr == '=') {
|
|
2683
|
+
(*argptr)++;
|
|
2684
|
+
pv->vals[v] = readU32FromChar(argptr);
|
|
2685
|
+
matched = 1;
|
|
2686
|
+
break;
|
|
2687
|
+
}
|
|
2688
|
+
}
|
|
2689
|
+
/* reset and try again */
|
|
2690
|
+
*argptr = argOrig;
|
|
2691
|
+
}
|
|
2692
|
+
return matched;
|
|
2693
|
+
}
|
|
2694
|
+
|
|
2695
|
+
/*-************************************
|
|
2696
|
+
* Main
|
|
2697
|
+
**************************************/
|
|
2698
|
+
|
|
2699
|
+
int main(int argc, const char** argv)
|
|
2700
|
+
{
|
|
2701
|
+
int i,
|
|
2702
|
+
filenamesStart=0,
|
|
2703
|
+
result;
|
|
2704
|
+
const char* exename=argv[0];
|
|
2705
|
+
const char* input_filename = NULL;
|
|
2706
|
+
const char* dictFileName = NULL;
|
|
2707
|
+
U32 main_pause = 0;
|
|
2708
|
+
int cLevelOpt = 0, cLevelRun = 0;
|
|
2709
|
+
int separateFiles = 0;
|
|
2710
|
+
double compressibility = COMPRESSIBILITY_DEFAULT;
|
|
2711
|
+
U32 memoTableLog = PARAM_UNSET;
|
|
2712
|
+
constraint_t target = { 0, 0, (U32)-1 };
|
|
2713
|
+
|
|
2714
|
+
paramValues_t paramTarget = emptyParams();
|
|
2715
|
+
g_params = emptyParams();
|
|
2716
|
+
|
|
2717
|
+
assert(argc>=1); /* for exename */
|
|
2718
|
+
|
|
2719
|
+
for(i=1; i<argc; i++) {
|
|
2720
|
+
const char* argument = argv[i];
|
|
2721
|
+
DEBUGOUTPUT("%d: %s\n", i, argument);
|
|
2722
|
+
assert(argument != NULL);
|
|
2723
|
+
|
|
2724
|
+
if(!strcmp(argument,"--no-seed")) { g_noSeed = 1; continue; }
|
|
2725
|
+
|
|
2726
|
+
if (longCommandWArg(&argument, "--optimize=")) {
|
|
2727
|
+
g_optimizer = 1;
|
|
2728
|
+
for ( ; ;) {
|
|
2729
|
+
if(parse_params(&argument, ¶mTarget)) { if(argument[0] == ',') { argument++; continue; } else break; }
|
|
2730
|
+
PARSE_SUB_ARGS("compressionSpeed=" , "cSpeed=", target.cSpeed);
|
|
2731
|
+
PARSE_SUB_ARGS("decompressionSpeed=", "dSpeed=", target.dSpeed);
|
|
2732
|
+
PARSE_SUB_ARGS("compressionMemory=" , "cMem=", target.cMem);
|
|
2733
|
+
PARSE_SUB_ARGS("strict=", "stc=", g_strictness);
|
|
2734
|
+
PARSE_SUB_ARGS("maxTries=", "tries=", g_maxTries);
|
|
2735
|
+
PARSE_SUB_ARGS("memoLimitLog=", "memLog=", memoTableLog);
|
|
2736
|
+
if (longCommandWArg(&argument, "level=") || longCommandWArg(&argument, "lvl=")) { cLevelOpt = (int)readU32FromChar(&argument); g_optmode = 1; if (argument[0]==',') { argument++; continue; } else break; }
|
|
2737
|
+
if (longCommandWArg(&argument, "speedForRatio=") || longCommandWArg(&argument, "speedRatio=")) { g_ratioMultiplier = readDoubleFromChar(&argument); if (argument[0]==',') { argument++; continue; } else break; }
|
|
2738
|
+
|
|
2739
|
+
DISPLAY("invalid optimization parameter \n");
|
|
2740
|
+
return 1;
|
|
2741
|
+
}
|
|
2742
|
+
|
|
2743
|
+
if (argument[0] != 0) {
|
|
2744
|
+
DISPLAY("invalid --optimize= format\n");
|
|
2745
|
+
return 1; /* check the end of string */
|
|
2746
|
+
}
|
|
2747
|
+
continue;
|
|
2748
|
+
} else if (longCommandWArg(&argument, "--zstd=")) {
|
|
2749
|
+
/* Decode command (note : aggregated commands are allowed) */
|
|
2750
|
+
g_singleRun = 1;
|
|
2751
|
+
for ( ; ;) {
|
|
2752
|
+
if(parse_params(&argument, &g_params)) { if(argument[0] == ',') { argument++; continue; } else break; }
|
|
2753
|
+
if (longCommandWArg(&argument, "level=") || longCommandWArg(&argument, "lvl=")) { cLevelRun = (int)readU32FromChar(&argument); g_params = emptyParams(); if (argument[0]==',') { argument++; continue; } else break; }
|
|
2754
|
+
|
|
2755
|
+
DISPLAY("invalid compression parameter \n");
|
|
2756
|
+
return 1;
|
|
2757
|
+
}
|
|
2758
|
+
|
|
2759
|
+
if (argument[0] != 0) {
|
|
2760
|
+
DISPLAY("invalid --zstd= format\n");
|
|
2761
|
+
return 1; /* check the end of string */
|
|
2762
|
+
}
|
|
2763
|
+
continue;
|
|
2764
|
+
/* if not return, success */
|
|
2765
|
+
|
|
2766
|
+
} else if (longCommandWArg(&argument, "--display=")) {
|
|
2767
|
+
/* Decode command (note : aggregated commands are allowed) */
|
|
2768
|
+
memset(g_silenceParams, 1, sizeof(g_silenceParams));
|
|
2769
|
+
for ( ; ;) {
|
|
2770
|
+
int found = 0;
|
|
2771
|
+
varInds_t v;
|
|
2772
|
+
for(v = 0; v < NUM_PARAMS; v++) {
|
|
2773
|
+
if(longCommandWArg(&argument, g_shortParamNames[v]) || longCommandWArg(&argument, g_paramNames[v])) {
|
|
2774
|
+
g_silenceParams[v] = 0;
|
|
2775
|
+
found = 1;
|
|
2776
|
+
}
|
|
2777
|
+
}
|
|
2778
|
+
if(longCommandWArg(&argument, "compressionParameters") || longCommandWArg(&argument, "cParams")) {
|
|
2779
|
+
for(v = 0; v <= strt_ind; v++) {
|
|
2780
|
+
g_silenceParams[v] = 0;
|
|
2781
|
+
}
|
|
2782
|
+
found = 1;
|
|
2783
|
+
}
|
|
2784
|
+
|
|
2785
|
+
|
|
2786
|
+
if(found) {
|
|
2787
|
+
if(argument[0]==',') {
|
|
2788
|
+
continue;
|
|
2789
|
+
} else {
|
|
2790
|
+
break;
|
|
2791
|
+
}
|
|
2792
|
+
}
|
|
2793
|
+
DISPLAY("invalid parameter name parameter \n");
|
|
2794
|
+
return 1;
|
|
2795
|
+
}
|
|
2796
|
+
|
|
2797
|
+
if (argument[0] != 0) {
|
|
2798
|
+
DISPLAY("invalid --display format\n");
|
|
2799
|
+
return 1; /* check the end of string */
|
|
2800
|
+
}
|
|
2801
|
+
continue;
|
|
2802
|
+
} else if (argument[0]=='-') {
|
|
2803
|
+
argument++;
|
|
2804
|
+
|
|
2805
|
+
while (argument[0]!=0) {
|
|
2806
|
+
|
|
2807
|
+
switch(argument[0])
|
|
2808
|
+
{
|
|
2809
|
+
/* Display help on usage */
|
|
2810
|
+
case 'h' :
|
|
2811
|
+
case 'H': usage(exename); usage_advanced(); return 0;
|
|
2812
|
+
|
|
2813
|
+
/* Pause at the end (hidden option) */
|
|
2814
|
+
case 'p': main_pause = 1; argument++; break;
|
|
2815
|
+
|
|
2816
|
+
/* Sample compressibility (when no file provided) */
|
|
2817
|
+
case 'P':
|
|
2818
|
+
argument++;
|
|
2819
|
+
{ U32 const proba32 = readU32FromChar(&argument);
|
|
2820
|
+
compressibility = (double)proba32 / 100.;
|
|
2821
|
+
}
|
|
2822
|
+
break;
|
|
2823
|
+
|
|
2824
|
+
/* Run Single conf */
|
|
2825
|
+
case 'S':
|
|
2826
|
+
g_singleRun = 1;
|
|
2827
|
+
argument++;
|
|
2828
|
+
for ( ; ; ) {
|
|
2829
|
+
switch(*argument)
|
|
2830
|
+
{
|
|
2831
|
+
case 'w':
|
|
2832
|
+
argument++;
|
|
2833
|
+
g_params.vals[wlog_ind] = readU32FromChar(&argument);
|
|
2834
|
+
continue;
|
|
2835
|
+
case 'c':
|
|
2836
|
+
argument++;
|
|
2837
|
+
g_params.vals[clog_ind] = readU32FromChar(&argument);
|
|
2838
|
+
continue;
|
|
2839
|
+
case 'h':
|
|
2840
|
+
argument++;
|
|
2841
|
+
g_params.vals[hlog_ind] = readU32FromChar(&argument);
|
|
2842
|
+
continue;
|
|
2843
|
+
case 's':
|
|
2844
|
+
argument++;
|
|
2845
|
+
g_params.vals[slog_ind] = readU32FromChar(&argument);
|
|
2846
|
+
continue;
|
|
2847
|
+
case 'l': /* search length */
|
|
2848
|
+
argument++;
|
|
2849
|
+
g_params.vals[mml_ind] = readU32FromChar(&argument);
|
|
2850
|
+
continue;
|
|
2851
|
+
case 't': /* target length */
|
|
2852
|
+
argument++;
|
|
2853
|
+
g_params.vals[tlen_ind] = readU32FromChar(&argument);
|
|
2854
|
+
continue;
|
|
2855
|
+
case 'S': /* strategy */
|
|
2856
|
+
argument++;
|
|
2857
|
+
g_params.vals[strt_ind] = readU32FromChar(&argument);
|
|
2858
|
+
continue;
|
|
2859
|
+
case 'f': /* forceAttachDict */
|
|
2860
|
+
argument++;
|
|
2861
|
+
g_params.vals[fadt_ind] = readU32FromChar(&argument);
|
|
2862
|
+
continue;
|
|
2863
|
+
case 'L':
|
|
2864
|
+
{ argument++;
|
|
2865
|
+
cLevelRun = (int)readU32FromChar(&argument);
|
|
2866
|
+
g_params = emptyParams();
|
|
2867
|
+
continue;
|
|
2868
|
+
}
|
|
2869
|
+
default : ;
|
|
2870
|
+
}
|
|
2871
|
+
break;
|
|
2872
|
+
}
|
|
2873
|
+
|
|
2874
|
+
break;
|
|
2875
|
+
|
|
2876
|
+
/* target level1 speed objective, in MB/s */
|
|
2877
|
+
case 'T':
|
|
2878
|
+
argument++;
|
|
2879
|
+
g_target = readU32FromChar(&argument);
|
|
2880
|
+
break;
|
|
2881
|
+
|
|
2882
|
+
/* cut input into blocks */
|
|
2883
|
+
case 'B':
|
|
2884
|
+
argument++;
|
|
2885
|
+
g_blockSize = readU32FromChar(&argument);
|
|
2886
|
+
DISPLAY("using %u KB block size \n", (unsigned)(g_blockSize>>10));
|
|
2887
|
+
break;
|
|
2888
|
+
|
|
2889
|
+
/* caps runtime (in seconds) */
|
|
2890
|
+
case 't':
|
|
2891
|
+
argument++;
|
|
2892
|
+
g_timeLimit_s = readU32FromChar(&argument);
|
|
2893
|
+
break;
|
|
2894
|
+
|
|
2895
|
+
case 's':
|
|
2896
|
+
argument++;
|
|
2897
|
+
separateFiles = 1;
|
|
2898
|
+
break;
|
|
2899
|
+
|
|
2900
|
+
case 'q':
|
|
2901
|
+
while (argument[0] == 'q') { argument++; g_displayLevel--; }
|
|
2902
|
+
break;
|
|
2903
|
+
|
|
2904
|
+
case 'v':
|
|
2905
|
+
while (argument[0] == 'v') { argument++; g_displayLevel++; }
|
|
2906
|
+
break;
|
|
2907
|
+
|
|
2908
|
+
/* load dictionary file (only applicable for optimizer rn) */
|
|
2909
|
+
case 'D':
|
|
2910
|
+
if(i == argc - 1) { /* last argument, return error. */
|
|
2911
|
+
DISPLAY("Dictionary file expected but not given : %d\n", i);
|
|
2912
|
+
return 1;
|
|
2913
|
+
} else {
|
|
2914
|
+
i++;
|
|
2915
|
+
dictFileName = argv[i];
|
|
2916
|
+
argument += strlen(argument);
|
|
2917
|
+
}
|
|
2918
|
+
break;
|
|
2919
|
+
|
|
2920
|
+
/* Unknown command */
|
|
2921
|
+
default : return badusage(exename);
|
|
2922
|
+
}
|
|
2923
|
+
}
|
|
2924
|
+
continue;
|
|
2925
|
+
} /* if (argument[0]=='-') */
|
|
2926
|
+
|
|
2927
|
+
/* first provided filename is input */
|
|
2928
|
+
if (!input_filename) { input_filename=argument; filenamesStart=i; continue; }
|
|
2929
|
+
}
|
|
2930
|
+
|
|
2931
|
+
/* Welcome message */
|
|
2932
|
+
DISPLAYLEVEL(2, WELCOME_MESSAGE);
|
|
2933
|
+
|
|
2934
|
+
if (filenamesStart==0) {
|
|
2935
|
+
if (g_optimizer) {
|
|
2936
|
+
DISPLAY("Optimizer Expects File\n");
|
|
2937
|
+
return 1;
|
|
2938
|
+
} else {
|
|
2939
|
+
result = benchSample(compressibility, cLevelRun);
|
|
2940
|
+
}
|
|
2941
|
+
} else {
|
|
2942
|
+
if(separateFiles) {
|
|
2943
|
+
for(i = 0; i < argc - filenamesStart; i++) {
|
|
2944
|
+
if (g_optimizer) {
|
|
2945
|
+
result = optimizeForSize(argv+filenamesStart + i, 1, dictFileName, target, paramTarget, cLevelOpt, cLevelRun, memoTableLog);
|
|
2946
|
+
if(result) { DISPLAY("Error on File %d", i); return result; }
|
|
2947
|
+
} else {
|
|
2948
|
+
result = benchFiles(argv+filenamesStart + i, 1, dictFileName, cLevelRun);
|
|
2949
|
+
if(result) { DISPLAY("Error on File %d", i); return result; }
|
|
2950
|
+
}
|
|
2951
|
+
}
|
|
2952
|
+
} else {
|
|
2953
|
+
if (g_optimizer) {
|
|
2954
|
+
assert(filenamesStart < argc);
|
|
2955
|
+
result = optimizeForSize(argv+filenamesStart, (size_t)(argc-filenamesStart), dictFileName, target, paramTarget, cLevelOpt, cLevelRun, memoTableLog);
|
|
2956
|
+
} else {
|
|
2957
|
+
result = benchFiles(argv+filenamesStart, argc-filenamesStart, dictFileName, cLevelRun);
|
|
2958
|
+
}
|
|
2959
|
+
}
|
|
2960
|
+
}
|
|
2961
|
+
|
|
2962
|
+
if (main_pause) { int unused; printf("press enter...\n"); unused = getchar(); (void)unused; }
|
|
2963
|
+
|
|
2964
|
+
return result;
|
|
2965
|
+
}
|