react-native-update 10.34.2 → 10.34.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.gitmodules +4 -4
- package/harmony/pushy/src/main/cpp/HDiffPatch/CHANGELOG.md +291 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/LICENSE +48 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/Makefile +473 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/README.md +552 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/README_cn.md +547 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/_atosize.h +127 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/_clock_for_demo.h +59 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/_dir_ignore.h +191 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/_hextobytes.h +112 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/bsdiff_wrapper/bsdiff_wrapper.cpp +389 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/bsdiff_wrapper/bsdiff_wrapper.h +73 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/bsdiff_wrapper/bspatch_wrapper.c +266 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/bsdiff_wrapper/bspatch_wrapper.h +58 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/builds/android_ndk_jni_mk/Android.mk +190 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/builds/android_ndk_jni_mk/Application.mk +8 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/builds/android_ndk_jni_mk/build_libs.bat +1 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/builds/android_ndk_jni_mk/build_libs.sh +1 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/builds/android_ndk_jni_mk/build_libs_patchers.bat +1 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/builds/android_ndk_jni_mk/build_libs_patchers.sh +1 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/builds/android_ndk_jni_mk/hpatch.c +49 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/builds/android_ndk_jni_mk/hpatch.h +31 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/builds/android_ndk_jni_mk/hpatch_jni.c +38 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/builds/android_ndk_jni_mk/java/com/github/sisong/HPatch.java +26 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/HDiffPatch.sln +155 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/HDiffZ.vcxproj +364 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/HPatchZ.vcxproj +348 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/bzip2.vcxproj +228 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/hpatchz_test.vcxproj +215 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/libdeflate.vcxproj +256 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/longPathAware.exe.manifest +7 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/lzma.vcxproj +271 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/testHashClash.vcxproj +228 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/unitTest.vcxproj +296 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/zlib.vcxproj +242 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/zstd.vcxproj +287 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode/HDiffPatch.xcworkspace/contents.xcworkspacedata +39 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode/HDiffPatch.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode/HDiffPatch.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +8 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode/bestParams.xcodeproj/project.pbxproj +447 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode/hdiffz.xcodeproj/project.pbxproj +703 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode/hpatchz.xcodeproj/project.pbxproj +463 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode/libdeflate.xcodeproj/project.pbxproj +286 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode/lz4.xcodeproj/project.pbxproj +268 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode/lzma.xcodeproj/project.pbxproj +585 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode/testHashClash.xcodeproj/project.pbxproj +301 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode/unitTest.xcodeproj/project.pbxproj +591 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode/zlib.xcodeproj/project.pbxproj +308 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode/zstd.xcodeproj/project.pbxproj +524 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode_iOS_hpatchz/hpatch_objc/hpatch_objc.h +33 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode_iOS_hpatchz/hpatch_objc/hpatch_objc.m +33 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode_iOS_hpatchz/hpatchz.xcodeproj/project.pbxproj +774 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/checksum_plugin_demo.h +799 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/compress_parallel.cpp +201 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/compress_parallel.h +59 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/compress_plugin_demo.h +1526 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/decompress_plugin_demo.h +1637 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_diff/dir_diff.cpp +846 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_diff/dir_diff.h +79 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_diff/dir_diff_tools.cpp +339 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_diff/dir_diff_tools.h +190 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_diff/dir_manifest.cpp +339 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_diff/dir_manifest.h +87 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_diff/file_for_dirDiff.h +43 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/dir_patch.c +836 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/dir_patch.h +246 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/dir_patch_private.h +47 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/dir_patch_tools.c +112 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/dir_patch_tools.h +69 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/dir_patch_types.h +65 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/new_dir_output.c +346 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/new_dir_output.h +149 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/new_stream.c +176 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/new_stream.h +84 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/ref_stream.c +146 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/ref_stream.h +61 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/res_handle_limit.c +152 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/res_handle_limit.h +76 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/file_for_patch.c +735 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/file_for_patch.h +240 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/hdiffz.cpp +1971 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/hdiffz_import_patch.c +31 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/hdiffz_import_patch.h +42 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/hpatch_dir_listener.h +307 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/hpatchz.c +1786 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/diff.cpp +1746 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/diff.h +201 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/diff_for_hpatch_lite.h +74 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/diff_types.h +187 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/match_block.cpp +478 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/match_block.h +222 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/bytes_rle.cpp +383 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/bytes_rle.h +73 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/compress_detect.cpp +184 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/compress_detect.h +88 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/config.h +89 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/divsufsort.c.inc.h +325 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/divsufsort.cpp +10 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/divsufsort.h +97 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/divsufsort64.cpp +14 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/divsufsort64.h +108 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/divsufsort_private.h +186 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/sssort.c.inc.h +780 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/trsort.c.inc.h +579 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/adler_roll.c +415 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/adler_roll.h +144 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/bloom_filter.h +164 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/covers.h +148 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/digest_matcher.cpp +769 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/digest_matcher.h +97 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/stream_serialize.cpp +954 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/stream_serialize.h +299 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/match_inplace.cpp +168 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/match_inplace.h +44 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/mem_buf.h +72 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/pack_uint.h +130 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/qsort_parallel.h +125 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/suffix_string.cpp +428 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/suffix_string.h +133 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/checksum_plugin.h +52 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/hpatch_mt/_hcache_old_mt.c +243 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/hpatch_mt/_hcache_old_mt.h +51 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/hpatch_mt/_hinput_mt.c +153 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/hpatch_mt/_hinput_mt.h +54 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/hpatch_mt/_houtput_mt.c +158 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/hpatch_mt/_houtput_mt.h +49 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/hpatch_mt/_hpatch_mt.c +294 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/hpatch_mt/_hpatch_mt.h +59 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/hpatch_mt/_patch_private_mt.h +217 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/hpatch_mt/hpatch_mt.c +349 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/hpatch_mt/hpatch_mt.h +110 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/patch.c +2643 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/patch.h +253 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/patch_private.h +245 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/patch_types.h +361 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatchLite/hpatch_lite.c +366 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatchLite/hpatch_lite.h +91 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatchLite/hpatch_lite_input_cache.h +31 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatchLite/hpatch_lite_types.h +106 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libParallel/parallel_channel.cpp +170 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libParallel/parallel_channel.h +250 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libParallel/parallel_import.h +67 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libParallel/parallel_import_c.c +497 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libParallel/parallel_import_c.h +106 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sign_diff/_match_in_old_sign.cpp +254 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sign_diff/_match_in_old_sign.h +39 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sign_diff/_sign_diff_type.h +37 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sign_diff/sign_diff.cpp +62 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sign_diff/sign_diff.h +44 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/dict_decompress_plugin.h +156 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/dir_sync_client.cpp +440 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/dir_sync_client.h +88 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/match_in_old.cpp +332 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/match_in_old.h +48 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/match_in_types.h +198 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/sync_client.cpp +697 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/sync_client.h +74 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/sync_client_private.h +262 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/sync_client_type.h +174 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/sync_client_type_private.h +174 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/sync_diff_data.cpp +252 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/sync_diff_data.h +67 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/sync_info_client.cpp +680 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/sync_info_client.h +137 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_make/dict_compress_plugin.h +83 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_make/dir_sync_make.cpp +125 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_make/dir_sync_make.h +56 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_make/hsynz_plugin.h +55 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_make/match_in_new.cpp +147 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_make/match_in_new.h +38 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_make/sync_info_make.cpp +354 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_make/sync_info_make.h +76 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_make/sync_make.cpp +521 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_make/sync_make.h +69 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_make/sync_make_hash_clash.h +122 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_make/sync_make_private.h +66 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/zsync_client_wrapper/zsync_client_type.h +36 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/zsync_client_wrapper/zsync_client_type_private.h +81 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/zsync_client_wrapper/zsync_client_wrapper.cpp +247 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/zsync_client_wrapper/zsync_client_wrapper.h +71 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/zsync_client_wrapper/zsync_info_client.cpp +351 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/zsync_client_wrapper/zsync_info_client.h +42 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/zsync_client_wrapper/zsync_match_in_old.cpp +124 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/zsync_client_wrapper/zsync_match_in_old.h +38 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/zsync_make_wrapper/zsync_info_make.cpp +203 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/zsync_make_wrapper/zsync_info_make.h +55 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/zsync_make_wrapper/zsync_make_wrapper.cpp +79 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/zsync_make_wrapper/zsync_make_wrapper.h +66 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/test/_private_searchBestParams.cpp +301 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/test/hpatchz_test.cpp +291 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/test/testHashClash.cpp +630 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/test/unit_test.cpp +889 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/vcdiff_wrapper/vcdiff_wrapper.cpp +628 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/vcdiff_wrapper/vcdiff_wrapper.h +95 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/vcdiff_wrapper/vcpatch_code_table.h +78 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/vcdiff_wrapper/vcpatch_wrapper.c +950 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/vcdiff_wrapper/vcpatch_wrapper.h +72 -0
- package/harmony/pushy/src/main/cpp/lzma/Asm/arm/7zCrcOpt.asm +100 -0
- package/harmony/pushy/src/main/cpp/lzma/Asm/arm64/7zAsm.S +181 -0
- package/harmony/pushy/src/main/cpp/lzma/Asm/arm64/LzmaDecOpt.S +1487 -0
- package/harmony/pushy/src/main/cpp/lzma/Asm/x86/7zAsm.asm +341 -0
- package/harmony/pushy/src/main/cpp/lzma/Asm/x86/7zCrcOpt.asm +258 -0
- package/harmony/pushy/src/main/cpp/lzma/Asm/x86/AesOpt.asm +742 -0
- package/harmony/pushy/src/main/cpp/lzma/Asm/x86/LzFindOpt.asm +540 -0
- package/harmony/pushy/src/main/cpp/lzma/Asm/x86/LzmaDecOpt.asm +1339 -0
- package/harmony/pushy/src/main/cpp/lzma/Asm/x86/Sha256Opt.asm +275 -0
- package/harmony/pushy/src/main/cpp/lzma/Asm/x86/Sort.asm +860 -0
- package/harmony/pushy/src/main/cpp/lzma/Asm/x86/XzCrc64Opt.asm +523 -0
- package/harmony/pushy/src/main/cpp/lzma/C/7z.h +204 -0
- package/harmony/pushy/src/main/cpp/lzma/C/7zAlloc.c +89 -0
- package/harmony/pushy/src/main/cpp/lzma/C/7zAlloc.h +19 -0
- package/harmony/pushy/src/main/cpp/lzma/C/7zArcIn.c +1786 -0
- package/harmony/pushy/src/main/cpp/lzma/C/7zBuf.c +36 -0
- package/harmony/pushy/src/main/cpp/lzma/C/7zBuf.h +35 -0
- package/harmony/pushy/src/main/cpp/lzma/C/7zBuf2.c +52 -0
- package/harmony/pushy/src/main/cpp/lzma/C/7zCrc.c +464 -0
- package/harmony/pushy/src/main/cpp/lzma/C/7zCrc.h +28 -0
- package/harmony/pushy/src/main/cpp/lzma/C/7zCrcOpt.c +199 -0
- package/harmony/pushy/src/main/cpp/lzma/C/7zDec.c +673 -0
- package/harmony/pushy/src/main/cpp/lzma/C/7zFile.c +443 -0
- package/harmony/pushy/src/main/cpp/lzma/C/7zFile.h +92 -0
- package/harmony/pushy/src/main/cpp/lzma/C/7zStream.c +199 -0
- package/harmony/pushy/src/main/cpp/lzma/C/7zTypes.h +597 -0
- package/harmony/pushy/src/main/cpp/lzma/C/7zVersion.h +27 -0
- package/harmony/pushy/src/main/cpp/lzma/C/7zVersion.rc +55 -0
- package/harmony/pushy/src/main/cpp/lzma/C/7zWindows.h +101 -0
- package/harmony/pushy/src/main/cpp/lzma/C/7zip_gcc_c.mak +360 -0
- package/harmony/pushy/src/main/cpp/lzma/C/Aes.c +429 -0
- package/harmony/pushy/src/main/cpp/lzma/C/Aes.h +60 -0
- package/harmony/pushy/src/main/cpp/lzma/C/AesOpt.c +1002 -0
- package/harmony/pushy/src/main/cpp/lzma/C/Alloc.c +605 -0
- package/harmony/pushy/src/main/cpp/lzma/C/Alloc.h +76 -0
- package/harmony/pushy/src/main/cpp/lzma/C/Asm_c.mak +12 -0
- package/harmony/pushy/src/main/cpp/lzma/C/Bcj2.c +290 -0
- package/harmony/pushy/src/main/cpp/lzma/C/Bcj2.h +332 -0
- package/harmony/pushy/src/main/cpp/lzma/C/Bcj2Enc.c +506 -0
- package/harmony/pushy/src/main/cpp/lzma/C/Bra.c +709 -0
- package/harmony/pushy/src/main/cpp/lzma/C/Bra.h +105 -0
- package/harmony/pushy/src/main/cpp/lzma/C/Bra86.c +187 -0
- package/harmony/pushy/src/main/cpp/lzma/C/BraIA64.c +14 -0
- package/harmony/pushy/src/main/cpp/lzma/C/Compiler.h +246 -0
- package/harmony/pushy/src/main/cpp/lzma/C/CpuArch.c +970 -0
- package/harmony/pushy/src/main/cpp/lzma/C/CpuArch.h +686 -0
- package/harmony/pushy/src/main/cpp/lzma/C/Delta.c +169 -0
- package/harmony/pushy/src/main/cpp/lzma/C/Delta.h +19 -0
- package/harmony/pushy/src/main/cpp/lzma/C/DllSecur.c +99 -0
- package/harmony/pushy/src/main/cpp/lzma/C/DllSecur.h +20 -0
- package/harmony/pushy/src/main/cpp/lzma/C/LzFind.c +1746 -0
- package/harmony/pushy/src/main/cpp/lzma/C/LzFind.h +160 -0
- package/harmony/pushy/src/main/cpp/lzma/C/LzFindMt.c +1422 -0
- package/harmony/pushy/src/main/cpp/lzma/C/LzFindMt.h +114 -0
- package/harmony/pushy/src/main/cpp/lzma/C/LzFindOpt.c +578 -0
- package/harmony/pushy/src/main/cpp/lzma/C/LzHash.h +34 -0
- package/harmony/pushy/src/main/cpp/lzma/C/Lzma2Dec.c +493 -0
- package/harmony/pushy/src/main/cpp/lzma/C/Lzma2Dec.h +121 -0
- package/harmony/pushy/src/main/cpp/lzma/C/Lzma2DecMt.c +1095 -0
- package/harmony/pushy/src/main/cpp/lzma/C/Lzma2DecMt.h +81 -0
- package/harmony/pushy/src/main/cpp/lzma/C/Lzma2Enc.c +807 -0
- package/harmony/pushy/src/main/cpp/lzma/C/Lzma2Enc.h +58 -0
- package/harmony/pushy/src/main/cpp/lzma/C/Lzma86.h +111 -0
- package/harmony/pushy/src/main/cpp/lzma/C/Lzma86Dec.c +53 -0
- package/harmony/pushy/src/main/cpp/lzma/C/Lzma86Enc.c +103 -0
- package/harmony/pushy/src/main/cpp/lzma/C/LzmaDec.c +1363 -0
- package/harmony/pushy/src/main/cpp/lzma/C/LzmaDec.h +237 -0
- package/harmony/pushy/src/main/cpp/lzma/C/LzmaEnc.c +3150 -0
- package/harmony/pushy/src/main/cpp/lzma/C/LzmaEnc.h +85 -0
- package/harmony/pushy/src/main/cpp/lzma/C/LzmaLib.c +42 -0
- package/harmony/pushy/src/main/cpp/lzma/C/LzmaLib.h +138 -0
- package/harmony/pushy/src/main/cpp/lzma/C/MtCoder.c +604 -0
- package/harmony/pushy/src/main/cpp/lzma/C/MtCoder.h +144 -0
- package/harmony/pushy/src/main/cpp/lzma/C/MtDec.c +1124 -0
- package/harmony/pushy/src/main/cpp/lzma/C/MtDec.h +202 -0
- package/harmony/pushy/src/main/cpp/lzma/C/Ppmd.h +169 -0
- package/harmony/pushy/src/main/cpp/lzma/C/Ppmd7.c +1131 -0
- package/harmony/pushy/src/main/cpp/lzma/C/Ppmd7.h +181 -0
- package/harmony/pushy/src/main/cpp/lzma/C/Ppmd7Dec.c +312 -0
- package/harmony/pushy/src/main/cpp/lzma/C/Ppmd7Enc.c +337 -0
- package/harmony/pushy/src/main/cpp/lzma/C/Precomp.h +127 -0
- package/harmony/pushy/src/main/cpp/lzma/C/RotateDefs.h +50 -0
- package/harmony/pushy/src/main/cpp/lzma/C/Sha256.c +492 -0
- package/harmony/pushy/src/main/cpp/lzma/C/Sha256.h +86 -0
- package/harmony/pushy/src/main/cpp/lzma/C/Sha256Opt.c +451 -0
- package/harmony/pushy/src/main/cpp/lzma/C/Sort.c +268 -0
- package/harmony/pushy/src/main/cpp/lzma/C/Sort.h +15 -0
- package/harmony/pushy/src/main/cpp/lzma/C/SwapBytes.c +835 -0
- package/harmony/pushy/src/main/cpp/lzma/C/SwapBytes.h +17 -0
- package/harmony/pushy/src/main/cpp/lzma/C/Threads.c +812 -0
- package/harmony/pushy/src/main/cpp/lzma/C/Threads.h +260 -0
- package/harmony/pushy/src/main/cpp/lzma/C/Util/7z/7z.dsp +249 -0
- package/harmony/pushy/src/main/cpp/lzma/C/Util/7z/7z.dsw +29 -0
- package/harmony/pushy/src/main/cpp/lzma/C/Util/7z/7zMain.c +889 -0
- package/harmony/pushy/src/main/cpp/lzma/C/Util/7z/Precomp.c +4 -0
- package/harmony/pushy/src/main/cpp/lzma/C/Util/7z/Precomp.h +13 -0
- package/harmony/pushy/src/main/cpp/lzma/C/Util/7z/makefile +44 -0
- package/harmony/pushy/src/main/cpp/lzma/C/Util/7z/makefile.gcc +32 -0
- package/harmony/pushy/src/main/cpp/lzma/C/Util/Lzma/LzmaUtil.c +313 -0
- package/harmony/pushy/src/main/cpp/lzma/C/Util/Lzma/LzmaUtil.dsp +192 -0
- package/harmony/pushy/src/main/cpp/lzma/C/Util/Lzma/LzmaUtil.dsw +29 -0
- package/harmony/pushy/src/main/cpp/lzma/C/Util/Lzma/Precomp.h +13 -0
- package/harmony/pushy/src/main/cpp/lzma/C/Util/Lzma/makefile +30 -0
- package/harmony/pushy/src/main/cpp/lzma/C/Util/Lzma/makefile.gcc +21 -0
- package/harmony/pushy/src/main/cpp/lzma/C/Util/LzmaLib/LzmaLib.def +4 -0
- package/harmony/pushy/src/main/cpp/lzma/C/Util/LzmaLib/LzmaLib.dsp +206 -0
- package/harmony/pushy/src/main/cpp/lzma/C/Util/LzmaLib/LzmaLib.dsw +29 -0
- package/harmony/pushy/src/main/cpp/lzma/C/Util/LzmaLib/LzmaLibExports.c +15 -0
- package/harmony/pushy/src/main/cpp/lzma/C/Util/LzmaLib/Precomp.c +4 -0
- package/harmony/pushy/src/main/cpp/lzma/C/Util/LzmaLib/Precomp.h +13 -0
- package/harmony/pushy/src/main/cpp/lzma/C/Util/LzmaLib/makefile +59 -0
- package/harmony/pushy/src/main/cpp/lzma/C/Util/LzmaLib/resource.rc +3 -0
- package/harmony/pushy/src/main/cpp/lzma/C/Util/SfxSetup/Precomp.c +4 -0
- package/harmony/pushy/src/main/cpp/lzma/C/Util/SfxSetup/Precomp.h +13 -0
- package/harmony/pushy/src/main/cpp/lzma/C/Util/SfxSetup/SfxSetup.c +657 -0
- package/harmony/pushy/src/main/cpp/lzma/C/Util/SfxSetup/SfxSetup.dsp +231 -0
- package/harmony/pushy/src/main/cpp/lzma/C/Util/SfxSetup/SfxSetup.dsw +29 -0
- package/harmony/pushy/src/main/cpp/lzma/C/Util/SfxSetup/makefile +44 -0
- package/harmony/pushy/src/main/cpp/lzma/C/Util/SfxSetup/makefile_con +40 -0
- package/harmony/pushy/src/main/cpp/lzma/C/Util/SfxSetup/resource.rc +5 -0
- package/harmony/pushy/src/main/cpp/lzma/C/Util/SfxSetup/setup.ico +0 -0
- package/harmony/pushy/src/main/cpp/lzma/C/Xz.c +92 -0
- package/harmony/pushy/src/main/cpp/lzma/C/Xz.h +542 -0
- package/harmony/pushy/src/main/cpp/lzma/C/XzCrc64.c +140 -0
- package/harmony/pushy/src/main/cpp/lzma/C/XzCrc64.h +26 -0
- package/harmony/pushy/src/main/cpp/lzma/C/XzCrc64Opt.c +261 -0
- package/harmony/pushy/src/main/cpp/lzma/C/XzDec.c +2876 -0
- package/harmony/pushy/src/main/cpp/lzma/C/XzEnc.c +1384 -0
- package/harmony/pushy/src/main/cpp/lzma/C/XzEnc.h +64 -0
- package/harmony/pushy/src/main/cpp/lzma/C/XzIn.c +385 -0
- package/harmony/pushy/src/main/cpp/lzma/C/var_clang.mak +11 -0
- package/harmony/pushy/src/main/cpp/lzma/C/var_clang_arm64.mak +12 -0
- package/harmony/pushy/src/main/cpp/lzma/C/var_clang_x64.mak +11 -0
- package/harmony/pushy/src/main/cpp/lzma/C/var_clang_x86.mak +11 -0
- package/harmony/pushy/src/main/cpp/lzma/C/var_gcc.mak +12 -0
- package/harmony/pushy/src/main/cpp/lzma/C/var_gcc_arm64.mak +12 -0
- package/harmony/pushy/src/main/cpp/lzma/C/var_gcc_x64.mak +10 -0
- package/harmony/pushy/src/main/cpp/lzma/C/var_gcc_x86.mak +10 -0
- package/harmony/pushy/src/main/cpp/lzma/C/var_mac_arm64.mak +11 -0
- package/harmony/pushy/src/main/cpp/lzma/C/var_mac_x64.mak +11 -0
- package/harmony/pushy/src/main/cpp/lzma/C/warn_clang.mak +1 -0
- package/harmony/pushy/src/main/cpp/lzma/C/warn_clang_mac.mak +1 -0
- package/harmony/pushy/src/main/cpp/lzma/C/warn_gcc.mak +51 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/7zip.mak +240 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/7zip_gcc.mak +1370 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Aes.mak +10 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zCompressionMode.cpp +3 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zCompressionMode.h +92 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zDecode.cpp +599 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zDecode.h +73 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zEncode.cpp +721 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zEncode.h +95 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zExtract.cpp +444 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zFolderInStream.cpp +264 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zFolderInStream.h +101 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zHandler.cpp +795 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zHandler.h +178 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zHandlerOut.cpp +1162 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zHeader.cpp +19 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zHeader.h +156 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zIn.cpp +1764 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zIn.h +454 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zItem.h +207 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zOut.cpp +1026 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zOut.h +346 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zProperties.cpp +182 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zProperties.h +26 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zRegister.cpp +27 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zSpecStream.cpp +31 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zSpecStream.h +49 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zUpdate.cpp +3088 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zUpdate.h +167 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/StdAfx.cpp +3 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/StdAfx.h +11 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Archive.def +14 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Archive2.def +21 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/ArchiveExports.cpp +158 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/CoderMixer2.cpp +1144 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/CoderMixer2.h +447 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/DummyOutStream.cpp +17 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/DummyOutStream.h +23 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/HandlerOut.cpp +315 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/HandlerOut.h +169 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/InStreamWithCRC.cpp +57 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/InStreamWithCRC.h +64 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/ItemNameUtils.cpp +140 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/ItemNameUtils.h +33 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/MultiStream.cpp +193 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/MultiStream.h +86 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/OutStreamWithCRC.cpp +18 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/OutStreamWithCRC.h +35 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/ParseProperties.cpp +3 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/ParseProperties.h +6 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/StdAfx.h +11 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/DllExports2.cpp +175 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/IArchive.h +754 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Icons/7z.ico +0 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/LzmaHandler.cpp +608 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/SplitHandler.cpp +353 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/StdAfx.h +11 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/XzHandler.cpp +1452 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/XzHandler.h +11 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Asm.mak +12 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/Alone7z/Alone.dsp +2090 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/Alone7z/Alone.dsw +29 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/Alone7z/StdAfx.cpp +3 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/Alone7z/StdAfx.h +11 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/Alone7z/makefile +168 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/Alone7z/makefile.gcc +279 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/Alone7z/resource.rc +7 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/Format7zExtractR/StdAfx.cpp +3 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/Format7zExtractR/StdAfx.h +11 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/Format7zExtractR/makefile +98 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/Format7zExtractR/resource.rc +5 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/Format7zR/StdAfx.cpp +3 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/Format7zR/StdAfx.h +11 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/Format7zR/makefile +121 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/Format7zR/resource.rc +5 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/LzmaCon/LzmaAlone.cpp +817 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/LzmaCon/LzmaCon.dsp +540 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/LzmaCon/LzmaCon.dsw +29 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/LzmaCon/StdAfx.cpp +3 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/LzmaCon/StdAfx.h +11 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/LzmaCon/makefile +68 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/LzmaCon/makefile.gcc +131 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/LzmaCon/resource.rc +3 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/LzmaSpec/LzmaSpec.cpp +715 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXCon/7z.ico +0 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXCon/SFXCon.dsp +1017 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXCon/SFXCon.dsw +29 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXCon/SfxCon.cpp +521 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXCon/StdAfx.cpp +3 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXCon/StdAfx.h +11 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXCon/makefile +137 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXCon/makefile.gcc +215 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXCon/resource.rc +9 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXSetup/ExtractCallbackSfx.cpp +246 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXSetup/ExtractCallbackSfx.h +83 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXSetup/ExtractEngine.cpp +135 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXSetup/ExtractEngine.h +11 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXSetup/SFXSetup.dsp +872 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXSetup/SFXSetup.dsw +29 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXSetup/SfxSetup.cpp +371 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXSetup/StdAfx.cpp +3 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXSetup/StdAfx.h +6 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXSetup/makefile +121 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXSetup/resource.h +6 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXSetup/resource.rc +16 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXSetup/setup.ico +0 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXWin/7z.ico +0 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXWin/SFXWin.dsp +1074 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXWin/SFXWin.dsw +29 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXWin/SfxWin.cpp +268 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXWin/StdAfx.cpp +3 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXWin/StdAfx.h +6 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXWin/makefile +159 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXWin/resource.h +1 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXWin/resource.rc +55 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/CWrappers.cpp +358 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/CWrappers.h +182 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/CreateCoder.cpp +548 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/CreateCoder.h +200 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/FilePathAutoRename.cpp +46 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/FilePathAutoRename.h +10 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/FileStreams.cpp +923 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/FileStreams.h +205 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/FilterCoder.cpp +577 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/FilterCoder.h +201 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/InBuffer.cpp +182 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/InBuffer.h +121 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/InOutTempBuffer.cpp +237 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/InOutTempBuffer.h +45 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/LimitedStreams.cpp +393 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/LimitedStreams.h +221 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/LockedStream.cpp +3 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/LockedStream.h +6 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/MethodId.cpp +3 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/MethodId.h +10 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/MethodProps.cpp +765 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/MethodProps.h +349 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/MultiOutStream.cpp +855 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/MultiOutStream.h +160 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/OffsetStream.cpp +37 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/OffsetStream.h +22 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/OutBuffer.cpp +111 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/OutBuffer.h +133 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/ProgressUtils.cpp +51 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/ProgressUtils.h +33 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/PropId.cpp +117 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/RegisterArc.h +80 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/RegisterCodec.h +106 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/StdAfx.h +11 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/StreamBinder.cpp +151 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/StreamBinder.h +78 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/StreamObjects.cpp +290 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/StreamObjects.h +146 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/StreamUtils.cpp +101 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/StreamUtils.h +31 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/UniqBlocks.cpp +57 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/UniqBlocks.h +41 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/VirtThread.cpp +47 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/VirtThread.h +24 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/Bcj2Coder.cpp +867 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/Bcj2Coder.h +127 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/Bcj2Register.cpp +24 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/BcjCoder.cpp +24 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/BcjCoder.h +37 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/BcjRegister.cpp +17 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/BranchMisc.cpp +106 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/BranchMisc.h +59 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/BranchRegister.cpp +58 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/ByteSwap.cpp +91 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/CodecExports.cpp +378 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/CopyCoder.cpp +153 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/CopyCoder.h +34 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/CopyRegister.cpp +15 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/DeltaFilter.cpp +126 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/Lzma2Decoder.cpp +267 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/Lzma2Decoder.h +87 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/Lzma2Encoder.cpp +134 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/Lzma2Encoder.h +30 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/Lzma2Register.cpp +22 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/LzmaDecoder.cpp +350 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/LzmaDecoder.h +113 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/LzmaEncoder.cpp +374 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/LzmaEncoder.h +45 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/LzmaRegister.cpp +22 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/PpmdDecoder.cpp +219 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/PpmdDecoder.h +87 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/PpmdEncoder.cpp +193 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/PpmdEncoder.h +49 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/PpmdRegister.cpp +22 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/StdAfx.h +11 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/XzDecoder.cpp +151 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/XzDecoder.h +86 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/XzEncoder.cpp +243 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/XzEncoder.h +35 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Crc.mak +8 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Crc64.mak +8 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Crypto/7zAes.cpp +315 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Crypto/7zAes.h +130 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Crypto/7zAesRegister.cpp +17 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Crypto/MyAes.cpp +277 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Crypto/MyAes.h +122 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Crypto/MyAesReg.cpp +29 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Crypto/RandGen.cpp +241 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Crypto/RandGen.h +41 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Crypto/StdAfx.h +11 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/GuiCommon.rc +119 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Guid.txt +243 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/ICoder.h +480 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/IDecl.h +76 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/IPassword.h +54 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/IProgress.h +20 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/IStream.h +210 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/LzFindOpt.mak +7 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/LzmaDec.mak +7 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/LzmaDec_gcc.mak +14 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/MyVersion.h +2 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/MyVersionInfo.rc +2 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/PropID.h +178 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Sha256.mak +13 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Sort.mak +6 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/SubBuild.mak +3 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Client7z/Client7z.cpp +1145 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Client7z/Client7z.dsp +331 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Client7z/Client7z.dsw +29 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Client7z/StdAfx.cpp +3 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Client7z/StdAfx.h +11 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Client7z/makefile +29 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Client7z/makefile.gcc +72 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Client7z/resource.rc +3 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ArchiveCommandLine.cpp +1799 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ArchiveCommandLine.h +170 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ArchiveExtractCallback.cpp +3077 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ArchiveExtractCallback.h +641 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ArchiveName.cpp +176 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ArchiveName.h +16 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ArchiveOpenCallback.cpp +398 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ArchiveOpenCallback.h +182 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/Bench.cpp +5026 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/Bench.h +121 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/DefaultName.cpp +37 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/DefaultName.h +11 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/DirItem.h +407 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/EnumDirItems.cpp +1637 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/EnumDirItems.h +38 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ExitCode.h +27 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/Extract.cpp +575 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/Extract.h +107 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ExtractMode.h +44 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ExtractingFilePath.cpp +296 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ExtractingFilePath.h +31 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/HashCalc.cpp +2273 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/HashCalc.h +322 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/IFileExtractCallback.h +112 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/LoadCodecs.cpp +1337 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/LoadCodecs.h +482 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/OpenArchive.cpp +3702 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/OpenArchive.h +469 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/PropIDUtils.cpp +745 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/PropIDUtils.h +18 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/Property.h +14 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/SetProperties.cpp +88 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/SetProperties.h +10 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/SortUtils.cpp +25 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/SortUtils.h +10 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/StdAfx.h +11 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/TempFiles.cpp +20 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/TempFiles.h +19 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/Update.cpp +1931 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/Update.h +221 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/UpdateAction.cpp +64 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/UpdateAction.h +66 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/UpdateCallback.cpp +1069 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/UpdateCallback.h +197 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/UpdatePair.cpp +302 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/UpdatePair.h +27 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/UpdateProduce.cpp +74 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/UpdateProduce.h +60 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/WorkDir.cpp +84 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/WorkDir.h +30 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ZipRegistry.h +212 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/BenchCon.cpp +41 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/BenchCon.h +14 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/Console.mak +46 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/Console.manifest +16 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/ConsoleClose.cpp +98 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/ConsoleClose.h +39 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/ExtractCallbackConsole.cpp +946 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/ExtractCallbackConsole.h +211 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/HashCon.cpp +426 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/HashCon.h +58 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/List.cpp +1417 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/List.h +42 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/Main.cpp +1635 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/MainAr.cpp +235 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/OpenCallbackConsole.cpp +115 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/OpenCallbackConsole.h +73 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/PercentPrinter.cpp +186 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/PercentPrinter.h +66 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/StdAfx.cpp +3 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/StdAfx.h +11 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/UpdateCallbackConsole.cpp +998 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/UpdateCallbackConsole.h +148 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/UserInputUtils.cpp +118 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/UserInputUtils.h +27 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/makefile +68 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/makefile.gcc +187 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/resource.rc +7 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Explorer/MyMessages.cpp +43 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Explorer/MyMessages.h +16 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/BrowseDialog.cpp +1132 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/BrowseDialog.h +32 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/BrowseDialogRes.h +9 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/ComboDialog.cpp +64 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/ComboDialog.h +28 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/ComboDialogRes.h +4 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/DialogSize.h +16 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/ExtractCallback.cpp +1272 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/ExtractCallback.h +347 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/FormatUtils.cpp +28 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/FormatUtils.h +14 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/LangUtils.h +48 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/MemDialog.cpp +218 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/MemDialog.h +48 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/MemDialogRes.h +13 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/MyWindowsNew.h +119 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/OverwriteDialog.cpp +288 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/OverwriteDialog.h +89 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/OverwriteDialog.rc +93 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/OverwriteDialogRes.h +19 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/PasswordDialog.cpp +58 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/PasswordDialog.h +28 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/PasswordDialog.rc +18 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/PasswordDialogRes.h +5 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/ProgressDialog.cpp +201 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/ProgressDialog.h +171 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/ProgressDialog.rc +12 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/ProgressDialog2.cpp +1483 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/ProgressDialog2.h +355 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/ProgressDialog2.rc +40 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/ProgressDialog2Res.h +49 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/ProgressDialog2a.rc +85 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/ProgressDialogRes.h +3 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/PropertyName.cpp +23 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/PropertyName.h +10 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/PropertyNameRes.h +104 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/StdAfx.h +67 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/SysIconUtils.cpp +351 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/SysIconUtils.h +65 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/resource.h +199 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/resourceGui.h +25 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/GUI/7zG.exe.manifest +23 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/GUI/Extract.rc +59 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/GUI/ExtractDialog.cpp +421 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/GUI/ExtractDialog.h +113 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/GUI/ExtractDialog.rc +98 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/GUI/ExtractDialogRes.h +24 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/GUI/ExtractGUI.cpp +297 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/GUI/ExtractGUI.h +39 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/GUI/ExtractRes.h +51 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/GUI/HashGUI.h +27 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/GUI/resource2.h +2 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/cmpl_clang.mak +3 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/cmpl_clang_arm64.mak +3 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/cmpl_clang_x64.mak +3 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/cmpl_clang_x86.mak +3 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/cmpl_gcc.mak +3 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/cmpl_gcc_arm64.mak +3 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/cmpl_gcc_x64.mak +3 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/cmpl_gcc_x86.mak +3 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/cmpl_mac_arm64.mak +3 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/cmpl_mac_x64.mak +3 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/var_clang.mak +11 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/var_clang_arm64.mak +19 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/var_clang_x64.mak +11 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/var_clang_x86.mak +11 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/var_gcc.mak +12 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/var_gcc_arm64.mak +12 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/var_gcc_x64.mak +11 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/var_gcc_x86.mak +10 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/var_mac_arm64.mak +13 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/var_mac_x64.mak +11 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/warn_clang.mak +3 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/warn_clang_mac.mak +9 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/warn_gcc.mak +55 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Build.mak +252 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/AutoPtr.h +46 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/CRC.cpp +7 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/C_FileIO.cpp +3 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/C_FileIO.h +6 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/ComTry.h +21 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/CommandLineParser.cpp +231 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/CommandLineParser.h +63 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/Common.h +28 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/Common0.h +330 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/CrcReg.cpp +77 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/Defs.h +16 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/DynLimBuf.cpp +93 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/DynLimBuf.h +41 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/DynamicBuffer.h +76 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/IntToString.cpp +215 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/IntToString.h +54 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/Lang.h +30 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/ListFileUtils.cpp +150 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/ListFileUtils.h +18 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/LzFindPrepare.cpp +7 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyBuffer.h +297 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyBuffer2.h +185 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyCom.h +693 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyException.h +14 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyGuidDef.h +63 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyInitGuid.h +57 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyLinux.h +75 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyString.cpp +1842 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyString.h +1079 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyTypes.h +38 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyUnknown.h +8 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyVector.cpp +3 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyVector.h +724 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyWindows.cpp +292 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyWindows.h +325 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/NewHandler.cpp +340 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/NewHandler.h +121 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/Sha256Prepare.cpp +7 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/Sha256Reg.cpp +67 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/StdAfx.h +8 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/StdInStream.cpp +98 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/StdInStream.h +46 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/StdOutStream.cpp +248 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/StdOutStream.h +87 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/StringConvert.cpp +762 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/StringConvert.h +110 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/StringToInt.cpp +154 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/StringToInt.h +38 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/TextConfig.cpp +123 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/TextConfig.h +19 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/UTFConvert.cpp +863 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/UTFConvert.h +384 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/Wildcard.cpp +789 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/Wildcard.h +231 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/XzCrc64Init.cpp +7 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/XzCrc64Reg.cpp +39 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/COM.h +86 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Clipboard.cpp +130 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Clipboard.h +28 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/CommonDialog.cpp +269 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/CommonDialog.h +43 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/ComboBox.cpp +66 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/ComboBox.h +77 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/CommandBar.h +52 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/Dialog.cpp +446 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/Dialog.h +213 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/Edit.h +19 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/ImageList.cpp +10 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/ImageList.h +87 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/ListView.cpp +162 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/ListView.h +156 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/ProgressBar.h +35 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/PropertyPage.cpp +165 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/PropertyPage.h +50 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/ReBar.h +34 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/Static.h +28 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/StatusBar.h +42 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/StdAfx.h +11 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/ToolBar.h +43 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/Trackbar.h +27 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/Window2.cpp +202 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/Window2.h +53 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/DLL.cpp +178 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/DLL.h +103 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Defs.h +17 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/ErrorMsg.cpp +133 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/ErrorMsg.h +16 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileDir.cpp +1362 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileDir.h +172 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileFind.cpp +1449 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileFind.h +347 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileIO.cpp +954 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileIO.h +467 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileLink.cpp +697 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileMapping.cpp +12 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileMapping.h +66 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileName.cpp +911 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileName.h +142 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileSystem.cpp +187 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileSystem.h +31 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Handle.h +39 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/MemoryGlobal.cpp +36 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/MemoryGlobal.h +55 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/MemoryLock.cpp +127 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/MemoryLock.h +40 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/NtCheck.h +58 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/PropVariant.cpp +393 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/PropVariant.h +173 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/PropVariantConv.cpp +274 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/PropVariantConv.h +47 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Registry.cpp +474 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Registry.h +96 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/ResourceString.cpp +103 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/ResourceString.h +17 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/SecurityUtils.cpp +186 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/SecurityUtils.h +150 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Shell.cpp +839 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Shell.h +129 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/StdAfx.h +11 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Synchronization.cpp +87 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Synchronization.h +386 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/System.cpp +421 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/System.h +189 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/SystemInfo.cpp +1251 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/SystemInfo.h +19 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Thread.h +46 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/TimeUtils.cpp +467 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/TimeUtils.h +146 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Window.cpp +179 -0
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Window.h +363 -0
- package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Common/CRC.cs +55 -0
- package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Common/CommandLineParser.cs +274 -0
- package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Common/InBuffer.cs +72 -0
- package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Common/OutBuffer.cs +47 -0
- package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Compress/LZ/IMatchFinder.cs +24 -0
- package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Compress/LZ/LzBinTree.cs +367 -0
- package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Compress/LZ/LzInWindow.cs +132 -0
- package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Compress/LZ/LzOutWindow.cs +110 -0
- package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Compress/LZMA/LzmaBase.cs +76 -0
- package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Compress/LZMA/LzmaDecoder.cs +398 -0
- package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Compress/LZMA/LzmaEncoder.cs +1480 -0
- package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Compress/LzmaAlone/LzmaAlone.cs +364 -0
- package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Compress/LzmaAlone/LzmaAlone.sln +20 -0
- package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Compress/LzmaAlone/LzmaBench.cs +340 -0
- package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Compress/LzmaAlone/Properties/AssemblyInfo.cs +29 -0
- package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Compress/LzmaAlone/Properties/Resources.cs +70 -0
- package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Compress/LzmaAlone/Properties/Settings.cs +42 -0
- package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Compress/RangeCoder/RangeCoder.cs +234 -0
- package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Compress/RangeCoder/RangeCoderBit.cs +117 -0
- package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Compress/RangeCoder/RangeCoderBitTree.cs +157 -0
- package/harmony/pushy/src/main/cpp/lzma/CS/7zip/ICoder.cs +157 -0
- package/harmony/pushy/src/main/cpp/lzma/DOC/7zC.txt +187 -0
- package/harmony/pushy/src/main/cpp/lzma/DOC/7zFormat.txt +469 -0
- package/harmony/pushy/src/main/cpp/lzma/DOC/Methods.txt +177 -0
- package/harmony/pushy/src/main/cpp/lzma/DOC/installer.txt +166 -0
- package/harmony/pushy/src/main/cpp/lzma/DOC/lzma-history.txt +651 -0
- package/harmony/pushy/src/main/cpp/lzma/DOC/lzma-sdk.txt +437 -0
- package/harmony/pushy/src/main/cpp/lzma/DOC/lzma-specification.txt +1176 -0
- package/harmony/pushy/src/main/cpp/lzma/DOC/lzma.txt +345 -0
- package/harmony/pushy/src/main/cpp/lzma/Java/SevenZip/CRC.java +52 -0
- package/harmony/pushy/src/main/cpp/lzma/Java/SevenZip/Compression/LZ/BinTree.java +382 -0
- package/harmony/pushy/src/main/cpp/lzma/Java/SevenZip/Compression/LZ/InWindow.java +131 -0
- package/harmony/pushy/src/main/cpp/lzma/Java/SevenZip/Compression/LZ/OutWindow.java +85 -0
- package/harmony/pushy/src/main/cpp/lzma/Java/SevenZip/Compression/LZMA/Base.java +88 -0
- package/harmony/pushy/src/main/cpp/lzma/Java/SevenZip/Compression/LZMA/Decoder.java +329 -0
- package/harmony/pushy/src/main/cpp/lzma/Java/SevenZip/Compression/LZMA/Encoder.java +1416 -0
- package/harmony/pushy/src/main/cpp/lzma/Java/SevenZip/Compression/RangeCoder/BitTreeDecoder.java +55 -0
- package/harmony/pushy/src/main/cpp/lzma/Java/SevenZip/Compression/RangeCoder/BitTreeEncoder.java +99 -0
- package/harmony/pushy/src/main/cpp/lzma/Java/SevenZip/Compression/RangeCoder/Decoder.java +88 -0
- package/harmony/pushy/src/main/cpp/lzma/Java/SevenZip/Compression/RangeCoder/Encoder.java +151 -0
- package/harmony/pushy/src/main/cpp/lzma/Java/SevenZip/ICodeProgress.java +6 -0
- package/harmony/pushy/src/main/cpp/lzma/Java/SevenZip/LzmaAlone.java +253 -0
- package/harmony/pushy/src/main/cpp/lzma/Java/SevenZip/LzmaBench.java +392 -0
- package/harmony/pushy/src/main/cpp/lzma/bin/7zS2.sfx +0 -0
- package/harmony/pushy/src/main/cpp/lzma/bin/7zS2con.sfx +0 -0
- package/harmony/pushy/src/main/cpp/lzma/bin/7zSD.sfx +0 -0
- package/harmony/pushy/src/main/cpp/lzma/bin/7zdec.exe +0 -0
- package/harmony/pushy/src/main/cpp/lzma/bin/7zr.exe +0 -0
- package/harmony/pushy/src/main/cpp/lzma/bin/installer/config.txt +5 -0
- package/harmony/pushy/src/main/cpp/lzma/bin/installer/cr.bat +5 -0
- package/harmony/pushy/src/main/cpp/lzma/bin/lzma.exe +0 -0
- package/harmony/pushy/src/main/cpp/lzma/bin/x64/7zr.exe +0 -0
- package/package.json +1 -1
|
@@ -0,0 +1,1637 @@
|
|
|
1
|
+
//decompress_plugin_demo.h
|
|
2
|
+
// decompress plugin demo for HDiffz\HPatchz
|
|
3
|
+
/*
|
|
4
|
+
The MIT License (MIT)
|
|
5
|
+
Copyright (c) 2012-2017 HouSisong
|
|
6
|
+
|
|
7
|
+
Permission is hereby granted, free of charge, to any person
|
|
8
|
+
obtaining a copy of this software and associated documentation
|
|
9
|
+
files (the "Software"), to deal in the Software without
|
|
10
|
+
restriction, including without limitation the rights to use,
|
|
11
|
+
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
12
|
+
copies of the Software, and to permit persons to whom the
|
|
13
|
+
Software is furnished to do so, subject to the following
|
|
14
|
+
conditions:
|
|
15
|
+
|
|
16
|
+
The above copyright notice and this permission notice shall be
|
|
17
|
+
included in all copies of the Software.
|
|
18
|
+
|
|
19
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
20
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
|
21
|
+
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
22
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
23
|
+
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
24
|
+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
25
|
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
26
|
+
OTHER DEALINGS IN THE SOFTWARE.
|
|
27
|
+
*/
|
|
28
|
+
#ifndef HPatch_decompress_plugin_demo_h
|
|
29
|
+
#define HPatch_decompress_plugin_demo_h
|
|
30
|
+
//decompress plugin demo:
|
|
31
|
+
// zlibDecompressPlugin; // support all deflate encoding by zlib
|
|
32
|
+
// ldefDecompressPlugin; // optimized deompress speed for deflate encoding
|
|
33
|
+
// bz2DecompressPlugin;
|
|
34
|
+
// lzmaDecompressPlugin;
|
|
35
|
+
// lzma2DecompressPlugin;
|
|
36
|
+
// lz4DecompressPlugin;
|
|
37
|
+
// zstdDecompressPlugin;
|
|
38
|
+
// brotliDecompressPlugin;
|
|
39
|
+
// lzhamDecompressPlugin;
|
|
40
|
+
// tuzDecompressPlugin;
|
|
41
|
+
|
|
42
|
+
// _bz2DecompressPlugin_unsz : support for bspatch_with_cache()
|
|
43
|
+
// _7zXZDecompressPlugin : support for vcpatch_with_cache(), diffData created by "xdelta3 -S lzma ..."
|
|
44
|
+
// _7zXZDecompressPlugin_a : support for vcpatch_with_cache(), diffData created by "hdiffz -VCD-compressLevel ..."
|
|
45
|
+
#include <stdlib.h> //malloc free
|
|
46
|
+
#include <stdio.h> //fprintf
|
|
47
|
+
#include "libHDiffPatch/HPatch/patch_types.h"
|
|
48
|
+
|
|
49
|
+
#ifndef kDecompressBufSize
|
|
50
|
+
# define kDecompressBufSize (1024*32)
|
|
51
|
+
#endif
|
|
52
|
+
#ifndef _IsNeedIncludeDefaultCompressHead
|
|
53
|
+
# define _IsNeedIncludeDefaultCompressHead 1
|
|
54
|
+
#endif
|
|
55
|
+
|
|
56
|
+
#define _dec_memErr() _hpatch_update_decError(decompressPlugin,hpatch_dec_mem_error)
|
|
57
|
+
#define _dec_memErr_rt() do { _dec_memErr(); return 0; } while(0)
|
|
58
|
+
#define _dec_openErr_rt() do { _hpatch_update_decError(decompressPlugin,hpatch_dec_open_error); return 0; } while(0)
|
|
59
|
+
#define _dec_close_check(value) { if (!(value)) { LOG_ERR("check "#value " ERROR!\n"); \
|
|
60
|
+
result=hpatch_FALSE; _hpatch_update_decError(decompressPlugin,hpatch_dec_close_error); } }
|
|
61
|
+
|
|
62
|
+
#define _dec_onDecErr_rt() do { if (!(self)->decError) (self)->decError=hpatch_dec_error; return 0; } while(0)
|
|
63
|
+
#define _dec_onDecErr_up() do { if ((self)->decError) _hpatch_update_decError(decompressPlugin,(self)->decError); } while(0)
|
|
64
|
+
|
|
65
|
+
static void* _dec_malloc(hpatch_size_t size) {
|
|
66
|
+
void* result=malloc(size);
|
|
67
|
+
if (!result) LOG_ERRNO(errno);
|
|
68
|
+
return result;
|
|
69
|
+
}
|
|
70
|
+
#define __dec_Alloc_fun(_type_TDecompress,p,size) { \
|
|
71
|
+
void* result=_dec_malloc(size); \
|
|
72
|
+
if (!result) \
|
|
73
|
+
((_type_TDecompress*)p)->decError=hpatch_dec_mem_error; \
|
|
74
|
+
return result; }
|
|
75
|
+
|
|
76
|
+
static void __dec_free(void* _, void* address){
|
|
77
|
+
if (address) free(address); }
|
|
78
|
+
|
|
79
|
+
#ifdef _CompressPlugin_zlib
|
|
80
|
+
#if (_IsNeedIncludeDefaultCompressHead)
|
|
81
|
+
# include "zlib.h" // http://zlib.net/ https://github.com/madler/zlib
|
|
82
|
+
#endif
|
|
83
|
+
typedef struct _zlib_TDecompress{
|
|
84
|
+
hpatch_StreamPos_t code_begin;
|
|
85
|
+
hpatch_StreamPos_t code_end;
|
|
86
|
+
const struct hpatch_TStreamInput* codeStream;
|
|
87
|
+
|
|
88
|
+
unsigned char* dec_buf;
|
|
89
|
+
size_t dec_buf_size;
|
|
90
|
+
z_stream d_stream;
|
|
91
|
+
signed char windowBits;
|
|
92
|
+
hpatch_dec_error_t decError;
|
|
93
|
+
} _zlib_TDecompress;
|
|
94
|
+
static void * __zlib_dec_Alloc(void* p,uInt items,uInt size)
|
|
95
|
+
__dec_Alloc_fun(_zlib_TDecompress,p,((items)*(size_t)(size)))
|
|
96
|
+
static hpatch_BOOL _zlib_is_can_open(const char* compressType){
|
|
97
|
+
return (0==strcmp(compressType,"zlib"))||(0==strcmp(compressType,"pzlib"));
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
static _zlib_TDecompress* _zlib_decompress_open_at(hpatch_TDecompress* decompressPlugin,
|
|
101
|
+
const hpatch_TStreamInput* codeStream,
|
|
102
|
+
hpatch_StreamPos_t code_begin,
|
|
103
|
+
hpatch_StreamPos_t code_end,
|
|
104
|
+
int isSavedWindowBits,
|
|
105
|
+
_zlib_TDecompress* self,size_t _self_and_buf_size){
|
|
106
|
+
int ret;
|
|
107
|
+
signed char kWindowBits=-MAX_WBITS;
|
|
108
|
+
assert(_self_and_buf_size>sizeof(_zlib_TDecompress));
|
|
109
|
+
if (isSavedWindowBits){//load kWindowBits
|
|
110
|
+
if (code_end-code_begin<1) _dec_openErr_rt();
|
|
111
|
+
if (!codeStream->read(codeStream,code_begin,(unsigned char*)&kWindowBits,
|
|
112
|
+
(unsigned char*)&kWindowBits+1)) return 0;
|
|
113
|
+
++code_begin;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
memset(self,0,sizeof(_zlib_TDecompress));
|
|
117
|
+
self->dec_buf=((unsigned char*)self)+sizeof(_zlib_TDecompress);
|
|
118
|
+
self->dec_buf_size=_self_and_buf_size-sizeof(_zlib_TDecompress);
|
|
119
|
+
self->codeStream=codeStream;
|
|
120
|
+
self->code_begin=code_begin;
|
|
121
|
+
self->code_end=code_end;
|
|
122
|
+
self->windowBits=kWindowBits;
|
|
123
|
+
self->d_stream.zalloc=__zlib_dec_Alloc;
|
|
124
|
+
self->d_stream.zfree=__dec_free;
|
|
125
|
+
self->d_stream.opaque=self;
|
|
126
|
+
ret = inflateInit2(&self->d_stream,self->windowBits);
|
|
127
|
+
if (ret!=Z_OK) { _dec_onDecErr_up(); _dec_openErr_rt(); }
|
|
128
|
+
return self;
|
|
129
|
+
}
|
|
130
|
+
static hpatch_decompressHandle _zlib_decompress_open(hpatch_TDecompress* decompressPlugin,
|
|
131
|
+
hpatch_StreamPos_t dataSize,
|
|
132
|
+
const hpatch_TStreamInput* codeStream,
|
|
133
|
+
hpatch_StreamPos_t code_begin,
|
|
134
|
+
hpatch_StreamPos_t code_end){
|
|
135
|
+
_zlib_TDecompress* self=0;
|
|
136
|
+
unsigned char* _mem_buf=(unsigned char*)_dec_malloc(sizeof(_zlib_TDecompress)+kDecompressBufSize);
|
|
137
|
+
if (!_mem_buf) _dec_memErr_rt();
|
|
138
|
+
self=_zlib_decompress_open_at(decompressPlugin,codeStream,code_begin,code_end,1,
|
|
139
|
+
(_zlib_TDecompress*)_mem_buf,sizeof(_zlib_TDecompress)+kDecompressBufSize);
|
|
140
|
+
if (!self)
|
|
141
|
+
free(_mem_buf);
|
|
142
|
+
return self;
|
|
143
|
+
}
|
|
144
|
+
static hpatch_decompressHandle _zlib_decompress_open_deflate(hpatch_TDecompress* decompressPlugin,
|
|
145
|
+
hpatch_StreamPos_t dataSize,
|
|
146
|
+
const hpatch_TStreamInput* codeStream,
|
|
147
|
+
hpatch_StreamPos_t code_begin,
|
|
148
|
+
hpatch_StreamPos_t code_end){
|
|
149
|
+
_zlib_TDecompress* self=0;
|
|
150
|
+
unsigned char* _mem_buf=(unsigned char*)_dec_malloc(sizeof(_zlib_TDecompress)+kDecompressBufSize);
|
|
151
|
+
if (!_mem_buf) _dec_memErr_rt();
|
|
152
|
+
self=_zlib_decompress_open_at(decompressPlugin,codeStream,code_begin,code_end,0,
|
|
153
|
+
(_zlib_TDecompress*)_mem_buf,sizeof(_zlib_TDecompress)+kDecompressBufSize);
|
|
154
|
+
if (!self)
|
|
155
|
+
free(_mem_buf);
|
|
156
|
+
return self;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
static _zlib_TDecompress* _zlib_decompress_open_by(hpatch_TDecompress* decompressPlugin,
|
|
160
|
+
const hpatch_TStreamInput* codeStream,
|
|
161
|
+
hpatch_StreamPos_t code_begin,
|
|
162
|
+
hpatch_StreamPos_t code_end,
|
|
163
|
+
int isSavedWindowBits,
|
|
164
|
+
unsigned char* _mem_buf,size_t _mem_buf_size){
|
|
165
|
+
#define __MAX_TS(a,b) ((a)>=(b)?(a):(b))
|
|
166
|
+
const hpatch_size_t kZlibAlign=__MAX_TS(__MAX_TS(sizeof(hpatch_StreamPos_t),sizeof(void*)),sizeof(uLongf));
|
|
167
|
+
#undef __MAX_TS
|
|
168
|
+
unsigned char* _mem_buf_end=_mem_buf+_mem_buf_size;
|
|
169
|
+
unsigned char* self_at=(unsigned char*)_hpatch_align_upper(_mem_buf,kZlibAlign);
|
|
170
|
+
if (self_at>=_mem_buf_end) return 0;
|
|
171
|
+
return _zlib_decompress_open_at(decompressPlugin,codeStream,code_begin,code_end,isSavedWindowBits,
|
|
172
|
+
(_zlib_TDecompress*)self_at,_mem_buf_end-self_at);
|
|
173
|
+
}
|
|
174
|
+
static hpatch_BOOL _zlib_decompress_close_by(struct hpatch_TDecompress* decompressPlugin,
|
|
175
|
+
_zlib_TDecompress* self){
|
|
176
|
+
hpatch_BOOL result=hpatch_TRUE;
|
|
177
|
+
if (!self) return result;
|
|
178
|
+
_dec_onDecErr_up();
|
|
179
|
+
if (self->d_stream.state!=0){
|
|
180
|
+
_dec_close_check(Z_OK==inflateEnd(&self->d_stream));
|
|
181
|
+
}
|
|
182
|
+
memset(self,0,sizeof(_zlib_TDecompress));
|
|
183
|
+
return result;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
static hpatch_BOOL _zlib_decompress_close(struct hpatch_TDecompress* decompressPlugin,
|
|
187
|
+
hpatch_decompressHandle decompressHandle){
|
|
188
|
+
_zlib_TDecompress* self=(_zlib_TDecompress*)decompressHandle;
|
|
189
|
+
hpatch_BOOL result=_zlib_decompress_close_by(decompressPlugin,self);
|
|
190
|
+
if (self) free(self);
|
|
191
|
+
return result;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
static hpatch_BOOL _zlib_reset_for_next_node(z_stream* d_stream){
|
|
195
|
+
//backup
|
|
196
|
+
Bytef* next_out_back=d_stream->next_out;
|
|
197
|
+
Bytef* next_in_back=d_stream->next_in;
|
|
198
|
+
unsigned int avail_out_back=d_stream->avail_out;
|
|
199
|
+
unsigned int avail_in_back=d_stream->avail_in;
|
|
200
|
+
//reset
|
|
201
|
+
if (Z_OK!=inflateReset(d_stream)) return hpatch_FALSE;
|
|
202
|
+
//restore
|
|
203
|
+
d_stream->next_out=next_out_back;
|
|
204
|
+
d_stream->next_in=next_in_back;
|
|
205
|
+
d_stream->avail_out=avail_out_back;
|
|
206
|
+
d_stream->avail_in=avail_in_back;
|
|
207
|
+
return hpatch_TRUE;
|
|
208
|
+
}
|
|
209
|
+
static hpatch_BOOL __zlib_do_inflate(hpatch_decompressHandle decompressHandle){
|
|
210
|
+
_zlib_TDecompress* self=(_zlib_TDecompress*)decompressHandle;
|
|
211
|
+
uInt avail_out_back,avail_in_back;
|
|
212
|
+
int ret;
|
|
213
|
+
hpatch_StreamPos_t codeLen=(self->code_end - self->code_begin);
|
|
214
|
+
if ((self->d_stream.avail_in==0)&&(codeLen>0)) {
|
|
215
|
+
size_t readLen=self->dec_buf_size;
|
|
216
|
+
if (readLen>codeLen) readLen=(size_t)codeLen;
|
|
217
|
+
self->d_stream.next_in=self->dec_buf;
|
|
218
|
+
if (!self->codeStream->read(self->codeStream,self->code_begin,self->dec_buf,
|
|
219
|
+
self->dec_buf+readLen)) return hpatch_FALSE;//error;
|
|
220
|
+
self->d_stream.avail_in=(uInt)readLen;
|
|
221
|
+
self->code_begin+=readLen;
|
|
222
|
+
codeLen-=readLen;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
avail_out_back=self->d_stream.avail_out;
|
|
226
|
+
avail_in_back=self->d_stream.avail_in;
|
|
227
|
+
ret=inflate(&self->d_stream,Z_NO_FLUSH);
|
|
228
|
+
if (ret==Z_OK){
|
|
229
|
+
if ((self->d_stream.avail_in==avail_in_back)&&(self->d_stream.avail_out==avail_out_back))
|
|
230
|
+
_dec_onDecErr_rt();//error;
|
|
231
|
+
}else if (ret==Z_STREAM_END){
|
|
232
|
+
if (self->d_stream.avail_in+codeLen>0){ //next compress node!
|
|
233
|
+
if (!_zlib_reset_for_next_node(&self->d_stream))
|
|
234
|
+
_dec_onDecErr_rt();//error;
|
|
235
|
+
}else{//all end
|
|
236
|
+
if (self->d_stream.avail_out!=0)
|
|
237
|
+
_dec_onDecErr_rt();//error;
|
|
238
|
+
}
|
|
239
|
+
}else{
|
|
240
|
+
_dec_onDecErr_rt();//error;
|
|
241
|
+
}
|
|
242
|
+
return hpatch_TRUE;
|
|
243
|
+
}
|
|
244
|
+
static hpatch_BOOL _zlib_decompress_part(hpatch_decompressHandle decompressHandle,
|
|
245
|
+
unsigned char* out_part_data,unsigned char* out_part_data_end){
|
|
246
|
+
_zlib_TDecompress* self=(_zlib_TDecompress*)decompressHandle;
|
|
247
|
+
assert(out_part_data<=out_part_data_end);
|
|
248
|
+
|
|
249
|
+
self->d_stream.next_out = out_part_data;
|
|
250
|
+
self->d_stream.avail_out =(uInt)(out_part_data_end-out_part_data);
|
|
251
|
+
while (self->d_stream.avail_out>0) {
|
|
252
|
+
if (!__zlib_do_inflate(self))
|
|
253
|
+
return hpatch_FALSE;//error;
|
|
254
|
+
}
|
|
255
|
+
return hpatch_TRUE;
|
|
256
|
+
}
|
|
257
|
+
static hpatch_inline int _zlib_is_decompress_finish(const hpatch_TDecompress* decompressPlugin,
|
|
258
|
+
hpatch_decompressHandle decompressHandle){
|
|
259
|
+
_zlib_TDecompress* self=(_zlib_TDecompress*)decompressHandle;
|
|
260
|
+
unsigned char _empty=0;
|
|
261
|
+
while (self->code_begin!=self->code_end){ //for end tag code
|
|
262
|
+
self->d_stream.next_out = &_empty;
|
|
263
|
+
self->d_stream.avail_out=0;
|
|
264
|
+
if (!__zlib_do_inflate(self)){
|
|
265
|
+
self->d_stream.next_out=0;
|
|
266
|
+
return hpatch_FALSE;//error;
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
self->d_stream.next_out=0;
|
|
270
|
+
return (self->code_begin==self->code_end)
|
|
271
|
+
&(self->d_stream.avail_in==0)
|
|
272
|
+
&(self->d_stream.avail_out==0);
|
|
273
|
+
}
|
|
274
|
+
static hpatch_TDecompress zlibDecompressPlugin={_zlib_is_can_open,_zlib_decompress_open,
|
|
275
|
+
_zlib_decompress_close,_zlib_decompress_part};
|
|
276
|
+
static hpatch_TDecompress zlibDecompressPlugin_deflate={_zlib_is_can_open,_zlib_decompress_open_deflate,
|
|
277
|
+
_zlib_decompress_close,_zlib_decompress_part};
|
|
278
|
+
#endif//_CompressPlugin_zlib
|
|
279
|
+
|
|
280
|
+
|
|
281
|
+
#ifdef _CompressPlugin_ldef
|
|
282
|
+
#if (_IsNeedIncludeDefaultCompressHead)
|
|
283
|
+
# include "libdeflate.h" // https://github.com/sisong/libdeflate/tree/stream-mt based on https://github.com/ebiggers/libdeflate
|
|
284
|
+
# if (_CompressPlugin_ldef_is_use_zlib)
|
|
285
|
+
# include "zlib.h" // https://github.com/sisong/zlib/tree/bit_pos_padding based on https://github.com/madler/zlib
|
|
286
|
+
# endif
|
|
287
|
+
#endif
|
|
288
|
+
static const size_t _de_ldef_kDictSize = 1024*32;
|
|
289
|
+
static const size_t _de_ldef_kMaxBlockSize =1024*32*19;
|
|
290
|
+
// used _de_ldef_kMaxBlockSize*2 memory; optimized speed for
|
|
291
|
+
// libdefalte & zlib's deflate code ..., when theirs input deflate code compress block size<=_de_ldef_kMaxBlockSize/2;
|
|
292
|
+
// if (_de_ldef_kMaxBlockSize>=compress block size>_de_ldef_kMaxBlockSize/2) speed will little slower;
|
|
293
|
+
// if (compress block size>_de_ldef_kMaxBlockSize) && if (_CompressPlugin_ldef_is_use_zlib!=0),
|
|
294
|
+
// then swap to zlib decompressor & very slower (slower than zlib); && if (_CompressPlugin_ldef_is_use_zlib==0) will decompress fail.
|
|
295
|
+
|
|
296
|
+
typedef struct _ldef_TDecompress{
|
|
297
|
+
hpatch_StreamPos_t code_begin;
|
|
298
|
+
hpatch_StreamPos_t code_end;
|
|
299
|
+
const struct hpatch_TStreamInput* codeStream;
|
|
300
|
+
|
|
301
|
+
unsigned char* data_buf;
|
|
302
|
+
size_t data_buf_size;
|
|
303
|
+
unsigned char* code_buf;
|
|
304
|
+
size_t code_buf_size;
|
|
305
|
+
struct libdeflate_decompressor* d;
|
|
306
|
+
hpatch_dec_error_t decError;
|
|
307
|
+
|
|
308
|
+
size_t data_cur;
|
|
309
|
+
size_t out_cur;
|
|
310
|
+
size_t code_cur;
|
|
311
|
+
#if (_CompressPlugin_ldef_is_use_zlib)
|
|
312
|
+
hpatch_BOOL is_swap_to_zlib;
|
|
313
|
+
z_stream d_stream;
|
|
314
|
+
#endif
|
|
315
|
+
} _ldef_TDecompress;
|
|
316
|
+
|
|
317
|
+
#if (_CompressPlugin_ldef_is_use_zlib)
|
|
318
|
+
static hpatch_inline hpatch_BOOL _ldef_is_swap_to_zlib(_ldef_TDecompress* self){
|
|
319
|
+
return self->is_swap_to_zlib;
|
|
320
|
+
}
|
|
321
|
+
static hpatch_BOOL _ldef_decompress_part(hpatch_decompressHandle decompressHandle,
|
|
322
|
+
unsigned char* out_part_data,unsigned char* out_part_data_end);
|
|
323
|
+
static hpatch_BOOL _ldef_swap_from_zlib(_ldef_TDecompress* self){
|
|
324
|
+
const size_t out_part_len=self->d_stream.avail_out;
|
|
325
|
+
self->is_swap_to_zlib=hpatch_FALSE;
|
|
326
|
+
libdeflate_deflate_decompress_block_reset(self->d);
|
|
327
|
+
{
|
|
328
|
+
unsigned long shift_v;
|
|
329
|
+
unsigned int shift_bit;
|
|
330
|
+
zlib_inflate_shift_value(&self->d_stream,&shift_v,&shift_bit);
|
|
331
|
+
if (shift_bit>>3) _dec_onDecErr_rt();
|
|
332
|
+
libdeflate_deflate_decompress_set_state(self->d,(uint16_t)((shift_v<<3)|shift_bit));
|
|
333
|
+
}
|
|
334
|
+
assert(self->data_cur==_de_ldef_kDictSize);
|
|
335
|
+
self->code_cur=self->code_buf_size-self->d_stream.avail_in;
|
|
336
|
+
assert(self->d_stream.next_in==self->code_buf+self->code_cur);
|
|
337
|
+
{
|
|
338
|
+
uInt dict_size=0;
|
|
339
|
+
if (Z_OK!=inflateGetDictionary(&self->d_stream,0,&dict_size)) _dec_onDecErr_rt();
|
|
340
|
+
if (Z_OK!=inflateGetDictionary(&self->d_stream,self->data_buf+self->data_cur-dict_size,0)) _dec_onDecErr_rt();
|
|
341
|
+
}
|
|
342
|
+
if (out_part_len>0)
|
|
343
|
+
return _ldef_decompress_part(self,self->d_stream.next_out,self->d_stream.next_out+out_part_len);
|
|
344
|
+
else
|
|
345
|
+
return hpatch_TRUE;
|
|
346
|
+
}
|
|
347
|
+
static hpatch_BOOL _ldef_decompress_part_by_zlib(_ldef_TDecompress* self,
|
|
348
|
+
unsigned char* out_part_data,size_t out_part_len){
|
|
349
|
+
self->d_stream.next_out=out_part_data;
|
|
350
|
+
self->d_stream.avail_out=(uInt)out_part_len;
|
|
351
|
+
while (self->d_stream.avail_out){
|
|
352
|
+
uInt avail_out_back,avail_in_back;
|
|
353
|
+
int ret;
|
|
354
|
+
hpatch_StreamPos_t codeLen=(self->code_end-self->code_begin);
|
|
355
|
+
if ((self->d_stream.avail_in==0)&&(codeLen>0)) {
|
|
356
|
+
size_t readLen=self->code_buf_size;
|
|
357
|
+
if (readLen>codeLen) readLen=(size_t)codeLen;
|
|
358
|
+
self->d_stream.next_in=self->code_buf+self->code_buf_size-readLen;
|
|
359
|
+
if (!self->codeStream->read(self->codeStream,self->code_begin,self->d_stream.next_in,
|
|
360
|
+
self->d_stream.next_in+readLen)) return hpatch_FALSE;//error;
|
|
361
|
+
self->d_stream.avail_in=(uInt)readLen;
|
|
362
|
+
self->code_begin+=readLen;
|
|
363
|
+
codeLen-=readLen;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
avail_out_back=self->d_stream.avail_out;
|
|
367
|
+
avail_in_back=self->d_stream.avail_in;
|
|
368
|
+
ret=inflate(&self->d_stream,Z_BLOCK);
|
|
369
|
+
if (ret==Z_OK){
|
|
370
|
+
if ((self->d_stream.avail_in==avail_in_back)&&(self->d_stream.avail_out==avail_out_back))
|
|
371
|
+
_dec_onDecErr_rt();//error;
|
|
372
|
+
if (zlib_inflate_is_block_end(&self->d_stream)&&(!zlib_inflate_is_last_block_end(&self->d_stream)))
|
|
373
|
+
return _ldef_swap_from_zlib(self);
|
|
374
|
+
}else if (ret==Z_STREAM_END){
|
|
375
|
+
if (self->d_stream.avail_in+codeLen>0){ //next compress node!
|
|
376
|
+
zlib_inflate_set_shift_value(&self->d_stream,0,0);
|
|
377
|
+
return _ldef_swap_from_zlib(self);
|
|
378
|
+
}else{//all end
|
|
379
|
+
if (self->d_stream.avail_out!=0)
|
|
380
|
+
_dec_onDecErr_rt();//error;
|
|
381
|
+
}
|
|
382
|
+
}else{
|
|
383
|
+
_dec_onDecErr_rt();//error;
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
return hpatch_TRUE;
|
|
387
|
+
}
|
|
388
|
+
static hpatch_BOOL _ldef_swap_to_zlib(_ldef_TDecompress* self,uint16_t dec_state,
|
|
389
|
+
unsigned char* out_part_data,size_t out_part_len){
|
|
390
|
+
self->is_swap_to_zlib=hpatch_TRUE;
|
|
391
|
+
if (self->d_stream.state==0){
|
|
392
|
+
if (Z_OK!=inflateInit2(&self->d_stream,-15)){
|
|
393
|
+
if (!self->decError) self->decError=hpatch_dec_open_error;
|
|
394
|
+
return hpatch_FALSE;
|
|
395
|
+
}
|
|
396
|
+
}else{
|
|
397
|
+
if (Z_OK!=inflateReset(&self->d_stream)) _dec_onDecErr_rt();
|
|
398
|
+
}
|
|
399
|
+
zlib_inflate_set_shift_value(&self->d_stream,(uLong)(dec_state>>3),(uInt)(dec_state&((1<<3)-1)));
|
|
400
|
+
if (Z_OK!=inflateSetDictionary(&self->d_stream,self->data_buf+self->data_cur-_de_ldef_kDictSize,(uInt)_de_ldef_kDictSize)) _dec_onDecErr_rt();
|
|
401
|
+
self->d_stream.next_in=self->code_buf+self->code_cur;
|
|
402
|
+
self->d_stream.avail_in=(uInt)(self->code_buf_size-self->code_cur);
|
|
403
|
+
return _ldef_decompress_part_by_zlib(self,out_part_data,out_part_len);
|
|
404
|
+
}
|
|
405
|
+
#endif //_CompressPlugin_ldef_is_use_zlib
|
|
406
|
+
|
|
407
|
+
static hpatch_BOOL _ldef_is_can_open(const char* compressType){
|
|
408
|
+
return (0==strcmp(compressType,"zlib"))||(0==strcmp(compressType,"pzlib"));
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
static _ldef_TDecompress* _ldef_decompress_open_at(hpatch_TDecompress* decompressPlugin,
|
|
412
|
+
const hpatch_TStreamInput* codeStream,
|
|
413
|
+
hpatch_StreamPos_t code_begin,hpatch_StreamPos_t code_end,
|
|
414
|
+
int isSavedWindowBits,_ldef_TDecompress* self,
|
|
415
|
+
size_t data_buf_size,size_t code_buf_size){
|
|
416
|
+
if (isSavedWindowBits){//load kWindowBits
|
|
417
|
+
signed char kWindowBits=0;
|
|
418
|
+
if (code_end-code_begin<1) _dec_openErr_rt();
|
|
419
|
+
if (!codeStream->read(codeStream,code_begin,(unsigned char*)&kWindowBits,
|
|
420
|
+
(unsigned char*)&kWindowBits+1)) return 0;
|
|
421
|
+
++code_begin;
|
|
422
|
+
if (!((-15<=kWindowBits)&&(kWindowBits<0)))
|
|
423
|
+
_dec_openErr_rt(); //now, unsupported these window bits
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
memset(self,0,sizeof(_ldef_TDecompress));
|
|
427
|
+
self->d=libdeflate_alloc_decompressor();
|
|
428
|
+
if (!self->d) _dec_memErr_rt();
|
|
429
|
+
self->data_buf=((unsigned char*)self)+sizeof(_ldef_TDecompress);
|
|
430
|
+
self->data_buf_size=data_buf_size;
|
|
431
|
+
self->code_buf=self->data_buf+data_buf_size;
|
|
432
|
+
self->code_buf_size=code_buf_size;
|
|
433
|
+
self->codeStream=codeStream;
|
|
434
|
+
self->code_begin=code_begin;
|
|
435
|
+
self->code_end=code_end;
|
|
436
|
+
|
|
437
|
+
self->data_cur=_de_ldef_kDictSize; //empty
|
|
438
|
+
self->out_cur=_de_ldef_kDictSize;
|
|
439
|
+
self->code_cur=code_buf_size; //empty
|
|
440
|
+
return self;
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
static hpatch_decompressHandle _ldef_decompress_open(hpatch_TDecompress* decompressPlugin,
|
|
444
|
+
hpatch_StreamPos_t dataSize,
|
|
445
|
+
const hpatch_TStreamInput* codeStream,
|
|
446
|
+
hpatch_StreamPos_t code_begin,
|
|
447
|
+
hpatch_StreamPos_t code_end){
|
|
448
|
+
_ldef_TDecompress* self=0;
|
|
449
|
+
const hpatch_StreamPos_t in_size=code_end-code_begin;
|
|
450
|
+
const size_t data_buf_size=_de_ldef_kDictSize+((_de_ldef_kMaxBlockSize<dataSize)?_de_ldef_kMaxBlockSize:(size_t)dataSize);
|
|
451
|
+
const size_t code_buf_size=(_de_ldef_kMaxBlockSize<in_size)?_de_ldef_kMaxBlockSize:(size_t)in_size;
|
|
452
|
+
size_t _mem_size=sizeof(_ldef_TDecompress)+data_buf_size+code_buf_size;
|
|
453
|
+
unsigned char* _mem_buf=(unsigned char*)_dec_malloc(_mem_size);
|
|
454
|
+
if (!_mem_buf) _dec_memErr_rt();
|
|
455
|
+
|
|
456
|
+
self=_ldef_decompress_open_at(decompressPlugin,codeStream,code_begin,code_end,1,
|
|
457
|
+
(_ldef_TDecompress*)_mem_buf,data_buf_size,code_buf_size);
|
|
458
|
+
if (!self)
|
|
459
|
+
free(_mem_buf);
|
|
460
|
+
return self;
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
static hpatch_BOOL _ldef_decompress_close_by(struct hpatch_TDecompress* decompressPlugin,
|
|
464
|
+
_ldef_TDecompress* self){
|
|
465
|
+
hpatch_BOOL result=hpatch_TRUE;
|
|
466
|
+
if (!self) return result;
|
|
467
|
+
_dec_onDecErr_up();
|
|
468
|
+
#if (_CompressPlugin_ldef_is_use_zlib)
|
|
469
|
+
if (self->d_stream.state!=0){
|
|
470
|
+
_dec_close_check(Z_OK==inflateEnd(&self->d_stream));
|
|
471
|
+
}
|
|
472
|
+
#endif
|
|
473
|
+
if (self->d!=0)
|
|
474
|
+
libdeflate_free_decompressor(self->d);
|
|
475
|
+
memset(self,0,sizeof(_ldef_TDecompress));
|
|
476
|
+
return result;
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
static hpatch_BOOL _ldef_decompress_close(struct hpatch_TDecompress* decompressPlugin,
|
|
480
|
+
hpatch_decompressHandle decompressHandle){
|
|
481
|
+
_ldef_TDecompress* self=(_ldef_TDecompress*)decompressHandle;
|
|
482
|
+
hpatch_BOOL result=_ldef_decompress_close_by(decompressPlugin,self);
|
|
483
|
+
if (self) free(self);
|
|
484
|
+
return result;
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
static hpatch_BOOL _ldef_decompress_part(hpatch_decompressHandle decompressHandle,
|
|
488
|
+
unsigned char* out_part_data,unsigned char* out_part_data_end){
|
|
489
|
+
_ldef_TDecompress* self=(_ldef_TDecompress*)decompressHandle;
|
|
490
|
+
size_t out_part_len=out_part_data_end-out_part_data;
|
|
491
|
+
#if (_CompressPlugin_ldef_is_use_zlib)
|
|
492
|
+
if (_ldef_is_swap_to_zlib(self)&&out_part_len)
|
|
493
|
+
return _ldef_decompress_part_by_zlib(self,out_part_data,out_part_len);
|
|
494
|
+
#endif
|
|
495
|
+
const size_t kDictSize=_de_ldef_kDictSize;
|
|
496
|
+
// [ ( dict ) | dataBuf ] [ codeBuf ]
|
|
497
|
+
// ^ ^ ^ ^ ^ ^ ^
|
|
498
|
+
// data_buf out_cur data_cur data_buf_size code_buf code_cur code_buf_size
|
|
499
|
+
while (out_part_len) {
|
|
500
|
+
{//write data out
|
|
501
|
+
size_t out_len=self->data_cur-self->out_cur;
|
|
502
|
+
if (out_len){ //have data
|
|
503
|
+
out_len=(out_len<out_part_len)?out_len:out_part_len;
|
|
504
|
+
memcpy(out_part_data,self->data_buf+self->out_cur,out_len);
|
|
505
|
+
self->out_cur+=out_len;
|
|
506
|
+
out_part_data+=out_len;
|
|
507
|
+
out_part_len-=out_len;
|
|
508
|
+
continue;
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
size_t kLimitDataSize=_de_ldef_kMaxBlockSize/2+kDictSize;
|
|
513
|
+
size_t kLimitCodeSize=self->code_buf_size/2;
|
|
514
|
+
__datas_prepare:
|
|
515
|
+
{//read code in
|
|
516
|
+
if (self->code_cur>kLimitCodeSize){
|
|
517
|
+
const hpatch_StreamPos_t _codeSize=self->code_end-self->code_begin;
|
|
518
|
+
size_t read_len=(self->code_cur<_codeSize)?self->code_cur:(size_t)_codeSize;
|
|
519
|
+
if (read_len){
|
|
520
|
+
size_t code_len=self->code_buf_size-self->code_cur;
|
|
521
|
+
unsigned char* pcode=self->code_buf+self->code_cur;
|
|
522
|
+
unsigned char* pdst=pcode-read_len;
|
|
523
|
+
memmove(pdst,pcode,code_len);
|
|
524
|
+
pdst+=code_len;
|
|
525
|
+
if (!self->codeStream->read(self->codeStream,self->code_begin,pdst,pdst+read_len))
|
|
526
|
+
return 0; //read error
|
|
527
|
+
self->code_begin+=read_len;
|
|
528
|
+
self->code_cur-=read_len;
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
{//move dict
|
|
533
|
+
if (self->data_cur>kLimitDataSize){
|
|
534
|
+
size_t move_offset=self->data_cur-kDictSize;
|
|
535
|
+
if (move_offset){
|
|
536
|
+
memmove(self->data_buf,self->data_buf+move_offset,kDictSize);
|
|
537
|
+
self->data_cur=kDictSize;
|
|
538
|
+
self->out_cur=kDictSize;
|
|
539
|
+
}
|
|
540
|
+
}
|
|
541
|
+
}
|
|
542
|
+
{// decompress
|
|
543
|
+
int is_final_block_ret;
|
|
544
|
+
size_t actual_in_nbytes_ret;
|
|
545
|
+
size_t actual_out_nbytes_ret;
|
|
546
|
+
const uint16_t dec_state=libdeflate_deflate_decompress_get_state(self->d);
|
|
547
|
+
enum libdeflate_result ret=libdeflate_deflate_decompress_block(self->d,
|
|
548
|
+
self->code_buf+self->code_cur,self->code_buf_size-self->code_cur,
|
|
549
|
+
self->data_buf,self->data_cur,self->data_buf_size-self->data_cur,
|
|
550
|
+
&actual_in_nbytes_ret,&actual_out_nbytes_ret,
|
|
551
|
+
LIBDEFLATE_STOP_BY_ANY_BLOCK,&is_final_block_ret);
|
|
552
|
+
if (ret!=LIBDEFLATE_SUCCESS){
|
|
553
|
+
if ((self->code_begin==self->code_end)&&(ret!=LIBDEFLATE_INSUFFICIENT_SPACE))
|
|
554
|
+
_dec_onDecErr_rt();
|
|
555
|
+
if ((self->data_cur>kDictSize)||((self->code_cur>0)&&(self->code_begin<self->code_end))){
|
|
556
|
+
kLimitDataSize=kDictSize;
|
|
557
|
+
kLimitCodeSize=0;
|
|
558
|
+
libdeflate_deflate_decompress_set_state(self->d,dec_state);
|
|
559
|
+
goto __datas_prepare; //retry by libdefalte
|
|
560
|
+
}
|
|
561
|
+
#if (_CompressPlugin_ldef_is_use_zlib)
|
|
562
|
+
return _ldef_swap_to_zlib(self,dec_state,out_part_data,out_part_len); //retry by zlib
|
|
563
|
+
#else
|
|
564
|
+
_dec_onDecErr_rt();
|
|
565
|
+
#endif
|
|
566
|
+
}
|
|
567
|
+
self->code_cur+=actual_in_nbytes_ret;
|
|
568
|
+
self->data_cur+=actual_out_nbytes_ret;
|
|
569
|
+
if (is_final_block_ret)
|
|
570
|
+
libdeflate_deflate_decompress_block_reset(self->d);
|
|
571
|
+
}
|
|
572
|
+
}
|
|
573
|
+
return hpatch_TRUE;
|
|
574
|
+
}
|
|
575
|
+
static hpatch_TDecompress ldefDecompressPlugin={_ldef_is_can_open,_ldef_decompress_open,
|
|
576
|
+
_ldef_decompress_close,_ldef_decompress_part};
|
|
577
|
+
#endif//_CompressPlugin_ldef
|
|
578
|
+
|
|
579
|
+
|
|
580
|
+
#ifdef _CompressPlugin_bz2
|
|
581
|
+
#if (_IsNeedIncludeDefaultCompressHead)
|
|
582
|
+
# include "bzlib.h" // http://www.bzip.org/ https://github.com/sisong/bzip2
|
|
583
|
+
#endif
|
|
584
|
+
typedef struct _bz2_TDecompress{
|
|
585
|
+
const struct hpatch_TStreamInput* codeStream;
|
|
586
|
+
hpatch_StreamPos_t code_begin;
|
|
587
|
+
hpatch_StreamPos_t code_end;
|
|
588
|
+
|
|
589
|
+
bz_stream d_stream;
|
|
590
|
+
hpatch_dec_error_t decError;
|
|
591
|
+
unsigned char dec_buf[kDecompressBufSize];
|
|
592
|
+
} _bz2_TDecompress;
|
|
593
|
+
static hpatch_BOOL _bz2_is_can_open(const char* compressType){
|
|
594
|
+
return (0==strcmp(compressType,"bz2"))||(0==strcmp(compressType,"bzip2"))
|
|
595
|
+
||(0==strcmp(compressType,"pbz2"))||(0==strcmp(compressType,"pbzip2"));
|
|
596
|
+
}
|
|
597
|
+
static hpatch_decompressHandle _bz2_open(struct hpatch_TDecompress* decompressPlugin,
|
|
598
|
+
hpatch_StreamPos_t dataSize,
|
|
599
|
+
const hpatch_TStreamInput* codeStream,
|
|
600
|
+
hpatch_StreamPos_t code_begin,
|
|
601
|
+
hpatch_StreamPos_t code_end){
|
|
602
|
+
int ret;
|
|
603
|
+
_bz2_TDecompress* self=(_bz2_TDecompress*)_dec_malloc(sizeof(_bz2_TDecompress));
|
|
604
|
+
if (!self) _dec_memErr_rt();
|
|
605
|
+
memset(self,0,sizeof(_bz2_TDecompress)-kDecompressBufSize);
|
|
606
|
+
self->codeStream=codeStream;
|
|
607
|
+
self->code_begin=code_begin;
|
|
608
|
+
self->code_end=code_end;
|
|
609
|
+
|
|
610
|
+
ret=BZ2_bzDecompressInit(&self->d_stream,0,0);
|
|
611
|
+
if (ret!=BZ_OK){ free(self); _dec_openErr_rt(); }
|
|
612
|
+
return self;
|
|
613
|
+
}
|
|
614
|
+
static hpatch_BOOL _bz2_close(struct hpatch_TDecompress* decompressPlugin,
|
|
615
|
+
hpatch_decompressHandle decompressHandle){
|
|
616
|
+
hpatch_BOOL result=hpatch_TRUE;
|
|
617
|
+
_bz2_TDecompress* self=(_bz2_TDecompress*)decompressHandle;
|
|
618
|
+
if (!self) return result;
|
|
619
|
+
_dec_onDecErr_up();
|
|
620
|
+
_dec_close_check(BZ_OK==BZ2_bzDecompressEnd(&self->d_stream));
|
|
621
|
+
free(self);
|
|
622
|
+
return result;
|
|
623
|
+
}
|
|
624
|
+
static hpatch_BOOL _bz2_reset_for_next_node(_bz2_TDecompress* self){
|
|
625
|
+
//backup
|
|
626
|
+
char* next_out_back=self->d_stream.next_out;
|
|
627
|
+
char* next_in_back=self->d_stream.next_in;
|
|
628
|
+
unsigned int avail_out_back=self->d_stream.avail_out;
|
|
629
|
+
unsigned int avail_in_back=self->d_stream.avail_in;
|
|
630
|
+
//reset
|
|
631
|
+
if (BZ_OK!=BZ2_bzDecompressEnd(&self->d_stream)) _dec_onDecErr_rt();
|
|
632
|
+
if (BZ_OK!=BZ2_bzDecompressInit(&self->d_stream,0,0)) _dec_onDecErr_rt();
|
|
633
|
+
//restore
|
|
634
|
+
self->d_stream.next_out=next_out_back;
|
|
635
|
+
self->d_stream.next_in=next_in_back;
|
|
636
|
+
self->d_stream.avail_out=avail_out_back;
|
|
637
|
+
self->d_stream.avail_in=avail_in_back;
|
|
638
|
+
return hpatch_TRUE;
|
|
639
|
+
}
|
|
640
|
+
|
|
641
|
+
static hpatch_BOOL _bz2_decompress_part_(hpatch_decompressHandle decompressHandle,
|
|
642
|
+
unsigned char* out_part_data,unsigned char* out_part_data_end,
|
|
643
|
+
hpatch_BOOL isMustOutData){
|
|
644
|
+
_bz2_TDecompress* self=(_bz2_TDecompress*)decompressHandle;
|
|
645
|
+
assert(out_part_data<=out_part_data_end);
|
|
646
|
+
|
|
647
|
+
self->d_stream.next_out =(char*)out_part_data;
|
|
648
|
+
self->d_stream.avail_out =(unsigned int)(out_part_data_end-out_part_data);
|
|
649
|
+
while (self->d_stream.avail_out>0) {
|
|
650
|
+
unsigned int avail_out_back,avail_in_back;
|
|
651
|
+
int ret;
|
|
652
|
+
hpatch_StreamPos_t codeLen=(self->code_end - self->code_begin);
|
|
653
|
+
if ((self->d_stream.avail_in==0)&&(codeLen>0)) {
|
|
654
|
+
size_t readLen=kDecompressBufSize;
|
|
655
|
+
self->d_stream.next_in=(char*)self->dec_buf;
|
|
656
|
+
if (readLen>codeLen) readLen=(size_t)codeLen;
|
|
657
|
+
if (!self->codeStream->read(self->codeStream,self->code_begin,self->dec_buf,
|
|
658
|
+
self->dec_buf+readLen)) return hpatch_FALSE;//error;
|
|
659
|
+
self->d_stream.avail_in=(unsigned int)readLen;
|
|
660
|
+
self->code_begin+=readLen;
|
|
661
|
+
codeLen-=readLen;
|
|
662
|
+
}
|
|
663
|
+
|
|
664
|
+
avail_out_back=self->d_stream.avail_out;
|
|
665
|
+
avail_in_back=self->d_stream.avail_in;
|
|
666
|
+
ret=BZ2_bzDecompress(&self->d_stream);
|
|
667
|
+
if (ret==BZ_OK){
|
|
668
|
+
if ((self->d_stream.avail_in==avail_in_back)&&(self->d_stream.avail_out==avail_out_back))
|
|
669
|
+
_dec_onDecErr_rt();//error;
|
|
670
|
+
}else if (ret==BZ_STREAM_END){
|
|
671
|
+
if (self->d_stream.avail_in+codeLen>0){ //next compress node!
|
|
672
|
+
if (!_bz2_reset_for_next_node(self))
|
|
673
|
+
return hpatch_FALSE;//error;
|
|
674
|
+
}else{//all end
|
|
675
|
+
if (self->d_stream.avail_out!=0){
|
|
676
|
+
if (isMustOutData){ //fill out 0
|
|
677
|
+
memset(self->d_stream.next_out,0,self->d_stream.avail_out);
|
|
678
|
+
self->d_stream.next_out+=self->d_stream.avail_out;
|
|
679
|
+
self->d_stream.avail_out=0;
|
|
680
|
+
}else{
|
|
681
|
+
_dec_onDecErr_rt();//error;
|
|
682
|
+
}
|
|
683
|
+
}
|
|
684
|
+
}
|
|
685
|
+
}else{
|
|
686
|
+
_dec_onDecErr_rt();//error;
|
|
687
|
+
}
|
|
688
|
+
}
|
|
689
|
+
return hpatch_TRUE;
|
|
690
|
+
}
|
|
691
|
+
static hpatch_BOOL _bz2_decompress_part(hpatch_decompressHandle decompressHandle,
|
|
692
|
+
unsigned char* out_part_data,unsigned char* out_part_data_end){
|
|
693
|
+
return _bz2_decompress_part_(decompressHandle,out_part_data,out_part_data_end,hpatch_FALSE);
|
|
694
|
+
}
|
|
695
|
+
static hpatch_BOOL _bz2_decompress_part_unsz(hpatch_decompressHandle decompressHandle,
|
|
696
|
+
unsigned char* out_part_data,unsigned char* out_part_data_end){
|
|
697
|
+
return _bz2_decompress_part_(decompressHandle,out_part_data,out_part_data_end,hpatch_TRUE);
|
|
698
|
+
}
|
|
699
|
+
|
|
700
|
+
static hpatch_TDecompress bz2DecompressPlugin={_bz2_is_can_open,_bz2_open,
|
|
701
|
+
_bz2_close,_bz2_decompress_part};
|
|
702
|
+
|
|
703
|
+
//unkown uncompress data size
|
|
704
|
+
static hpatch_TDecompress _bz2DecompressPlugin_unsz={_bz2_is_can_open,_bz2_open,
|
|
705
|
+
_bz2_close,_bz2_decompress_part_unsz};
|
|
706
|
+
#endif//_CompressPlugin_bz2
|
|
707
|
+
|
|
708
|
+
|
|
709
|
+
#if (defined _CompressPlugin_lzma) || (defined _CompressPlugin_lzma2)
|
|
710
|
+
#if (_IsNeedIncludeDefaultCompressHead)
|
|
711
|
+
# include "LzmaDec.h" // "lzma/C/LzmaDec.h" https://github.com/sisong/lzma
|
|
712
|
+
# ifdef _CompressPlugin_lzma2
|
|
713
|
+
# include "Lzma2Dec.h"
|
|
714
|
+
# endif
|
|
715
|
+
#endif
|
|
716
|
+
#endif
|
|
717
|
+
|
|
718
|
+
#ifdef _CompressPlugin_lzma
|
|
719
|
+
typedef struct _lzma_TDecompress{
|
|
720
|
+
ISzAlloc memAllocBase;
|
|
721
|
+
const struct hpatch_TStreamInput* codeStream;
|
|
722
|
+
hpatch_StreamPos_t code_begin;
|
|
723
|
+
hpatch_StreamPos_t code_end;
|
|
724
|
+
|
|
725
|
+
CLzmaDec decEnv;
|
|
726
|
+
SizeT decCopyPos;
|
|
727
|
+
SizeT decReadPos;
|
|
728
|
+
hpatch_dec_error_t decError;
|
|
729
|
+
unsigned char dec_buf[kDecompressBufSize];
|
|
730
|
+
} _lzma_TDecompress;
|
|
731
|
+
static void * __lzma1_dec_Alloc(ISzAllocPtr p, size_t size)
|
|
732
|
+
__dec_Alloc_fun(_lzma_TDecompress,p,size)
|
|
733
|
+
|
|
734
|
+
static hpatch_BOOL _lzma_is_can_open(const char* compressType){
|
|
735
|
+
return (0==strcmp(compressType,"lzma"));
|
|
736
|
+
}
|
|
737
|
+
static hpatch_decompressHandle _lzma_open(hpatch_TDecompress* decompressPlugin,
|
|
738
|
+
hpatch_StreamPos_t dataSize,
|
|
739
|
+
const hpatch_TStreamInput* codeStream,
|
|
740
|
+
hpatch_StreamPos_t code_begin,
|
|
741
|
+
hpatch_StreamPos_t code_end){
|
|
742
|
+
_lzma_TDecompress* self=0;
|
|
743
|
+
SRes ret;
|
|
744
|
+
unsigned char propsSize=0;
|
|
745
|
+
unsigned char props[256];
|
|
746
|
+
//load propsSize
|
|
747
|
+
if (code_end-code_begin<1) _dec_openErr_rt();
|
|
748
|
+
if (!codeStream->read(codeStream,code_begin,&propsSize,&propsSize+1)) return 0;
|
|
749
|
+
++code_begin;
|
|
750
|
+
if (propsSize>(code_end-code_begin)) _dec_openErr_rt();
|
|
751
|
+
//load props
|
|
752
|
+
if (!codeStream->read(codeStream,code_begin,props,props+propsSize)) return 0;
|
|
753
|
+
code_begin+=propsSize;
|
|
754
|
+
|
|
755
|
+
self=(_lzma_TDecompress*)_dec_malloc(sizeof(_lzma_TDecompress));
|
|
756
|
+
if (!self) _dec_memErr_rt();
|
|
757
|
+
memset(self,0,sizeof(_lzma_TDecompress)-kDecompressBufSize);
|
|
758
|
+
self->memAllocBase.Alloc=__lzma1_dec_Alloc;
|
|
759
|
+
*((void**)&self->memAllocBase.Free)=(void*)__dec_free;
|
|
760
|
+
self->codeStream=codeStream;
|
|
761
|
+
self->code_begin=code_begin;
|
|
762
|
+
self->code_end=code_end;
|
|
763
|
+
|
|
764
|
+
self->decCopyPos=0;
|
|
765
|
+
self->decReadPos=kDecompressBufSize;
|
|
766
|
+
|
|
767
|
+
LzmaDec_Construct(&self->decEnv);
|
|
768
|
+
ret=LzmaDec_Allocate(&self->decEnv,props,propsSize,&self->memAllocBase);
|
|
769
|
+
if (ret!=SZ_OK){ _dec_onDecErr_up(); free(self); _dec_openErr_rt(); }
|
|
770
|
+
LzmaDec_Init(&self->decEnv);
|
|
771
|
+
return self;
|
|
772
|
+
}
|
|
773
|
+
static hpatch_BOOL _lzma_close(struct hpatch_TDecompress* decompressPlugin,
|
|
774
|
+
hpatch_decompressHandle decompressHandle){
|
|
775
|
+
_lzma_TDecompress* self=(_lzma_TDecompress*)decompressHandle;
|
|
776
|
+
if (!self) return hpatch_TRUE;
|
|
777
|
+
LzmaDec_Free(&self->decEnv,&self->memAllocBase);
|
|
778
|
+
_dec_onDecErr_up();
|
|
779
|
+
free(self);
|
|
780
|
+
return hpatch_TRUE;
|
|
781
|
+
}
|
|
782
|
+
static hpatch_BOOL _lzma_decompress_part(hpatch_decompressHandle decompressHandle,
|
|
783
|
+
unsigned char* out_part_data,unsigned char* out_part_data_end){
|
|
784
|
+
_lzma_TDecompress* self=(_lzma_TDecompress*)decompressHandle;
|
|
785
|
+
unsigned char* out_cur=out_part_data;
|
|
786
|
+
assert(out_part_data<=out_part_data_end);
|
|
787
|
+
while (out_cur<out_part_data_end){
|
|
788
|
+
size_t copyLen=(self->decEnv.dicPos-self->decCopyPos);
|
|
789
|
+
if (copyLen>0){
|
|
790
|
+
if (copyLen>(size_t)(out_part_data_end-out_cur))
|
|
791
|
+
copyLen=(out_part_data_end-out_cur);
|
|
792
|
+
memcpy(out_cur,self->decEnv.dic+self->decCopyPos,copyLen);
|
|
793
|
+
out_cur+=copyLen;
|
|
794
|
+
self->decCopyPos+=copyLen;
|
|
795
|
+
if ((self->decEnv.dicPos==self->decEnv.dicBufSize)
|
|
796
|
+
&&(self->decEnv.dicPos==self->decCopyPos)){
|
|
797
|
+
self->decEnv.dicPos=0;
|
|
798
|
+
self->decCopyPos=0;
|
|
799
|
+
}
|
|
800
|
+
}else{
|
|
801
|
+
ELzmaStatus status;
|
|
802
|
+
SizeT inSize,dicPos_back;
|
|
803
|
+
SRes res;
|
|
804
|
+
hpatch_StreamPos_t codeLen=(self->code_end - self->code_begin);
|
|
805
|
+
if ((self->decReadPos==kDecompressBufSize)&&(codeLen>0)) {
|
|
806
|
+
size_t readLen=kDecompressBufSize;
|
|
807
|
+
if (readLen>codeLen) readLen=(size_t)codeLen;
|
|
808
|
+
self->decReadPos=kDecompressBufSize-readLen;
|
|
809
|
+
if (!self->codeStream->read(self->codeStream,self->code_begin,self->dec_buf+self->decReadPos,
|
|
810
|
+
self->dec_buf+self->decReadPos+readLen)) return hpatch_FALSE;//error;
|
|
811
|
+
self->code_begin+=readLen;
|
|
812
|
+
}
|
|
813
|
+
|
|
814
|
+
inSize=kDecompressBufSize-self->decReadPos;
|
|
815
|
+
dicPos_back=self->decEnv.dicPos;
|
|
816
|
+
res=LzmaDec_DecodeToDic(&self->decEnv,self->decEnv.dicBufSize,
|
|
817
|
+
self->dec_buf+self->decReadPos,&inSize,LZMA_FINISH_ANY,&status);
|
|
818
|
+
if(res==SZ_OK){
|
|
819
|
+
if ((inSize==0)&&(self->decEnv.dicPos==dicPos_back))
|
|
820
|
+
_dec_onDecErr_rt();//error;
|
|
821
|
+
}else{
|
|
822
|
+
_dec_onDecErr_rt();//error;
|
|
823
|
+
}
|
|
824
|
+
self->decReadPos+=inSize;
|
|
825
|
+
}
|
|
826
|
+
}
|
|
827
|
+
return hpatch_TRUE;
|
|
828
|
+
}
|
|
829
|
+
static hpatch_TDecompress lzmaDecompressPlugin={_lzma_is_can_open,_lzma_open,
|
|
830
|
+
_lzma_close,_lzma_decompress_part};
|
|
831
|
+
#endif//_CompressPlugin_lzma
|
|
832
|
+
|
|
833
|
+
#ifdef _CompressPlugin_lzma2
|
|
834
|
+
typedef struct _lzma2_TDecompress{
|
|
835
|
+
ISzAlloc memAllocBase;
|
|
836
|
+
const struct hpatch_TStreamInput* codeStream;
|
|
837
|
+
hpatch_StreamPos_t code_begin;
|
|
838
|
+
hpatch_StreamPos_t code_end;
|
|
839
|
+
|
|
840
|
+
CLzma2Dec decEnv;
|
|
841
|
+
SizeT decCopyPos;
|
|
842
|
+
SizeT decReadPos;
|
|
843
|
+
hpatch_dec_error_t decError;
|
|
844
|
+
unsigned char dec_buf[kDecompressBufSize];
|
|
845
|
+
} _lzma2_TDecompress;
|
|
846
|
+
static void * __lzma2_dec_Alloc(ISzAllocPtr p, size_t size)
|
|
847
|
+
__dec_Alloc_fun(_lzma2_TDecompress,p,size)
|
|
848
|
+
|
|
849
|
+
static hpatch_BOOL _lzma2_is_can_open(const char* compressType){
|
|
850
|
+
return (0==strcmp(compressType,"lzma2"));
|
|
851
|
+
}
|
|
852
|
+
static hpatch_decompressHandle _lzma2_open(hpatch_TDecompress* decompressPlugin,
|
|
853
|
+
hpatch_StreamPos_t dataSize,
|
|
854
|
+
const hpatch_TStreamInput* codeStream,
|
|
855
|
+
hpatch_StreamPos_t code_begin,
|
|
856
|
+
hpatch_StreamPos_t code_end){
|
|
857
|
+
_lzma2_TDecompress* self=0;
|
|
858
|
+
SRes ret;
|
|
859
|
+
unsigned char propsSize=0;
|
|
860
|
+
//load propsSize
|
|
861
|
+
if (code_end-code_begin<1) _dec_openErr_rt();
|
|
862
|
+
if (!codeStream->read(codeStream,code_begin,&propsSize,&propsSize+1)) return 0;
|
|
863
|
+
++code_begin;
|
|
864
|
+
|
|
865
|
+
self=(_lzma2_TDecompress*)_dec_malloc(sizeof(_lzma2_TDecompress));
|
|
866
|
+
if (!self) _dec_memErr_rt();
|
|
867
|
+
memset(self,0,sizeof(_lzma2_TDecompress)-kDecompressBufSize);
|
|
868
|
+
self->memAllocBase.Alloc=__lzma2_dec_Alloc;
|
|
869
|
+
*((void**)&self->memAllocBase.Free)=(void*)__dec_free;
|
|
870
|
+
self->codeStream=codeStream;
|
|
871
|
+
self->code_begin=code_begin;
|
|
872
|
+
self->code_end=code_end;
|
|
873
|
+
|
|
874
|
+
self->decCopyPos=0;
|
|
875
|
+
self->decReadPos=kDecompressBufSize;
|
|
876
|
+
|
|
877
|
+
Lzma2Dec_Construct(&self->decEnv);
|
|
878
|
+
ret=Lzma2Dec_Allocate(&self->decEnv,propsSize,&self->memAllocBase);
|
|
879
|
+
if (ret!=SZ_OK){ _dec_onDecErr_up(); free(self); _dec_openErr_rt(); }
|
|
880
|
+
Lzma2Dec_Init(&self->decEnv);
|
|
881
|
+
return self;
|
|
882
|
+
}
|
|
883
|
+
static hpatch_BOOL _lzma2_close(struct hpatch_TDecompress* decompressPlugin,
|
|
884
|
+
hpatch_decompressHandle decompressHandle){
|
|
885
|
+
_lzma2_TDecompress* self=(_lzma2_TDecompress*)decompressHandle;
|
|
886
|
+
if (!self) return hpatch_TRUE;
|
|
887
|
+
Lzma2Dec_Free(&self->decEnv,&self->memAllocBase);
|
|
888
|
+
_dec_onDecErr_up();
|
|
889
|
+
free(self);
|
|
890
|
+
return hpatch_TRUE;
|
|
891
|
+
}
|
|
892
|
+
static hpatch_BOOL _lzma2_decompress_part(hpatch_decompressHandle decompressHandle,
|
|
893
|
+
unsigned char* out_part_data,unsigned char* out_part_data_end){
|
|
894
|
+
_lzma2_TDecompress* self=(_lzma2_TDecompress*)decompressHandle;
|
|
895
|
+
unsigned char* out_cur=out_part_data;
|
|
896
|
+
assert(out_part_data<=out_part_data_end);
|
|
897
|
+
while (out_cur<out_part_data_end){
|
|
898
|
+
size_t copyLen=(self->decEnv.decoder.dicPos-self->decCopyPos);
|
|
899
|
+
if (copyLen>0){
|
|
900
|
+
if (copyLen>(size_t)(out_part_data_end-out_cur))
|
|
901
|
+
copyLen=(out_part_data_end-out_cur);
|
|
902
|
+
memcpy(out_cur,self->decEnv.decoder.dic+self->decCopyPos,copyLen);
|
|
903
|
+
out_cur+=copyLen;
|
|
904
|
+
self->decCopyPos+=copyLen;
|
|
905
|
+
if ((self->decEnv.decoder.dicPos==self->decEnv.decoder.dicBufSize)
|
|
906
|
+
&&(self->decEnv.decoder.dicPos==self->decCopyPos)){
|
|
907
|
+
self->decEnv.decoder.dicPos=0;
|
|
908
|
+
self->decCopyPos=0;
|
|
909
|
+
}
|
|
910
|
+
}else{
|
|
911
|
+
ELzmaStatus status;
|
|
912
|
+
SizeT inSize,dicPos_back;
|
|
913
|
+
SRes res;
|
|
914
|
+
hpatch_StreamPos_t codeLen=(self->code_end - self->code_begin);
|
|
915
|
+
if ((self->decReadPos==kDecompressBufSize)&&(codeLen>0)) {
|
|
916
|
+
size_t readLen=kDecompressBufSize;
|
|
917
|
+
if (readLen>codeLen) readLen=(size_t)codeLen;
|
|
918
|
+
self->decReadPos=kDecompressBufSize-readLen;
|
|
919
|
+
if (!self->codeStream->read(self->codeStream,self->code_begin,self->dec_buf+self->decReadPos,
|
|
920
|
+
self->dec_buf+self->decReadPos+readLen)) return hpatch_FALSE;//error;
|
|
921
|
+
self->code_begin+=readLen;
|
|
922
|
+
}
|
|
923
|
+
|
|
924
|
+
inSize=kDecompressBufSize-self->decReadPos;
|
|
925
|
+
dicPos_back=self->decEnv.decoder.dicPos;
|
|
926
|
+
res=Lzma2Dec_DecodeToDic(&self->decEnv,self->decEnv.decoder.dicBufSize,
|
|
927
|
+
self->dec_buf+self->decReadPos,&inSize,LZMA_FINISH_ANY,&status);
|
|
928
|
+
if(res==SZ_OK){
|
|
929
|
+
if ((inSize==0)&&(self->decEnv.decoder.dicPos==dicPos_back))
|
|
930
|
+
_dec_onDecErr_rt();//error;
|
|
931
|
+
}else{
|
|
932
|
+
_dec_onDecErr_rt();//error;
|
|
933
|
+
}
|
|
934
|
+
self->decReadPos+=inSize;
|
|
935
|
+
}
|
|
936
|
+
}
|
|
937
|
+
return hpatch_TRUE;
|
|
938
|
+
}
|
|
939
|
+
static hpatch_TDecompress lzma2DecompressPlugin={_lzma2_is_can_open,_lzma2_open,
|
|
940
|
+
_lzma2_close,_lzma2_decompress_part};
|
|
941
|
+
#endif//_CompressPlugin_lzma2
|
|
942
|
+
|
|
943
|
+
#ifdef _CompressPlugin_7zXZ
|
|
944
|
+
#if (_IsNeedIncludeDefaultCompressHead)
|
|
945
|
+
# include "Xz.h" // "lzma/C/Xz.h" https://github.com/sisong/lzma
|
|
946
|
+
# include "7zCrc.h" // CrcGenerateTable()
|
|
947
|
+
#endif
|
|
948
|
+
|
|
949
|
+
#ifndef _init_CompressPlugin_7zXZ_DEF
|
|
950
|
+
# define _init_CompressPlugin_7zXZ_DEF
|
|
951
|
+
static int _init_CompressPlugin_7zXZ(){
|
|
952
|
+
static hpatch_BOOL _isInit=hpatch_FALSE;
|
|
953
|
+
if (!_isInit){
|
|
954
|
+
CrcGenerateTable();
|
|
955
|
+
_isInit=hpatch_TRUE;
|
|
956
|
+
}
|
|
957
|
+
return 0;
|
|
958
|
+
}
|
|
959
|
+
#endif
|
|
960
|
+
|
|
961
|
+
typedef struct _7zXZ_TDecompress{
|
|
962
|
+
ISzAlloc memAllocBase;
|
|
963
|
+
const struct hpatch_TStreamInput* codeStream;
|
|
964
|
+
hpatch_StreamPos_t code_begin;
|
|
965
|
+
hpatch_StreamPos_t code_end;
|
|
966
|
+
hpatch_TDecompress* decompressPlugin;
|
|
967
|
+
hpatch_BOOL isResetState;
|
|
968
|
+
|
|
969
|
+
CXzUnpacker decEnv;
|
|
970
|
+
SizeT decCopyPos;
|
|
971
|
+
SizeT decReadPos;
|
|
972
|
+
hpatch_dec_error_t decError;
|
|
973
|
+
unsigned char dec_buf[kDecompressBufSize];
|
|
974
|
+
} _7zXZ_TDecompress;
|
|
975
|
+
static void * __7zXZ_dec_Alloc(ISzAllocPtr p, size_t size)
|
|
976
|
+
__dec_Alloc_fun(_7zXZ_TDecompress,p,size)
|
|
977
|
+
|
|
978
|
+
static hpatch_BOOL _7zXZ_is_can_open(const char* compressType){
|
|
979
|
+
return (0==strcmp(compressType,"7zXZ"));
|
|
980
|
+
}
|
|
981
|
+
static void _7zXZ_open_at(_7zXZ_TDecompress* self, hpatch_TDecompress* decompressPlugin,hpatch_StreamPos_t dataSize,
|
|
982
|
+
const hpatch_TStreamInput* codeStream,hpatch_StreamPos_t code_begin,
|
|
983
|
+
hpatch_StreamPos_t code_end,hpatch_BOOL isResetState,hpatch_BOOL isParseHead){
|
|
984
|
+
memset(self,0,sizeof(_7zXZ_TDecompress)-kDecompressBufSize);
|
|
985
|
+
self->memAllocBase.Alloc=__7zXZ_dec_Alloc;
|
|
986
|
+
*((void**)&self->memAllocBase.Free)=(void*)__dec_free;
|
|
987
|
+
self->codeStream=codeStream;
|
|
988
|
+
self->code_begin=code_begin;
|
|
989
|
+
self->code_end=code_end;
|
|
990
|
+
self->decompressPlugin=decompressPlugin;
|
|
991
|
+
self->isResetState=isResetState;
|
|
992
|
+
|
|
993
|
+
self->decCopyPos=0;
|
|
994
|
+
self->decReadPos=kDecompressBufSize;
|
|
995
|
+
|
|
996
|
+
XzUnpacker_Construct(&self->decEnv,&self->memAllocBase);
|
|
997
|
+
XzUnpacker_Init(&self->decEnv);
|
|
998
|
+
if (!isParseHead)
|
|
999
|
+
self->decEnv.state=XZ_STATE_BLOCK_HEADER;
|
|
1000
|
+
}
|
|
1001
|
+
static void _7zXZ_close_at(hpatch_decompressHandle decompressHandle){
|
|
1002
|
+
_7zXZ_TDecompress* self=(_7zXZ_TDecompress*)decompressHandle;
|
|
1003
|
+
if (self){
|
|
1004
|
+
hpatch_TDecompress* decompressPlugin=self->decompressPlugin;
|
|
1005
|
+
XzUnpacker_Free(&self->decEnv);
|
|
1006
|
+
_dec_onDecErr_up();
|
|
1007
|
+
}
|
|
1008
|
+
}
|
|
1009
|
+
static hpatch_decompressHandle _7zXZ_open(hpatch_TDecompress* decompressPlugin,
|
|
1010
|
+
hpatch_StreamPos_t dataSize,
|
|
1011
|
+
const hpatch_TStreamInput* codeStream,
|
|
1012
|
+
hpatch_StreamPos_t code_begin,
|
|
1013
|
+
hpatch_StreamPos_t code_end){
|
|
1014
|
+
_7zXZ_TDecompress* self=0;
|
|
1015
|
+
|
|
1016
|
+
self=(_7zXZ_TDecompress*)_dec_malloc(sizeof(_7zXZ_TDecompress));
|
|
1017
|
+
if (!self) _dec_memErr_rt();
|
|
1018
|
+
_7zXZ_open_at(self,decompressPlugin,dataSize,codeStream,
|
|
1019
|
+
code_begin,code_end,hpatch_FALSE,hpatch_TRUE);
|
|
1020
|
+
return self;
|
|
1021
|
+
}
|
|
1022
|
+
static hpatch_decompressHandle _7zXZ_a_open(hpatch_TDecompress* decompressPlugin,
|
|
1023
|
+
hpatch_StreamPos_t dataSize,
|
|
1024
|
+
const hpatch_TStreamInput* codeStream,
|
|
1025
|
+
hpatch_StreamPos_t code_begin,
|
|
1026
|
+
hpatch_StreamPos_t code_end){
|
|
1027
|
+
_7zXZ_TDecompress* self=0;
|
|
1028
|
+
|
|
1029
|
+
self=(_7zXZ_TDecompress*)_dec_malloc(sizeof(_7zXZ_TDecompress));
|
|
1030
|
+
if (!self) _dec_memErr_rt();
|
|
1031
|
+
_7zXZ_open_at(self,decompressPlugin,dataSize,codeStream,
|
|
1032
|
+
code_begin,code_end,hpatch_TRUE,hpatch_TRUE);
|
|
1033
|
+
return self;
|
|
1034
|
+
}
|
|
1035
|
+
static hpatch_BOOL _7zXZ_close(struct hpatch_TDecompress* decompressPlugin,
|
|
1036
|
+
hpatch_decompressHandle decompressHandle){
|
|
1037
|
+
if (decompressHandle){
|
|
1038
|
+
_7zXZ_close_at(decompressHandle);
|
|
1039
|
+
free(decompressHandle);
|
|
1040
|
+
}
|
|
1041
|
+
return hpatch_TRUE;
|
|
1042
|
+
}
|
|
1043
|
+
static hpatch_BOOL _7zXZ_reset_code(hpatch_decompressHandle decompressHandle,
|
|
1044
|
+
hpatch_StreamPos_t dataSize,
|
|
1045
|
+
const struct hpatch_TStreamInput* codeStream,
|
|
1046
|
+
hpatch_StreamPos_t code_begin,
|
|
1047
|
+
hpatch_StreamPos_t code_end){
|
|
1048
|
+
_7zXZ_TDecompress* self=(_7zXZ_TDecompress*)decompressHandle;
|
|
1049
|
+
hpatch_BOOL isResetState=self->isResetState;
|
|
1050
|
+
if (isResetState){
|
|
1051
|
+
hpatch_TDecompress* decompressPlugin=self->decompressPlugin;
|
|
1052
|
+
_7zXZ_close_at(self);
|
|
1053
|
+
_7zXZ_open_at(self,decompressPlugin,dataSize,codeStream,
|
|
1054
|
+
code_begin,code_end,isResetState,hpatch_FALSE);
|
|
1055
|
+
}else{
|
|
1056
|
+
self->codeStream=codeStream;
|
|
1057
|
+
self->code_begin=code_begin;
|
|
1058
|
+
self->code_end=code_end;
|
|
1059
|
+
self->decCopyPos=0;
|
|
1060
|
+
self->decReadPos=kDecompressBufSize;
|
|
1061
|
+
}
|
|
1062
|
+
return hpatch_TRUE;
|
|
1063
|
+
}
|
|
1064
|
+
static hpatch_BOOL _7zXZ_decompress_part(hpatch_decompressHandle decompressHandle,
|
|
1065
|
+
unsigned char* out_part_data,unsigned char* out_part_data_end){
|
|
1066
|
+
_7zXZ_TDecompress* self=(_7zXZ_TDecompress*)decompressHandle;
|
|
1067
|
+
unsigned char* out_cur=out_part_data;
|
|
1068
|
+
assert(out_part_data<=out_part_data_end);
|
|
1069
|
+
while (out_cur<out_part_data_end){
|
|
1070
|
+
ECoderStatus status;
|
|
1071
|
+
SizeT inSize;
|
|
1072
|
+
SizeT outSize=out_part_data_end-out_cur;
|
|
1073
|
+
SRes res;
|
|
1074
|
+
hpatch_StreamPos_t codeLen=(self->code_end-self->code_begin);
|
|
1075
|
+
if ((self->decReadPos==kDecompressBufSize)&&(codeLen>0)) {
|
|
1076
|
+
size_t readLen=kDecompressBufSize;
|
|
1077
|
+
if (readLen>codeLen) readLen=(size_t)codeLen;
|
|
1078
|
+
self->decReadPos=kDecompressBufSize-readLen;
|
|
1079
|
+
if (!self->codeStream->read(self->codeStream,self->code_begin,self->dec_buf+self->decReadPos,
|
|
1080
|
+
self->dec_buf+self->decReadPos+readLen)) return hpatch_FALSE;//error;
|
|
1081
|
+
self->code_begin+=readLen;
|
|
1082
|
+
codeLen-=readLen;
|
|
1083
|
+
}
|
|
1084
|
+
|
|
1085
|
+
inSize=kDecompressBufSize-self->decReadPos;
|
|
1086
|
+
res=XzUnpacker_Code(&self->decEnv,out_cur,&outSize,self->dec_buf+self->decReadPos,&inSize,
|
|
1087
|
+
codeLen==0,CODER_FINISH_ANY,&status);
|
|
1088
|
+
if(res==SZ_OK){
|
|
1089
|
+
if ((inSize==0)&&(outSize==0))
|
|
1090
|
+
_dec_onDecErr_rt();//error;
|
|
1091
|
+
}else{
|
|
1092
|
+
_dec_onDecErr_rt();//error;
|
|
1093
|
+
}
|
|
1094
|
+
self->decReadPos+=inSize;
|
|
1095
|
+
out_cur+=outSize;
|
|
1096
|
+
}
|
|
1097
|
+
return hpatch_TRUE;
|
|
1098
|
+
}
|
|
1099
|
+
static hpatch_TDecompress _7zXZDecompressPlugin={_7zXZ_is_can_open,_7zXZ_open,
|
|
1100
|
+
_7zXZ_close,_7zXZ_decompress_part,_7zXZ_reset_code};
|
|
1101
|
+
static hpatch_TDecompress _7zXZDecompressPlugin_a={_7zXZ_is_can_open,_7zXZ_a_open,
|
|
1102
|
+
_7zXZ_close,_7zXZ_decompress_part,_7zXZ_reset_code};
|
|
1103
|
+
#endif//_CompressPlugin_7zXZ
|
|
1104
|
+
|
|
1105
|
+
|
|
1106
|
+
#if (defined(_CompressPlugin_lz4) || defined(_CompressPlugin_lz4hc))
|
|
1107
|
+
#if (_IsNeedIncludeDefaultCompressHead)
|
|
1108
|
+
# include "lz4.h" // "lz4/lib/lz4.h" https://github.com/lz4/lz4
|
|
1109
|
+
#endif
|
|
1110
|
+
typedef struct _lz4_TDecompress{
|
|
1111
|
+
const struct hpatch_TStreamInput* codeStream;
|
|
1112
|
+
hpatch_StreamPos_t code_begin;
|
|
1113
|
+
hpatch_StreamPos_t code_end;
|
|
1114
|
+
|
|
1115
|
+
LZ4_streamDecode_t *s;
|
|
1116
|
+
int kLz4CompressBufSize;
|
|
1117
|
+
int code_buf_size;
|
|
1118
|
+
int data_begin;
|
|
1119
|
+
int data_end;
|
|
1120
|
+
hpatch_dec_error_t decError;
|
|
1121
|
+
unsigned char buf[1];
|
|
1122
|
+
} _lz4_TDecompress;
|
|
1123
|
+
static hpatch_BOOL _lz4_is_can_open(const char* compressType){
|
|
1124
|
+
return (0==strcmp(compressType,"lz4"));
|
|
1125
|
+
}
|
|
1126
|
+
#define _lz4_read_len4(len,in_code,code_begin,code_end,__dec_err_rt) { \
|
|
1127
|
+
unsigned char _temp_buf4[4]; \
|
|
1128
|
+
if (4>code_end-code_begin) __dec_err_rt(); \
|
|
1129
|
+
if (!in_code->read(in_code,code_begin,_temp_buf4,_temp_buf4+4)) \
|
|
1130
|
+
return hpatch_FALSE; \
|
|
1131
|
+
len=_temp_buf4[0]|(_temp_buf4[1]<<8)|(_temp_buf4[2]<<16)|(_temp_buf4[3]<<24); \
|
|
1132
|
+
code_begin+=4; \
|
|
1133
|
+
}
|
|
1134
|
+
static hpatch_decompressHandle _lz4_open(hpatch_TDecompress* decompressPlugin,
|
|
1135
|
+
hpatch_StreamPos_t dataSize,
|
|
1136
|
+
const hpatch_TStreamInput* codeStream,
|
|
1137
|
+
hpatch_StreamPos_t code_begin,
|
|
1138
|
+
hpatch_StreamPos_t code_end){
|
|
1139
|
+
const int kMaxLz4CompressBufSize=(1<<20)*64; //defence attack
|
|
1140
|
+
_lz4_TDecompress* self=0;
|
|
1141
|
+
int kLz4CompressBufSize=0;
|
|
1142
|
+
int code_buf_size=0;
|
|
1143
|
+
assert(code_begin<code_end);
|
|
1144
|
+
{//read kLz4CompressBufSize
|
|
1145
|
+
_lz4_read_len4(kLz4CompressBufSize,codeStream,code_begin,code_end,_dec_openErr_rt);
|
|
1146
|
+
if ((kLz4CompressBufSize<0)||(kLz4CompressBufSize>=kMaxLz4CompressBufSize)) _dec_openErr_rt();
|
|
1147
|
+
code_buf_size=LZ4_compressBound(kLz4CompressBufSize);
|
|
1148
|
+
}
|
|
1149
|
+
self=(_lz4_TDecompress*)_dec_malloc(sizeof(_lz4_TDecompress)+kLz4CompressBufSize+code_buf_size);
|
|
1150
|
+
if (!self) _dec_memErr_rt();
|
|
1151
|
+
memset(self,0,sizeof(_lz4_TDecompress));
|
|
1152
|
+
self->codeStream=codeStream;
|
|
1153
|
+
self->code_begin=code_begin;
|
|
1154
|
+
self->code_end=code_end;
|
|
1155
|
+
self->kLz4CompressBufSize=kLz4CompressBufSize;
|
|
1156
|
+
self->code_buf_size=code_buf_size;
|
|
1157
|
+
self->data_begin=0;
|
|
1158
|
+
self->data_end=0;
|
|
1159
|
+
|
|
1160
|
+
self->s = LZ4_createStreamDecode();
|
|
1161
|
+
if (!self->s){ free(self); _dec_openErr_rt(); }
|
|
1162
|
+
return self;
|
|
1163
|
+
}
|
|
1164
|
+
static hpatch_BOOL _lz4_close(struct hpatch_TDecompress* decompressPlugin,
|
|
1165
|
+
hpatch_decompressHandle decompressHandle){
|
|
1166
|
+
hpatch_BOOL result=hpatch_TRUE;
|
|
1167
|
+
_lz4_TDecompress* self=(_lz4_TDecompress*)decompressHandle;
|
|
1168
|
+
if (!self) return result;
|
|
1169
|
+
_dec_onDecErr_up();
|
|
1170
|
+
_dec_close_check(0==LZ4_freeStreamDecode(self->s));
|
|
1171
|
+
free(self);
|
|
1172
|
+
return result;
|
|
1173
|
+
}
|
|
1174
|
+
static hpatch_BOOL _lz4_decompress_part(hpatch_decompressHandle decompressHandle,
|
|
1175
|
+
unsigned char* out_part_data,unsigned char* out_part_data_end){
|
|
1176
|
+
_lz4_TDecompress* self=(_lz4_TDecompress*)decompressHandle;
|
|
1177
|
+
unsigned char* data_buf=self->buf;
|
|
1178
|
+
unsigned char* code_buf=self->buf+self->kLz4CompressBufSize;
|
|
1179
|
+
|
|
1180
|
+
while (out_part_data<out_part_data_end) {
|
|
1181
|
+
size_t dataLen=self->data_end-self->data_begin;
|
|
1182
|
+
if (dataLen>0){
|
|
1183
|
+
if (dataLen>(out_part_data_end-out_part_data))
|
|
1184
|
+
dataLen=(out_part_data_end-out_part_data);
|
|
1185
|
+
memcpy(out_part_data,data_buf+self->data_begin,dataLen);
|
|
1186
|
+
out_part_data+=(size_t)dataLen;
|
|
1187
|
+
self->data_begin+=dataLen;
|
|
1188
|
+
}else{
|
|
1189
|
+
int codeLen;
|
|
1190
|
+
_lz4_read_len4(codeLen,self->codeStream,self->code_begin,self->code_end,_dec_onDecErr_rt);
|
|
1191
|
+
if ((codeLen<=0)||(codeLen>self->code_buf_size)
|
|
1192
|
+
||((size_t)codeLen>(self->code_end-self->code_begin))) _dec_onDecErr_rt();
|
|
1193
|
+
if (!self->codeStream->read(self->codeStream,self->code_begin,
|
|
1194
|
+
code_buf,code_buf+codeLen)) return hpatch_FALSE;
|
|
1195
|
+
self->code_begin+=codeLen;
|
|
1196
|
+
self->data_begin=0;
|
|
1197
|
+
self->data_end=LZ4_decompress_safe_continue(self->s,(const char*)code_buf,(char*)data_buf,
|
|
1198
|
+
codeLen,self->kLz4CompressBufSize);
|
|
1199
|
+
if (self->data_end<=0) _dec_onDecErr_rt();
|
|
1200
|
+
}
|
|
1201
|
+
}
|
|
1202
|
+
return hpatch_TRUE;
|
|
1203
|
+
}
|
|
1204
|
+
static hpatch_TDecompress lz4DecompressPlugin={_lz4_is_can_open,_lz4_open,
|
|
1205
|
+
_lz4_close,_lz4_decompress_part};
|
|
1206
|
+
#endif//_CompressPlugin_lz4 or _CompressPlugin_lz4hc
|
|
1207
|
+
|
|
1208
|
+
#ifdef _CompressPlugin_zstd
|
|
1209
|
+
#if (_IsNeedIncludeDefaultCompressHead)
|
|
1210
|
+
//# define ZSTD_STATIC_LINKING_ONLY //for ZSTD_customMem
|
|
1211
|
+
# include "zstd.h" // "zstd/lib/zstd.h" https://github.com/sisong/zstd
|
|
1212
|
+
#endif
|
|
1213
|
+
typedef struct _zstd_TDecompress{
|
|
1214
|
+
const struct hpatch_TStreamInput* codeStream;
|
|
1215
|
+
hpatch_StreamPos_t code_begin;
|
|
1216
|
+
hpatch_StreamPos_t code_end;
|
|
1217
|
+
|
|
1218
|
+
ZSTD_inBuffer s_input;
|
|
1219
|
+
ZSTD_outBuffer s_output;
|
|
1220
|
+
size_t data_begin;
|
|
1221
|
+
ZSTD_DStream* s;
|
|
1222
|
+
hpatch_dec_error_t decError;
|
|
1223
|
+
unsigned char buf[1];
|
|
1224
|
+
} _zstd_TDecompress;
|
|
1225
|
+
#ifdef ZSTD_STATIC_LINKING_ONLY
|
|
1226
|
+
static void* __ZSTD_alloc(void* opaque, size_t size)
|
|
1227
|
+
__dec_Alloc_fun(_zstd_TDecompress,opaque,size)
|
|
1228
|
+
#endif
|
|
1229
|
+
static hpatch_BOOL _zstd_is_can_open(const char* compressType){
|
|
1230
|
+
return (0==strcmp(compressType,"zstd"));
|
|
1231
|
+
}
|
|
1232
|
+
static hpatch_decompressHandle _zstd_open(hpatch_TDecompress* decompressPlugin,
|
|
1233
|
+
hpatch_StreamPos_t dataSize,
|
|
1234
|
+
const hpatch_TStreamInput* codeStream,
|
|
1235
|
+
hpatch_StreamPos_t code_begin,
|
|
1236
|
+
hpatch_StreamPos_t code_end){
|
|
1237
|
+
_zstd_TDecompress* self=0;
|
|
1238
|
+
size_t ret;
|
|
1239
|
+
size_t _input_size=ZSTD_DStreamInSize();
|
|
1240
|
+
size_t _output_size=ZSTD_DStreamOutSize();
|
|
1241
|
+
self=(_zstd_TDecompress*)_dec_malloc(sizeof(_zstd_TDecompress)+_input_size+_output_size);
|
|
1242
|
+
if (!self) _dec_memErr_rt();
|
|
1243
|
+
memset(self,0,sizeof(_zstd_TDecompress));
|
|
1244
|
+
self->codeStream=codeStream;
|
|
1245
|
+
self->code_begin=code_begin;
|
|
1246
|
+
self->code_end=code_end;
|
|
1247
|
+
self->s_input.src=self->buf;
|
|
1248
|
+
self->s_input.size=_input_size;
|
|
1249
|
+
self->s_input.pos=_input_size;
|
|
1250
|
+
self->s_output.dst=self->buf+_input_size;
|
|
1251
|
+
self->s_output.size=_output_size;
|
|
1252
|
+
self->s_output.pos=0;
|
|
1253
|
+
self->data_begin=0;
|
|
1254
|
+
#ifdef ZSTD_STATIC_LINKING_ONLY
|
|
1255
|
+
{
|
|
1256
|
+
ZSTD_customMem customMem={__ZSTD_alloc,__dec_free,self};
|
|
1257
|
+
self->s=ZSTD_createDStream_advanced(customMem);
|
|
1258
|
+
}
|
|
1259
|
+
#else
|
|
1260
|
+
self->s=ZSTD_createDStream();
|
|
1261
|
+
#endif
|
|
1262
|
+
if (!self->s){ _dec_onDecErr_up(); free(self); _dec_openErr_rt(); }
|
|
1263
|
+
ret=ZSTD_initDStream(self->s);
|
|
1264
|
+
if (ZSTD_isError(ret)) { ZSTD_freeDStream(self->s); _dec_onDecErr_up(); free(self); _dec_openErr_rt(); }
|
|
1265
|
+
#define _ZSTD_WINDOWLOG_MAX 30
|
|
1266
|
+
ret=ZSTD_DCtx_setParameter(self->s,ZSTD_d_windowLogMax,_ZSTD_WINDOWLOG_MAX);
|
|
1267
|
+
//if (ZSTD_isError(ret)) { printf("WARNING: ZSTD_DCtx_setMaxWindowSize() error!"); }
|
|
1268
|
+
return self;
|
|
1269
|
+
}
|
|
1270
|
+
static hpatch_BOOL _zstd_close(struct hpatch_TDecompress* decompressPlugin,
|
|
1271
|
+
hpatch_decompressHandle decompressHandle){
|
|
1272
|
+
hpatch_BOOL result=hpatch_TRUE;
|
|
1273
|
+
_zstd_TDecompress* self=(_zstd_TDecompress*)decompressHandle;
|
|
1274
|
+
if (!self) return result;
|
|
1275
|
+
_dec_onDecErr_up();
|
|
1276
|
+
_dec_close_check(0==ZSTD_freeDStream(self->s));
|
|
1277
|
+
free(self);
|
|
1278
|
+
return result;
|
|
1279
|
+
}
|
|
1280
|
+
static hpatch_BOOL _zstd_decompress_part(hpatch_decompressHandle decompressHandle,
|
|
1281
|
+
unsigned char* out_part_data,unsigned char* out_part_data_end){
|
|
1282
|
+
_zstd_TDecompress* self=(_zstd_TDecompress*)decompressHandle;
|
|
1283
|
+
while (out_part_data<out_part_data_end) {
|
|
1284
|
+
size_t dataLen=(self->s_output.pos-self->data_begin);
|
|
1285
|
+
if (dataLen>0){
|
|
1286
|
+
if (dataLen>(size_t)(out_part_data_end-out_part_data))
|
|
1287
|
+
dataLen=(out_part_data_end-out_part_data);
|
|
1288
|
+
memcpy(out_part_data,(const unsigned char*)self->s_output.dst+self->data_begin,dataLen);
|
|
1289
|
+
out_part_data+=dataLen;
|
|
1290
|
+
self->data_begin+=dataLen;
|
|
1291
|
+
}else{
|
|
1292
|
+
size_t ret;
|
|
1293
|
+
if (self->s_input.pos==self->s_input.size) {
|
|
1294
|
+
self->s_input.pos=0;
|
|
1295
|
+
if (self->s_input.size>self->code_end-self->code_begin)
|
|
1296
|
+
self->s_input.size=(size_t)(self->code_end-self->code_begin);
|
|
1297
|
+
|
|
1298
|
+
if (self->s_input.size>0){
|
|
1299
|
+
if (!self->codeStream->read(self->codeStream,self->code_begin,(unsigned char*)self->s_input.src,
|
|
1300
|
+
(unsigned char*)self->s_input.src+self->s_input.size))
|
|
1301
|
+
return hpatch_FALSE;
|
|
1302
|
+
self->code_begin+=self->s_input.size;
|
|
1303
|
+
}
|
|
1304
|
+
}
|
|
1305
|
+
self->s_output.pos=0;
|
|
1306
|
+
self->data_begin=0;
|
|
1307
|
+
ret=ZSTD_decompressStream(self->s,&self->s_output,&self->s_input);
|
|
1308
|
+
if (ZSTD_isError(ret)) _dec_onDecErr_rt();
|
|
1309
|
+
if (self->s_output.pos==self->data_begin) _dec_onDecErr_rt();
|
|
1310
|
+
}
|
|
1311
|
+
}
|
|
1312
|
+
return hpatch_TRUE;
|
|
1313
|
+
}
|
|
1314
|
+
static hpatch_TDecompress zstdDecompressPlugin={_zstd_is_can_open,_zstd_open,
|
|
1315
|
+
_zstd_close,_zstd_decompress_part};
|
|
1316
|
+
#endif//_CompressPlugin_zstd
|
|
1317
|
+
|
|
1318
|
+
|
|
1319
|
+
#ifdef _CompressPlugin_brotli
|
|
1320
|
+
#if (_IsNeedIncludeDefaultCompressHead)
|
|
1321
|
+
# include "brotli/decode.h" // "brotli/c/include/brotli/decode.h" https://github.com/google/brotli
|
|
1322
|
+
#endif
|
|
1323
|
+
typedef struct _brotli_TDecompress{
|
|
1324
|
+
const struct hpatch_TStreamInput* codeStream;
|
|
1325
|
+
hpatch_StreamPos_t code_begin;
|
|
1326
|
+
hpatch_StreamPos_t code_end;
|
|
1327
|
+
|
|
1328
|
+
unsigned char* input;
|
|
1329
|
+
unsigned char* output;
|
|
1330
|
+
size_t available_in;
|
|
1331
|
+
size_t available_out;
|
|
1332
|
+
const unsigned char* next_in;
|
|
1333
|
+
unsigned char* next_out;
|
|
1334
|
+
unsigned char* data_begin;
|
|
1335
|
+
BrotliDecoderState* s;
|
|
1336
|
+
hpatch_dec_error_t decError;
|
|
1337
|
+
unsigned char buf[1];
|
|
1338
|
+
} _brotli_TDecompress;
|
|
1339
|
+
static hpatch_BOOL _brotli_is_can_open(const char* compressType){
|
|
1340
|
+
return (0==strcmp(compressType,"brotli"));
|
|
1341
|
+
}
|
|
1342
|
+
static hpatch_decompressHandle _brotli_open(hpatch_TDecompress* decompressPlugin,
|
|
1343
|
+
hpatch_StreamPos_t dataSize,
|
|
1344
|
+
const hpatch_TStreamInput* codeStream,
|
|
1345
|
+
hpatch_StreamPos_t code_begin,
|
|
1346
|
+
hpatch_StreamPos_t code_end){
|
|
1347
|
+
const size_t kBufSize=kDecompressBufSize;
|
|
1348
|
+
_brotli_TDecompress* self=0;
|
|
1349
|
+
assert(code_begin<code_end);
|
|
1350
|
+
self=(_brotli_TDecompress*)_dec_malloc(sizeof(_brotli_TDecompress)+kBufSize*2);
|
|
1351
|
+
if (!self) _dec_memErr_rt();
|
|
1352
|
+
memset(self,0,sizeof(_brotli_TDecompress));
|
|
1353
|
+
self->codeStream=codeStream;
|
|
1354
|
+
self->code_begin=code_begin;
|
|
1355
|
+
self->input=self->buf;
|
|
1356
|
+
self->output=self->buf+kBufSize;
|
|
1357
|
+
self->code_end=code_end;
|
|
1358
|
+
self->available_in = 0;
|
|
1359
|
+
self->next_in = 0;
|
|
1360
|
+
self->available_out = (self->output-self->input);
|
|
1361
|
+
self->next_out =self->output;
|
|
1362
|
+
self->data_begin=self->output;
|
|
1363
|
+
|
|
1364
|
+
self->s = BrotliDecoderCreateInstance(0,0,0);
|
|
1365
|
+
if (!self->s){ free(self); _dec_openErr_rt(); }
|
|
1366
|
+
if (!BrotliDecoderSetParameter(self->s, BROTLI_DECODER_PARAM_LARGE_WINDOW, 1u))
|
|
1367
|
+
{ BrotliDecoderDestroyInstance(self->s); free(self); _dec_openErr_rt(); }
|
|
1368
|
+
return self;
|
|
1369
|
+
}
|
|
1370
|
+
static hpatch_BOOL _brotli_close(struct hpatch_TDecompress* decompressPlugin,
|
|
1371
|
+
hpatch_decompressHandle decompressHandle){
|
|
1372
|
+
_brotli_TDecompress* self=(_brotli_TDecompress*)decompressHandle;
|
|
1373
|
+
if (!self) return hpatch_TRUE;
|
|
1374
|
+
_dec_onDecErr_up();
|
|
1375
|
+
BrotliDecoderDestroyInstance(self->s);
|
|
1376
|
+
free(self);
|
|
1377
|
+
return hpatch_TRUE;
|
|
1378
|
+
}
|
|
1379
|
+
static hpatch_BOOL _brotli_decompress_part(hpatch_decompressHandle decompressHandle,
|
|
1380
|
+
unsigned char* out_part_data,unsigned char* out_part_data_end){
|
|
1381
|
+
_brotli_TDecompress* self=(_brotli_TDecompress*)decompressHandle;
|
|
1382
|
+
while (out_part_data<out_part_data_end) {
|
|
1383
|
+
size_t dataLen=(self->next_out-self->data_begin);
|
|
1384
|
+
if (dataLen>0){
|
|
1385
|
+
if (dataLen>(size_t)(out_part_data_end-out_part_data))
|
|
1386
|
+
dataLen=(out_part_data_end-out_part_data);
|
|
1387
|
+
memcpy(out_part_data,self->data_begin,dataLen);
|
|
1388
|
+
out_part_data+=dataLen;
|
|
1389
|
+
self->data_begin+=dataLen;
|
|
1390
|
+
}else{
|
|
1391
|
+
BrotliDecoderResult ret;
|
|
1392
|
+
if (self->available_in==0) {
|
|
1393
|
+
self->available_in=(self->output-self->input);
|
|
1394
|
+
if (self->available_in>self->code_end-self->code_begin)
|
|
1395
|
+
self->available_in=(size_t)(self->code_end-self->code_begin);
|
|
1396
|
+
if (self->available_in>0){
|
|
1397
|
+
if (!self->codeStream->read(self->codeStream,self->code_begin,(unsigned char*)self->input,
|
|
1398
|
+
self->input+self->available_in))
|
|
1399
|
+
return hpatch_FALSE;
|
|
1400
|
+
self->code_begin+=self->available_in;
|
|
1401
|
+
}
|
|
1402
|
+
self->next_in=self->input;
|
|
1403
|
+
}
|
|
1404
|
+
self->available_out = (self->output-self->input);
|
|
1405
|
+
self->next_out =self->output;
|
|
1406
|
+
self->data_begin=self->output;
|
|
1407
|
+
ret=BrotliDecoderDecompressStream(self->s,&self->available_in,&self->next_in,
|
|
1408
|
+
&self->available_out,&self->next_out, 0);
|
|
1409
|
+
switch (ret){
|
|
1410
|
+
case BROTLI_DECODER_RESULT_SUCCESS:
|
|
1411
|
+
case BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT: {
|
|
1412
|
+
if (self->next_out==self->data_begin) _dec_onDecErr_rt();
|
|
1413
|
+
} break;
|
|
1414
|
+
case BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT: {
|
|
1415
|
+
if (self->code_end==self->code_begin) _dec_onDecErr_rt();
|
|
1416
|
+
} break;
|
|
1417
|
+
default:
|
|
1418
|
+
_dec_onDecErr_rt();
|
|
1419
|
+
}
|
|
1420
|
+
}
|
|
1421
|
+
}
|
|
1422
|
+
return hpatch_TRUE;
|
|
1423
|
+
}
|
|
1424
|
+
static hpatch_TDecompress brotliDecompressPlugin={_brotli_is_can_open,_brotli_open,
|
|
1425
|
+
_brotli_close,_brotli_decompress_part};
|
|
1426
|
+
#endif//_CompressPlugin_brotli
|
|
1427
|
+
|
|
1428
|
+
|
|
1429
|
+
#ifdef _CompressPlugin_lzham
|
|
1430
|
+
#if (_IsNeedIncludeDefaultCompressHead)
|
|
1431
|
+
# include "lzham.h" // "lzham_codec/include/lzham.h" https://github.com/richgel999/lzham_codec
|
|
1432
|
+
#endif
|
|
1433
|
+
typedef struct _lzham_TDecompress{
|
|
1434
|
+
const struct hpatch_TStreamInput* codeStream;
|
|
1435
|
+
hpatch_StreamPos_t code_begin;
|
|
1436
|
+
hpatch_StreamPos_t code_end;
|
|
1437
|
+
|
|
1438
|
+
unsigned char* input;
|
|
1439
|
+
unsigned char* output;
|
|
1440
|
+
size_t available_in;
|
|
1441
|
+
size_t available_out;
|
|
1442
|
+
const unsigned char* next_in;
|
|
1443
|
+
unsigned char* next_out;
|
|
1444
|
+
unsigned char* data_begin;
|
|
1445
|
+
lzham_decompress_state_ptr s;
|
|
1446
|
+
hpatch_dec_error_t decError;
|
|
1447
|
+
unsigned char buf[1];
|
|
1448
|
+
} _lzham_TDecompress;
|
|
1449
|
+
static hpatch_BOOL _lzham_is_can_open(const char* compressType){
|
|
1450
|
+
return (0==strcmp(compressType,"lzham"));
|
|
1451
|
+
}
|
|
1452
|
+
static hpatch_decompressHandle _lzham_open(hpatch_TDecompress* decompressPlugin,
|
|
1453
|
+
hpatch_StreamPos_t dataSize,
|
|
1454
|
+
const hpatch_TStreamInput* codeStream,
|
|
1455
|
+
hpatch_StreamPos_t code_begin,
|
|
1456
|
+
hpatch_StreamPos_t code_end){
|
|
1457
|
+
const size_t kBufSize=kDecompressBufSize;
|
|
1458
|
+
lzham_decompress_params params;
|
|
1459
|
+
unsigned char dict_bits;
|
|
1460
|
+
_lzham_TDecompress* self=0;
|
|
1461
|
+
assert(code_begin<code_end);
|
|
1462
|
+
{//load head
|
|
1463
|
+
if (code_end-code_begin<1) _dec_openErr_rt();
|
|
1464
|
+
if (!codeStream->read(codeStream,code_begin,&dict_bits,(&dict_bits)+1))
|
|
1465
|
+
return 0;
|
|
1466
|
+
++code_begin;
|
|
1467
|
+
}
|
|
1468
|
+
|
|
1469
|
+
self=(_lzham_TDecompress*)_dec_malloc(sizeof(_lzham_TDecompress)+kBufSize*2);
|
|
1470
|
+
if (!self) _dec_memErr_rt();
|
|
1471
|
+
memset(self,0,sizeof(_lzham_TDecompress));
|
|
1472
|
+
self->codeStream=codeStream;
|
|
1473
|
+
self->code_begin=code_begin;
|
|
1474
|
+
self->input=self->buf;
|
|
1475
|
+
self->output=self->buf+kBufSize;
|
|
1476
|
+
self->code_end=code_end;
|
|
1477
|
+
self->available_in = 0;
|
|
1478
|
+
self->next_in = 0;
|
|
1479
|
+
self->available_out = (self->output-self->input);
|
|
1480
|
+
self->next_out =self->output;
|
|
1481
|
+
self->data_begin=self->output;
|
|
1482
|
+
|
|
1483
|
+
memset(¶ms, 0, sizeof(params));
|
|
1484
|
+
params.m_struct_size = sizeof(params);
|
|
1485
|
+
params.m_dict_size_log2 = dict_bits;
|
|
1486
|
+
|
|
1487
|
+
self->s = lzham_decompress_init(¶ms);
|
|
1488
|
+
if (!self->s){ free(self); _dec_openErr_rt(); }
|
|
1489
|
+
|
|
1490
|
+
return self;
|
|
1491
|
+
}
|
|
1492
|
+
static hpatch_BOOL _lzham_close(struct hpatch_TDecompress* decompressPlugin,
|
|
1493
|
+
hpatch_decompressHandle decompressHandle){
|
|
1494
|
+
_lzham_TDecompress* self=(_lzham_TDecompress*)decompressHandle;
|
|
1495
|
+
if (!self) return hpatch_TRUE;
|
|
1496
|
+
_dec_onDecErr_up();
|
|
1497
|
+
lzham_decompress_deinit(self->s);
|
|
1498
|
+
free(self);
|
|
1499
|
+
return hpatch_TRUE;
|
|
1500
|
+
}
|
|
1501
|
+
static hpatch_BOOL _lzham_decompress_part(hpatch_decompressHandle decompressHandle,
|
|
1502
|
+
unsigned char* out_part_data,unsigned char* out_part_data_end){
|
|
1503
|
+
_lzham_TDecompress* self=(_lzham_TDecompress*)decompressHandle;
|
|
1504
|
+
while (out_part_data<out_part_data_end) {
|
|
1505
|
+
size_t dataLen=(self->next_out-self->data_begin);
|
|
1506
|
+
if (dataLen>0){
|
|
1507
|
+
if (dataLen>(size_t)(out_part_data_end-out_part_data))
|
|
1508
|
+
dataLen=(out_part_data_end-out_part_data);
|
|
1509
|
+
memcpy(out_part_data,self->data_begin,dataLen);
|
|
1510
|
+
out_part_data+=dataLen;
|
|
1511
|
+
self->data_begin+=dataLen;
|
|
1512
|
+
}else{
|
|
1513
|
+
lzham_decompress_status_t ret;
|
|
1514
|
+
if (self->available_in==0) {
|
|
1515
|
+
self->available_in=(self->output-self->input);
|
|
1516
|
+
if (self->available_in>self->code_end-self->code_begin)
|
|
1517
|
+
self->available_in=(size_t)(self->code_end-self->code_begin);
|
|
1518
|
+
if (self->available_in>0){
|
|
1519
|
+
if (!self->codeStream->read(self->codeStream,self->code_begin,(unsigned char*)self->input,
|
|
1520
|
+
self->input+self->available_in))
|
|
1521
|
+
return hpatch_FALSE;
|
|
1522
|
+
self->code_begin+=self->available_in;
|
|
1523
|
+
}
|
|
1524
|
+
self->next_in=self->input;
|
|
1525
|
+
}
|
|
1526
|
+
{
|
|
1527
|
+
size_t available_in_back=self->available_in;
|
|
1528
|
+
self->available_out = (self->output-self->input);
|
|
1529
|
+
ret=lzham_decompress(self->s,self->next_in,&self->available_in,
|
|
1530
|
+
self->output,&self->available_out,(self->code_begin==self->code_end));
|
|
1531
|
+
self->next_out=self->output+self->available_out;
|
|
1532
|
+
self->next_in+=self->available_in;
|
|
1533
|
+
self->available_in=available_in_back-self->available_in;
|
|
1534
|
+
self->available_out=(self->output-self->input) - self->available_out;
|
|
1535
|
+
self->data_begin=self->output;
|
|
1536
|
+
}
|
|
1537
|
+
switch (ret){
|
|
1538
|
+
case LZHAM_DECOMP_STATUS_SUCCESS:
|
|
1539
|
+
case LZHAM_DECOMP_STATUS_HAS_MORE_OUTPUT:
|
|
1540
|
+
case LZHAM_DECOMP_STATUS_NOT_FINISHED: {
|
|
1541
|
+
if (self->next_out==self->data_begin) _dec_onDecErr_rt();
|
|
1542
|
+
} break;
|
|
1543
|
+
case LZHAM_DECOMP_STATUS_NEEDS_MORE_INPUT: {
|
|
1544
|
+
if (self->code_end==self->code_begin) _dec_onDecErr_rt();
|
|
1545
|
+
} break;
|
|
1546
|
+
default:
|
|
1547
|
+
_dec_onDecErr_rt();
|
|
1548
|
+
}
|
|
1549
|
+
}
|
|
1550
|
+
}
|
|
1551
|
+
return hpatch_TRUE;
|
|
1552
|
+
}
|
|
1553
|
+
static hpatch_TDecompress lzhamDecompressPlugin={_lzham_is_can_open,_lzham_open,
|
|
1554
|
+
_lzham_close,_lzham_decompress_part};
|
|
1555
|
+
#endif//_CompressPlugin_lzham
|
|
1556
|
+
|
|
1557
|
+
|
|
1558
|
+
#ifdef _CompressPlugin_tuz
|
|
1559
|
+
#if (_IsNeedIncludeDefaultCompressHead)
|
|
1560
|
+
# include "tuz_dec.h" // "tinyuz/decompress/tuz_dec.h" https://github.com/sisong/tinyuz
|
|
1561
|
+
#endif
|
|
1562
|
+
typedef struct _tuz_TDecompress{
|
|
1563
|
+
const struct hpatch_TStreamInput* codeStream;
|
|
1564
|
+
hpatch_StreamPos_t code_begin;
|
|
1565
|
+
hpatch_StreamPos_t code_end;
|
|
1566
|
+
tuz_byte* dec_mem;
|
|
1567
|
+
tuz_TStream s;
|
|
1568
|
+
hpatch_dec_error_t decError;
|
|
1569
|
+
} _tuz_TDecompress;
|
|
1570
|
+
|
|
1571
|
+
static tuz_BOOL _tuz_TDecompress_read_code(tuz_TInputStreamHandle listener,
|
|
1572
|
+
tuz_byte* out_code,tuz_size_t* code_size){
|
|
1573
|
+
_tuz_TDecompress* self=(_tuz_TDecompress*)listener;
|
|
1574
|
+
tuz_size_t r_size=*code_size;
|
|
1575
|
+
hpatch_StreamPos_t s_size=self->code_end-self->code_begin;
|
|
1576
|
+
if (r_size>s_size){
|
|
1577
|
+
r_size=(tuz_size_t)s_size;
|
|
1578
|
+
*code_size=r_size;
|
|
1579
|
+
}
|
|
1580
|
+
if (!self->codeStream->read(self->codeStream,self->code_begin,
|
|
1581
|
+
out_code,out_code+r_size)) return tuz_FALSE;
|
|
1582
|
+
self->code_begin+=r_size;
|
|
1583
|
+
return tuz_TRUE;
|
|
1584
|
+
}
|
|
1585
|
+
|
|
1586
|
+
static hpatch_BOOL _tuz_is_can_open(const char* compressType){
|
|
1587
|
+
return (0==strcmp(compressType,"tuz"));
|
|
1588
|
+
}
|
|
1589
|
+
static hpatch_decompressHandle _tuz_open(hpatch_TDecompress* decompressPlugin,
|
|
1590
|
+
hpatch_StreamPos_t dataSize,
|
|
1591
|
+
const hpatch_TStreamInput* codeStream,
|
|
1592
|
+
hpatch_StreamPos_t code_begin,
|
|
1593
|
+
hpatch_StreamPos_t code_end){
|
|
1594
|
+
tuz_size_t dictSize;
|
|
1595
|
+
_tuz_TDecompress* self=0;
|
|
1596
|
+
self=(_tuz_TDecompress*)_dec_malloc(sizeof(_tuz_TDecompress));
|
|
1597
|
+
if (!self) _dec_memErr_rt();
|
|
1598
|
+
self->dec_mem=0;
|
|
1599
|
+
self->codeStream=codeStream;
|
|
1600
|
+
self->code_begin=code_begin;
|
|
1601
|
+
self->code_end=code_end;
|
|
1602
|
+
self->decError=hpatch_dec_ok;
|
|
1603
|
+
dictSize=tuz_TStream_read_dict_size(self,_tuz_TDecompress_read_code);
|
|
1604
|
+
if (((tuz_size_t)(dictSize-1))>=tuz_kMaxOfDictSize) { free(self); _dec_openErr_rt(); }
|
|
1605
|
+
self->dec_mem=(tuz_byte*)_dec_malloc(dictSize+kDecompressBufSize);
|
|
1606
|
+
if (self->dec_mem==0){ free(self); _dec_memErr_rt(); }
|
|
1607
|
+
if (tuz_OK!=tuz_TStream_open(&self->s,self,_tuz_TDecompress_read_code,
|
|
1608
|
+
self->dec_mem,dictSize,kDecompressBufSize)){
|
|
1609
|
+
free(self->dec_mem); free(self); _dec_openErr_rt(); }
|
|
1610
|
+
return self;
|
|
1611
|
+
}
|
|
1612
|
+
static hpatch_BOOL _tuz_close(struct hpatch_TDecompress* decompressPlugin,
|
|
1613
|
+
hpatch_decompressHandle decompressHandle){
|
|
1614
|
+
_tuz_TDecompress* self=(_tuz_TDecompress*)decompressHandle;
|
|
1615
|
+
if (!self) return hpatch_TRUE;
|
|
1616
|
+
_dec_onDecErr_up();
|
|
1617
|
+
if (self->dec_mem) free(self->dec_mem);
|
|
1618
|
+
free(self);
|
|
1619
|
+
return hpatch_TRUE;
|
|
1620
|
+
}
|
|
1621
|
+
static hpatch_BOOL _tuz_decompress_part(hpatch_decompressHandle decompressHandle,
|
|
1622
|
+
unsigned char* out_part_data,unsigned char* out_part_data_end){
|
|
1623
|
+
tuz_TResult ret;
|
|
1624
|
+
_tuz_TDecompress* self=(_tuz_TDecompress*)decompressHandle;
|
|
1625
|
+
size_t out_size=out_part_data_end-out_part_data;
|
|
1626
|
+
tuz_size_t data_size=(tuz_size_t)out_size;
|
|
1627
|
+
assert(data_size==out_size);
|
|
1628
|
+
ret=tuz_TStream_decompress_partial(&self->s,out_part_data,&data_size);
|
|
1629
|
+
if (!((ret<=tuz_STREAM_END)&&(data_size==out_size)))
|
|
1630
|
+
_dec_onDecErr_rt();
|
|
1631
|
+
return hpatch_TRUE;
|
|
1632
|
+
}
|
|
1633
|
+
static hpatch_TDecompress tuzDecompressPlugin={_tuz_is_can_open,_tuz_open,
|
|
1634
|
+
_tuz_close,_tuz_decompress_part};
|
|
1635
|
+
#endif//_CompressPlugin_tuz
|
|
1636
|
+
|
|
1637
|
+
#endif
|