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,1971 @@
|
|
|
1
|
+
//hdiffz.cpp
|
|
2
|
+
// diff tool
|
|
3
|
+
//
|
|
4
|
+
/*
|
|
5
|
+
The MIT License (MIT)
|
|
6
|
+
Copyright (c) 2012-2021 HouSisong
|
|
7
|
+
|
|
8
|
+
Permission is hereby granted, free of charge, to any person
|
|
9
|
+
obtaining a copy of this software and associated documentation
|
|
10
|
+
files (the "Software"), to deal in the Software without
|
|
11
|
+
restriction, including without limitation the rights to use,
|
|
12
|
+
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
13
|
+
copies of the Software, and to permit persons to whom the
|
|
14
|
+
Software is furnished to do so, subject to the following
|
|
15
|
+
conditions:
|
|
16
|
+
|
|
17
|
+
The above copyright notice and this permission notice shall be
|
|
18
|
+
included in all copies of the Software.
|
|
19
|
+
|
|
20
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
21
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
|
22
|
+
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
23
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
24
|
+
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
25
|
+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
26
|
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
27
|
+
OTHER DEALINGS IN THE SOFTWARE.
|
|
28
|
+
*/
|
|
29
|
+
|
|
30
|
+
#include <iostream>
|
|
31
|
+
#include <fstream>
|
|
32
|
+
#include <string>
|
|
33
|
+
#include <vector>
|
|
34
|
+
#include <string.h>
|
|
35
|
+
#include <stdlib.h>
|
|
36
|
+
#include <stdio.h>
|
|
37
|
+
#include "libHDiffPatch/HDiff/diff.h"
|
|
38
|
+
#include "libHDiffPatch/HDiff/match_block.h"
|
|
39
|
+
#include "libHDiffPatch/HPatch/patch.h"
|
|
40
|
+
#include "_clock_for_demo.h"
|
|
41
|
+
#include "_atosize.h"
|
|
42
|
+
#include "file_for_patch.h"
|
|
43
|
+
#include "libHDiffPatch/HDiff/private_diff/mem_buf.h"
|
|
44
|
+
#include "hdiffz_import_patch.h"
|
|
45
|
+
|
|
46
|
+
#include "_dir_ignore.h"
|
|
47
|
+
#include "dirDiffPatch/dir_diff/dir_diff.h"
|
|
48
|
+
|
|
49
|
+
#ifndef _IS_NEED_MAIN
|
|
50
|
+
# define _IS_NEED_MAIN 1
|
|
51
|
+
#endif
|
|
52
|
+
#ifndef _IS_NEED_BSDIFF
|
|
53
|
+
# define _IS_NEED_BSDIFF 1
|
|
54
|
+
#endif
|
|
55
|
+
#ifndef _IS_NEED_VCDIFF
|
|
56
|
+
# define _IS_NEED_VCDIFF 1
|
|
57
|
+
#endif
|
|
58
|
+
|
|
59
|
+
#ifndef _IS_NEED_DEFAULT_CompressPlugin
|
|
60
|
+
# define _IS_NEED_DEFAULT_CompressPlugin 1
|
|
61
|
+
#endif
|
|
62
|
+
#if (_IS_NEED_ALL_CompressPlugin)
|
|
63
|
+
# undef _IS_NEED_DEFAULT_CompressPlugin
|
|
64
|
+
# define _IS_NEED_DEFAULT_CompressPlugin 1
|
|
65
|
+
#endif
|
|
66
|
+
#if (_IS_NEED_DEFAULT_CompressPlugin)
|
|
67
|
+
//===== select needs decompress plugins or change to your plugin=====
|
|
68
|
+
# define _CompressPlugin_zlib // memory requires less
|
|
69
|
+
# define _CompressPlugin_ldef // faster or better compress than zlib / (now used ldef+zlib decompressor)
|
|
70
|
+
# define _CompressPlugin_bz2
|
|
71
|
+
# define _CompressPlugin_lzma // better compresser
|
|
72
|
+
# define _CompressPlugin_lzma2 // better compresser
|
|
73
|
+
# define _CompressPlugin_zstd // better compresser / faster decompressor
|
|
74
|
+
#if (_IS_NEED_VCDIFF)
|
|
75
|
+
# define _CompressPlugin_7zXZ //only for VCDIFF, used lzma2
|
|
76
|
+
#endif
|
|
77
|
+
|
|
78
|
+
#endif
|
|
79
|
+
#if (_IS_NEED_ALL_CompressPlugin)
|
|
80
|
+
//===== select needs decompress plugins or change to your plugin=====
|
|
81
|
+
# define _CompressPlugin_lz4 // faster compresser / faster decompressor
|
|
82
|
+
# define _CompressPlugin_lz4hc // compress slower & better than lz4 / (used lz4 decompressor)
|
|
83
|
+
# define _CompressPlugin_brotli// better compresser / faster decompressor
|
|
84
|
+
# define _CompressPlugin_lzham // better compresser / decompress faster than lzma2
|
|
85
|
+
# define _CompressPlugin_tuz // slower compresser / decompress requires tiny code(.text) & ram
|
|
86
|
+
#endif
|
|
87
|
+
#ifdef _CompressPlugin_ldef
|
|
88
|
+
# ifndef _CompressPlugin_ldef_is_use_zlib
|
|
89
|
+
# define _CompressPlugin_ldef_is_use_zlib 1 //now ldef need zlib decompressor for any all of deflate code
|
|
90
|
+
# endif
|
|
91
|
+
# ifndef _IS_NEED_decompressor_ldef_replace_zlib
|
|
92
|
+
# define _IS_NEED_decompressor_ldef_replace_zlib 0
|
|
93
|
+
# endif
|
|
94
|
+
#endif
|
|
95
|
+
|
|
96
|
+
#if (_IS_NEED_BSDIFF)
|
|
97
|
+
# include "bsdiff_wrapper/bsdiff_wrapper.h"
|
|
98
|
+
# include "bsdiff_wrapper/bspatch_wrapper.h"
|
|
99
|
+
# ifndef _CompressPlugin_bz2
|
|
100
|
+
# define _CompressPlugin_bz2 //bsdiff need bz2
|
|
101
|
+
# endif
|
|
102
|
+
#endif
|
|
103
|
+
#if (_IS_NEED_VCDIFF)
|
|
104
|
+
# include "vcdiff_wrapper/vcdiff_wrapper.h"
|
|
105
|
+
# include "vcdiff_wrapper/vcpatch_wrapper.h"
|
|
106
|
+
#endif
|
|
107
|
+
|
|
108
|
+
#include "compress_plugin_demo.h"
|
|
109
|
+
#include "decompress_plugin_demo.h"
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
#if (_IS_NEED_DIR_DIFF_PATCH)
|
|
113
|
+
|
|
114
|
+
#ifndef _IS_NEED_DEFAULT_ChecksumPlugin
|
|
115
|
+
# define _IS_NEED_DEFAULT_ChecksumPlugin 1
|
|
116
|
+
#endif
|
|
117
|
+
#if (_IS_NEED_ALL_ChecksumPlugin)
|
|
118
|
+
# undef _IS_NEED_DEFAULT_ChecksumPlugin
|
|
119
|
+
# define _IS_NEED_DEFAULT_ChecksumPlugin 1
|
|
120
|
+
#endif
|
|
121
|
+
#if (_IS_NEED_DEFAULT_ChecksumPlugin)
|
|
122
|
+
//===== select needs checksum plugins or change to your plugin=====
|
|
123
|
+
# define _ChecksumPlugin_crc32 // 32 bit effective //need zlib
|
|
124
|
+
# define _ChecksumPlugin_fadler64 // ? 63 bit effective
|
|
125
|
+
# define _ChecksumPlugin_md5 // 128 bit
|
|
126
|
+
# define _ChecksumPlugin_xxh3 // 64 bit fast
|
|
127
|
+
# define _ChecksumPlugin_xxh128 // 128 bit fast
|
|
128
|
+
#endif
|
|
129
|
+
#if (_IS_NEED_ALL_ChecksumPlugin)
|
|
130
|
+
//===== select needs checksum plugins or change to your plugin=====
|
|
131
|
+
# define _ChecksumPlugin_adler32 // ? 29 bit effective
|
|
132
|
+
# define _ChecksumPlugin_adler64 // ? 30 bit effective
|
|
133
|
+
# define _ChecksumPlugin_fadler32 // ~ 32 bit effective
|
|
134
|
+
# define _ChecksumPlugin_fadler128// ? 81 bit effective
|
|
135
|
+
# define _ChecksumPlugin_blake3 // 256 bit
|
|
136
|
+
#endif
|
|
137
|
+
|
|
138
|
+
#include "checksum_plugin_demo.h"
|
|
139
|
+
#endif
|
|
140
|
+
|
|
141
|
+
static void printVersion(){
|
|
142
|
+
printf("HDiffPatch::hdiffz v" HDIFFPATCH_VERSION_STRING "\n");
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
static void printHelpInfo(){
|
|
146
|
+
printf(" -h (or -?)\n"
|
|
147
|
+
" print usage info.\n");
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
static void printUsage(){
|
|
151
|
+
printVersion();
|
|
152
|
+
printf("\n");
|
|
153
|
+
printf("diff usage: hdiffz [options] oldPath newPath outDiffFile\n"
|
|
154
|
+
"test usage: hdiffz -t oldPath newPath testDiffFile\n"
|
|
155
|
+
"resave usage: hdiffz [-c-...] diffFile outDiffFile\n"
|
|
156
|
+
"print info: hdiffz -info diffFile\n"
|
|
157
|
+
#if (_IS_NEED_DIR_DIFF_PATCH)
|
|
158
|
+
"get manifest: hdiffz [-g#...] [-C-checksumType] inputPath -M#outManifestTxtFile\n"
|
|
159
|
+
"manifest diff: hdiffz [options] -M-old#oldManifestFile -M-new#newManifestFile\n"
|
|
160
|
+
" oldPath newPath outDiffFile\n"
|
|
161
|
+
" oldPath newPath inputPath can be file or directory(folder),\n"
|
|
162
|
+
#endif
|
|
163
|
+
" oldPath can empty, and input parameter \"\"\n"
|
|
164
|
+
"options:\n"
|
|
165
|
+
" -m[-matchScore]\n"
|
|
166
|
+
" DEFAULT; all file load into Memory; best diffFileSize;\n"
|
|
167
|
+
" requires (newFileSize+ oldFileSize*5(or *9 when oldFileSize>=2GB))+O(1)\n"
|
|
168
|
+
" bytes of memory;\n"
|
|
169
|
+
" matchScore>=0, DEFAULT -m-6, recommended bin: 0--4 text: 4--9 etc...\n"
|
|
170
|
+
" -s[-matchBlockSize]\n"
|
|
171
|
+
" all file load as Stream; fast;\n"
|
|
172
|
+
" requires O(oldFileSize*16/matchBlockSize+matchBlockSize*5"
|
|
173
|
+
#if (_IS_USED_MULTITHREAD)
|
|
174
|
+
"*parallelThreadNumber"
|
|
175
|
+
#endif
|
|
176
|
+
")bytes of memory;\n"
|
|
177
|
+
" matchBlockSize>=4, DEFAULT -s-64, recommended 16,32,48,1k,64k,1m etc...\n"
|
|
178
|
+
" -block-fastMatchBlockSize \n"
|
|
179
|
+
" must run with -m;\n"
|
|
180
|
+
" set block match befor slow byte-by-byte match, DEFAULT -block-1k;\n"
|
|
181
|
+
" if set -block-0, means don't use block match;\n"
|
|
182
|
+
" fastMatchBlockSize>=4, recommended 128,4k,64k, etc...\n"
|
|
183
|
+
" if newData similar to oldData then diff speed++ & diff memory--,\n"
|
|
184
|
+
" but small possibility outDiffFile's size+\n"
|
|
185
|
+
" -cache \n"
|
|
186
|
+
" must run with -m;\n"
|
|
187
|
+
" set is use a big cache for slow match, DEFAULT false;\n"
|
|
188
|
+
" if newData not similar to oldData then diff speed++,\n"
|
|
189
|
+
" big cache max used O(oldFileSize) memory, and build slow(diff speed--)\n"
|
|
190
|
+
" -SD[-stepSize]\n"
|
|
191
|
+
" create single compressed diffData, only need one decompress buffer\n"
|
|
192
|
+
" when patch, and support step by step patching when step by step downloading!\n"
|
|
193
|
+
" and supports multi-thread patching!\n"
|
|
194
|
+
" stepSize>=" _HDIFFPATCH_EXPAND_AND_QUOTE(hpatch_kStreamCacheSize) ", DEFAULT -SD-256k, recommended 64k,2m etc...\n"
|
|
195
|
+
#if (_IS_NEED_BSDIFF)
|
|
196
|
+
" -BSD\n"
|
|
197
|
+
" create diffFile compatible with bsdiff4, unsupport input directory(folder).\n"
|
|
198
|
+
" also support run with -SD (not used stepSize), then create single compressed\n"
|
|
199
|
+
" diffFile compatible with endsley/bsdiff (https://github.com/mendsley/bsdiff).\n"
|
|
200
|
+
#endif
|
|
201
|
+
#if (_IS_NEED_VCDIFF)
|
|
202
|
+
# ifdef _CompressPlugin_7zXZ
|
|
203
|
+
" -VCD[-compressLevel[-dictSize]]\n"
|
|
204
|
+
" create diffFile compatible with VCDIFF, unsupport input directory(folder).\n"
|
|
205
|
+
" DEFAULT no compress, out format same as $open-vcdiff ... or $xdelta3 -S -e -n ...\n"
|
|
206
|
+
" if set compressLevel, out format same as $xdelta3 -S lzma -e -n ...\n"
|
|
207
|
+
" compress by 7zXZ(xz), compressLevel in {0..9}, DEFAULT level 7;\n"
|
|
208
|
+
" dictSize can like 4096 or 4k or 4m or 16m etc..., DEFAULT 8m\n"
|
|
209
|
+
# if (_IS_USED_MULTITHREAD)
|
|
210
|
+
" support compress by multi-thread parallel.\n"
|
|
211
|
+
# endif
|
|
212
|
+
# else
|
|
213
|
+
" -VCD\n"
|
|
214
|
+
" create diffFile compatible with VCDIFF, unsupport input directory(folder).\n"
|
|
215
|
+
" out format same as $open-vcdiff ... or $xdelta3 -S -e -n ...\n"
|
|
216
|
+
# endif
|
|
217
|
+
" NOTE: out diffFile used large source window size!\n"
|
|
218
|
+
#endif
|
|
219
|
+
#if (_IS_USED_MULTITHREAD)
|
|
220
|
+
" -p-parallelThreadNumber\n"
|
|
221
|
+
" if parallelThreadNumber>1 then open multi-thread Parallel mode;\n"
|
|
222
|
+
" DEFAULT -p-4; requires more memory!\n"
|
|
223
|
+
" -p-search-searchThreadNumber\n"
|
|
224
|
+
" DEFAULT searchThreadNumber same as parallelThreadNumber;\n"
|
|
225
|
+
" old file on HDD hard drives WARNING: multi-thread search need frequent random\n"
|
|
226
|
+
" disk reads when -s-matchBlockSize or -block-fastMatchBlockSize(run with -m),\n"
|
|
227
|
+
" causes slowdown; at this time, need to close(searchThreadNumber<=1) multi-thread\n"
|
|
228
|
+
" search mode or reduce the number of searchThreadNumber!\n"
|
|
229
|
+
#endif
|
|
230
|
+
" -c-compressType[-compressLevel]\n"
|
|
231
|
+
" set outDiffFile Compress type, DEFAULT uncompress;\n"
|
|
232
|
+
" for resave diffFile,recompress diffFile to outDiffFile by new set;\n"
|
|
233
|
+
" support compress type & level & dict:\n"
|
|
234
|
+
#ifdef _CompressPlugin_zlib
|
|
235
|
+
" -c-zlib[-{1..9}[-dictBits]] DEFAULT level 9\n"
|
|
236
|
+
" dictBits can 9--15, DEFAULT 15.\n"
|
|
237
|
+
# if (_IS_USED_MULTITHREAD)
|
|
238
|
+
" support run by multi-thread parallel, fast!\n"
|
|
239
|
+
# endif
|
|
240
|
+
#endif
|
|
241
|
+
#ifdef _CompressPlugin_ldef
|
|
242
|
+
" -c-ldef[-{1..12}] DEFAULT level 12\n"
|
|
243
|
+
" compatible with -c-zlib, faster or better compress than zlib;\n"
|
|
244
|
+
" used libdeflate compressor, & dictBits always 15.\n"
|
|
245
|
+
# if (_IS_USED_MULTITHREAD)
|
|
246
|
+
" support run by multi-thread parallel, fast!\n"
|
|
247
|
+
# endif
|
|
248
|
+
#endif
|
|
249
|
+
#ifdef _CompressPlugin_bz2
|
|
250
|
+
" -c-bzip2[-{1..9}] (or -bz2) DEFAULT level 9\n"
|
|
251
|
+
# if (_IS_USED_MULTITHREAD)
|
|
252
|
+
" -c-pbzip2[-{1..9}] (or -pbz2) DEFAULT level 8\n"
|
|
253
|
+
" support run by multi-thread parallel, fast!\n"
|
|
254
|
+
" NOTE: code not compatible with it compressed by -c-bzip2!\n"
|
|
255
|
+
# endif
|
|
256
|
+
#endif
|
|
257
|
+
#ifdef _CompressPlugin_lzma
|
|
258
|
+
" -c-lzma[-{0..9}[-dictSize]] DEFAULT level 7\n"
|
|
259
|
+
" dictSize can like 4096 or 4k or 4m or 128m etc..., DEFAULT 8m\n"
|
|
260
|
+
# if (_IS_USED_MULTITHREAD)
|
|
261
|
+
" support run by 2-thread parallel.\n"
|
|
262
|
+
# endif
|
|
263
|
+
#endif
|
|
264
|
+
#ifdef _CompressPlugin_lzma2
|
|
265
|
+
" -c-lzma2[-{0..9}[-dictSize]] DEFAULT level 7\n"
|
|
266
|
+
" dictSize can like 4096 or 4k or 4m or 128m etc..., DEFAULT 8m\n"
|
|
267
|
+
# if (_IS_USED_MULTITHREAD)
|
|
268
|
+
" support run by multi-thread parallel, fast!\n"
|
|
269
|
+
# endif
|
|
270
|
+
" NOTE: code not compatible with it compressed by -c-lzma!\n"
|
|
271
|
+
#endif
|
|
272
|
+
#ifdef _CompressPlugin_lz4
|
|
273
|
+
" -c-lz4[-{1..50}] DEFAULT level 50 (as lz4 acceleration 1)\n"
|
|
274
|
+
#endif
|
|
275
|
+
#ifdef _CompressPlugin_lz4hc
|
|
276
|
+
" -c-lz4hc[-{3..12}] DEFAULT level 11\n"
|
|
277
|
+
#endif
|
|
278
|
+
#ifdef _CompressPlugin_zstd
|
|
279
|
+
" -c-zstd[-{0..22}[-dictBits]] DEFAULT level 20\n"
|
|
280
|
+
" dictBits can 10--30, DEFAULT 23.\n"
|
|
281
|
+
# if (_IS_USED_MULTITHREAD)
|
|
282
|
+
" support run by multi-thread parallel, fast!\n"
|
|
283
|
+
# endif
|
|
284
|
+
#endif
|
|
285
|
+
#ifdef _CompressPlugin_brotli
|
|
286
|
+
" -c-brotli[-{0..11}[-dictBits]] DEFAULT level 9\n"
|
|
287
|
+
" dictBits can 10--30, DEFAULT 23.\n"
|
|
288
|
+
#endif
|
|
289
|
+
#ifdef _CompressPlugin_lzham
|
|
290
|
+
" -c-lzham[-{0..5}[-dictBits]] DEFAULT level 4\n"
|
|
291
|
+
" dictBits can 15--29, DEFAULT 23.\n"
|
|
292
|
+
# if (_IS_USED_MULTITHREAD)
|
|
293
|
+
" support run by multi-thread parallel, fast!\n"
|
|
294
|
+
# endif
|
|
295
|
+
#endif
|
|
296
|
+
#ifdef _CompressPlugin_tuz
|
|
297
|
+
" -c-tuz[-dictSize] (or -tinyuz)\n"
|
|
298
|
+
" 1<=dictSize<=" _HDIFFPATCH_EXPAND_AND_QUOTE(tuz_kMaxOfDictSize) ", can like 510,1k,4k,64k,1m,16m ..., DEFAULT 8m\n"
|
|
299
|
+
#endif
|
|
300
|
+
#if (_IS_NEED_DIR_DIFF_PATCH)
|
|
301
|
+
" -C-checksumType\n"
|
|
302
|
+
" set outDiffFile Checksum type for directory diff, DEFAULT "
|
|
303
|
+
#ifdef _ChecksumPlugin_fadler64
|
|
304
|
+
"-C-fadler64;\n"
|
|
305
|
+
#else
|
|
306
|
+
# ifdef _ChecksumPlugin_crc32
|
|
307
|
+
"-C-crc32;\n"
|
|
308
|
+
# else
|
|
309
|
+
"no checksum;\n"
|
|
310
|
+
# endif
|
|
311
|
+
" (if need checksum for diff between two files, add -D)\n"
|
|
312
|
+
#endif
|
|
313
|
+
" support checksum type:\n"
|
|
314
|
+
" -C-no no checksum\n"
|
|
315
|
+
#ifdef _ChecksumPlugin_crc32
|
|
316
|
+
# ifdef _ChecksumPlugin_fadler64
|
|
317
|
+
" -C-crc32\n"
|
|
318
|
+
# else
|
|
319
|
+
" -C-crc32 DEFAULT\n"
|
|
320
|
+
# endif
|
|
321
|
+
#endif
|
|
322
|
+
#ifdef _ChecksumPlugin_adler32
|
|
323
|
+
" -C-adler32\n"
|
|
324
|
+
#endif
|
|
325
|
+
#ifdef _ChecksumPlugin_adler64
|
|
326
|
+
" -C-adler64\n"
|
|
327
|
+
#endif
|
|
328
|
+
#ifdef _ChecksumPlugin_fadler32
|
|
329
|
+
" -C-fadler32\n"
|
|
330
|
+
#endif
|
|
331
|
+
#ifdef _ChecksumPlugin_fadler64
|
|
332
|
+
" -C-fadler64 DEFAULT\n"
|
|
333
|
+
#endif
|
|
334
|
+
#ifdef _ChecksumPlugin_fadler128
|
|
335
|
+
" -C-fadler128\n"
|
|
336
|
+
#endif
|
|
337
|
+
#ifdef _ChecksumPlugin_md5
|
|
338
|
+
" -C-md5\n"
|
|
339
|
+
#endif
|
|
340
|
+
#ifdef _ChecksumPlugin_blake3
|
|
341
|
+
" -C-blake3\n"
|
|
342
|
+
#endif
|
|
343
|
+
#ifdef _ChecksumPlugin_xxh3
|
|
344
|
+
" -C-xxh3 (need v4.12 patcher)\n"
|
|
345
|
+
#endif
|
|
346
|
+
#ifdef _ChecksumPlugin_xxh128
|
|
347
|
+
" -C-xxh128 recommended (need v4.12 patcher)\n"
|
|
348
|
+
#endif
|
|
349
|
+
" -n-maxOpenFileNumber\n"
|
|
350
|
+
" limit Number of open files at same time when stream directory diff;\n"
|
|
351
|
+
" maxOpenFileNumber>=16, DEFAULT -n-48, the best limit value by different\n"
|
|
352
|
+
" operating system.\n"
|
|
353
|
+
" -g#ignorePath[#ignorePath#...]\n"
|
|
354
|
+
" set iGnore path list when Directory Diff; ignore path list such as:\n"
|
|
355
|
+
" #.DS_Store#desktop.ini#*thumbs*.db#.git*#.svn/#cache_*/00*11/*.tmp\n"
|
|
356
|
+
" # means separator between names; (if char # in name, need write #: )\n"
|
|
357
|
+
" * means can match any chars in name; (if char * in name, need write *: );\n"
|
|
358
|
+
" / at the end of name means must match directory;\n"
|
|
359
|
+
" -g-old#ignorePath[#ignorePath#...]\n"
|
|
360
|
+
" set iGnore path list in oldPath when Directory Diff;\n"
|
|
361
|
+
" if oldFile can be changed, need add it in old ignore list;\n"
|
|
362
|
+
" -g-new#ignorePath[#ignorePath#...]\n"
|
|
363
|
+
" set iGnore path list in newPath when Directory Diff;\n"
|
|
364
|
+
" in general, new ignore list should is empty;\n"
|
|
365
|
+
" -M#outManifestTxtFile\n"
|
|
366
|
+
" create a Manifest file for inputPath; it is a text file, saved infos of\n"
|
|
367
|
+
" all files and directoriy list in inputPath; this file while be used in \n"
|
|
368
|
+
" manifest diff, support re-checksum data by manifest diff;\n"
|
|
369
|
+
" can be used to protect historical versions be modified!\n"
|
|
370
|
+
" -M-old#oldManifestFile\n"
|
|
371
|
+
" oldManifestFile is created from oldPath; if no oldPath not need -M-old;\n"
|
|
372
|
+
" -M-new#newManifestFile\n"
|
|
373
|
+
" newManifestFile is created from newPath;\n"
|
|
374
|
+
" -D force run Directory diff between two files; DEFAULT (no -D) run \n"
|
|
375
|
+
" directory diff need oldPath or newPath is directory.\n"
|
|
376
|
+
#endif //_IS_NEED_DIR_DIFF_PATCH
|
|
377
|
+
" -neq\n"
|
|
378
|
+
" open check: if newPath & oldPath's all datas are equal, then return error; \n"
|
|
379
|
+
" DEFAULT not check equal.\n"
|
|
380
|
+
" -d Diff only, do't run patch check, DEFAULT run patch check.\n"
|
|
381
|
+
" -t Test only, run patch check, patch(oldPath,testDiffFile)==newPath ? \n"
|
|
382
|
+
" -f Force overwrite, ignore write path already exists;\n"
|
|
383
|
+
" DEFAULT (no -f) not overwrite and then return error;\n"
|
|
384
|
+
" if used -f and write path is exist directory, will always return error.\n"
|
|
385
|
+
" --patch\n"
|
|
386
|
+
" swap to hpatchz mode.\n"
|
|
387
|
+
" -info\n"
|
|
388
|
+
" print infos of diffFile.\n"
|
|
389
|
+
" -v print Version info.\n"
|
|
390
|
+
);
|
|
391
|
+
printHelpInfo();
|
|
392
|
+
printf("\n");
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
typedef enum THDiffResult {
|
|
396
|
+
HDIFF_SUCCESS=0,
|
|
397
|
+
HDIFF_OPTIONS_ERROR,
|
|
398
|
+
HDIFF_OPENREAD_ERROR,
|
|
399
|
+
HDIFF_OPENWRITE_ERROR,
|
|
400
|
+
HDIFF_FILECLOSE_ERROR,
|
|
401
|
+
HDIFF_MEM_ERROR, // 5
|
|
402
|
+
HDIFF_DIFF_ERROR,
|
|
403
|
+
HDIFF_PATCH_ERROR,
|
|
404
|
+
HDIFF_RESAVE_FILEREAD_ERROR,
|
|
405
|
+
//HDIFF_RESAVE_OPENWRITE_ERROR = HDIFF_OPENWRITE_ERROR
|
|
406
|
+
HDIFF_RESAVE_DIFFINFO_ERROR,
|
|
407
|
+
HDIFF_RESAVE_COMPRESSTYPE_ERROR, // 10
|
|
408
|
+
HDIFF_RESAVE_ERROR,
|
|
409
|
+
HDIFF_RESAVE_CHECKSUMTYPE_ERROR,
|
|
410
|
+
|
|
411
|
+
HDIFF_PATHTYPE_ERROR, //adding begin v3.0
|
|
412
|
+
HDIFF_TEMPPATH_ERROR,
|
|
413
|
+
HDIFF_DELETEPATH_ERROR, // 15
|
|
414
|
+
HDIFF_RENAMEPATH_ERROR,
|
|
415
|
+
HDIFF_OLD_NEW_SAME_ERROR,//adding begin v4.7.0 ; note: now not included dir_diff(), dir_diff thow an error & return DIRDIFF_DIFF_ERROR
|
|
416
|
+
|
|
417
|
+
DIRDIFF_DIFF_ERROR=101,
|
|
418
|
+
DIRDIFF_PATCH_ERROR,
|
|
419
|
+
MANIFEST_CREATE_ERROR,
|
|
420
|
+
MANIFEST_TEST_ERROR,
|
|
421
|
+
} THDiffResult;
|
|
422
|
+
#define HDIFF_RESAVE_OPENWRITE_ERROR HDIFF_OPENWRITE_ERROR
|
|
423
|
+
|
|
424
|
+
int hdiff_cmd_line(int argc,const char * argv[]);
|
|
425
|
+
|
|
426
|
+
struct TDiffSets:public THDiffSets{
|
|
427
|
+
hpatch_BOOL isDoDiff;
|
|
428
|
+
hpatch_BOOL isDoPatchCheck;
|
|
429
|
+
#if (_IS_NEED_BSDIFF)
|
|
430
|
+
hpatch_BOOL isBsDiff;
|
|
431
|
+
#endif
|
|
432
|
+
#if (_IS_NEED_VCDIFF)
|
|
433
|
+
hpatch_BOOL isVcDiff;
|
|
434
|
+
#endif
|
|
435
|
+
};
|
|
436
|
+
|
|
437
|
+
#if (_IS_NEED_DIR_DIFF_PATCH)
|
|
438
|
+
int hdiff_dir(const char* oldPath,const char* newPath,const char* outDiffFileName,
|
|
439
|
+
const hdiff_TCompress* compressPlugin,hpatch_TChecksum* checksumPlugin,
|
|
440
|
+
hpatch_BOOL oldIsDir, hpatch_BOOL newIsDir,
|
|
441
|
+
const TDiffSets& diffSets,size_t kMaxOpenFileNumber,
|
|
442
|
+
const std::vector<std::string>& ignorePathListBase,const std::vector<std::string>& ignoreOldPathList,
|
|
443
|
+
const std::vector<std::string>& ignoreNewPathList,
|
|
444
|
+
const std::string& oldManifestFileName,const std::string& newManifestFileName);
|
|
445
|
+
int create_manifest(const char* inputPath,const char* outManifestFileName,
|
|
446
|
+
hpatch_TChecksum* checksumPlugin,const std::vector<std::string>& ignorePathList);
|
|
447
|
+
#endif
|
|
448
|
+
int hdiff(const char* oldFileName,const char* newFileName,const char* outDiffFileName,
|
|
449
|
+
const hdiff_TCompress* compressPlugin,const TDiffSets& diffSets);
|
|
450
|
+
int hdiff_resave(const char* diffFileName,const char* outDiffFileName,
|
|
451
|
+
const hdiff_TCompress* compressPlugin);
|
|
452
|
+
|
|
453
|
+
#define _checkPatchMode(_argc,_argv) \
|
|
454
|
+
if (isSwapToPatchMode(_argc,_argv)){ \
|
|
455
|
+
printf("hdiffz swap to hpatchz mode.\n\n"); \
|
|
456
|
+
return hpatch_cmd_line(_argc,_argv); \
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
#if (_IS_NEED_MAIN)
|
|
460
|
+
# if (_IS_USED_WIN32_UTF8_WAPI)
|
|
461
|
+
int wmain(int argc,wchar_t* argv_w[]){
|
|
462
|
+
hdiff_private::TAutoMem _mem(hpatch_kPathMaxSize*4);
|
|
463
|
+
char** argv_utf8=(char**)_mem.data();
|
|
464
|
+
if (!_wFileNames_to_utf8((const wchar_t**)argv_w,argc,argv_utf8,_mem.size()))
|
|
465
|
+
return HDIFF_OPTIONS_ERROR;
|
|
466
|
+
SetDefaultStringLocale();
|
|
467
|
+
_checkPatchMode(argc,(const char**)argv_utf8);
|
|
468
|
+
return hdiff_cmd_line(argc,(const char**)argv_utf8);
|
|
469
|
+
}
|
|
470
|
+
# else
|
|
471
|
+
int main(int argc,char* argv[]){
|
|
472
|
+
_checkPatchMode(argc,(const char**)argv);
|
|
473
|
+
return hdiff_cmd_line(argc,(const char**)argv);
|
|
474
|
+
}
|
|
475
|
+
# endif
|
|
476
|
+
#endif
|
|
477
|
+
|
|
478
|
+
|
|
479
|
+
static hpatch_BOOL _getIsCompressedDiffFile(const char* diffFileName){
|
|
480
|
+
hpatch_TFileStreamInput diffData;
|
|
481
|
+
hpatch_TFileStreamInput_init(&diffData);
|
|
482
|
+
if (!hpatch_TFileStreamInput_open(&diffData,diffFileName)) return hpatch_FALSE;
|
|
483
|
+
hpatch_compressedDiffInfo diffInfo;
|
|
484
|
+
hpatch_BOOL result=getCompressedDiffInfo(&diffInfo,&diffData.base);
|
|
485
|
+
if (!hpatch_TFileStreamInput_close(&diffData)) return hpatch_FALSE;
|
|
486
|
+
return result;
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
static hpatch_BOOL _getIsSingleStreamDiffFile(const char* diffFileName){
|
|
490
|
+
hpatch_TFileStreamInput diffData;
|
|
491
|
+
hpatch_TFileStreamInput_init(&diffData);
|
|
492
|
+
if (!hpatch_TFileStreamInput_open(&diffData,diffFileName)) return hpatch_FALSE;
|
|
493
|
+
hpatch_singleCompressedDiffInfo diffInfo;
|
|
494
|
+
hpatch_BOOL result=getSingleCompressedDiffInfo(&diffInfo,&diffData.base,0);
|
|
495
|
+
if (!hpatch_TFileStreamInput_close(&diffData)) return hpatch_FALSE;
|
|
496
|
+
return result;
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
#if (_IS_NEED_BSDIFF)
|
|
500
|
+
static hpatch_BOOL _getIsBsDiffFile(const char* diffFileName) {
|
|
501
|
+
hpatch_TFileStreamInput diffData;
|
|
502
|
+
hpatch_TFileStreamInput_init(&diffData);
|
|
503
|
+
if (!hpatch_TFileStreamInput_open(&diffData, diffFileName)) return hpatch_FALSE;
|
|
504
|
+
hpatch_BOOL result=getIsBsDiff(&diffData.base,0);
|
|
505
|
+
if (!hpatch_TFileStreamInput_close(&diffData)) return hpatch_FALSE;
|
|
506
|
+
return result;
|
|
507
|
+
}
|
|
508
|
+
#endif
|
|
509
|
+
#if (_IS_NEED_VCDIFF)
|
|
510
|
+
static hpatch_BOOL _getIsVcDiffFile(const char* diffFileName) {
|
|
511
|
+
hpatch_TFileStreamInput diffData;
|
|
512
|
+
hpatch_TFileStreamInput_init(&diffData);
|
|
513
|
+
if (!hpatch_TFileStreamInput_open(&diffData, diffFileName)) return hpatch_FALSE;
|
|
514
|
+
hpatch_BOOL result=getIsVcDiff(&diffData.base);
|
|
515
|
+
if (!hpatch_TFileStreamInput_close(&diffData)) return hpatch_FALSE;
|
|
516
|
+
return result;
|
|
517
|
+
}
|
|
518
|
+
#endif
|
|
519
|
+
|
|
520
|
+
|
|
521
|
+
#define _try_rt_dec(dec) { if (dec.is_can_open(compressType)) return &dec; }
|
|
522
|
+
|
|
523
|
+
static hpatch_TDecompress* __find_decompressPlugin(const char* compressType){
|
|
524
|
+
#if ((defined(_CompressPlugin_ldef))&&_IS_NEED_decompressor_ldef_replace_zlib)
|
|
525
|
+
_try_rt_dec(ldefDecompressPlugin);
|
|
526
|
+
#else
|
|
527
|
+
# ifdef _CompressPlugin_zlib
|
|
528
|
+
_try_rt_dec(zlibDecompressPlugin);
|
|
529
|
+
# endif
|
|
530
|
+
#endif
|
|
531
|
+
#ifdef _CompressPlugin_bz2
|
|
532
|
+
_try_rt_dec(bz2DecompressPlugin);
|
|
533
|
+
#endif
|
|
534
|
+
#ifdef _CompressPlugin_lzma
|
|
535
|
+
_try_rt_dec(lzmaDecompressPlugin);
|
|
536
|
+
#endif
|
|
537
|
+
#ifdef _CompressPlugin_lzma2
|
|
538
|
+
_try_rt_dec(lzma2DecompressPlugin);
|
|
539
|
+
#endif
|
|
540
|
+
#if (defined(_CompressPlugin_lz4) || (defined(_CompressPlugin_lz4hc)))
|
|
541
|
+
_try_rt_dec(lz4DecompressPlugin);
|
|
542
|
+
#endif
|
|
543
|
+
#ifdef _CompressPlugin_zstd
|
|
544
|
+
_try_rt_dec(zstdDecompressPlugin);
|
|
545
|
+
#endif
|
|
546
|
+
#ifdef _CompressPlugin_brotli
|
|
547
|
+
_try_rt_dec(brotliDecompressPlugin);
|
|
548
|
+
#endif
|
|
549
|
+
#ifdef _CompressPlugin_lzham
|
|
550
|
+
_try_rt_dec(lzhamDecompressPlugin);
|
|
551
|
+
#endif
|
|
552
|
+
#ifdef _CompressPlugin_tuz
|
|
553
|
+
_try_rt_dec(tuzDecompressPlugin);
|
|
554
|
+
#endif
|
|
555
|
+
return 0;
|
|
556
|
+
}
|
|
557
|
+
static hpatch_BOOL findDecompress(hpatch_TDecompress* out_decompressPlugin,const char* compressType){
|
|
558
|
+
memset(out_decompressPlugin,0,sizeof(hpatch_TDecompress));
|
|
559
|
+
if (strlen(compressType)==0) return hpatch_TRUE;
|
|
560
|
+
hpatch_TDecompress* decompressPlugin=__find_decompressPlugin(compressType);
|
|
561
|
+
if (decompressPlugin==0) return hpatch_FALSE;
|
|
562
|
+
*out_decompressPlugin=*decompressPlugin;
|
|
563
|
+
return hpatch_TRUE;
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
#if (_IS_NEED_DIR_DIFF_PATCH)
|
|
567
|
+
static inline hpatch_BOOL _trySetChecksum(hpatch_TChecksum** out_checksumPlugin,const char* checksumType,
|
|
568
|
+
hpatch_TChecksum* testChecksumPlugin){
|
|
569
|
+
assert(0==*out_checksumPlugin);
|
|
570
|
+
if (0!=strcmp(checksumType,testChecksumPlugin->checksumType())) return hpatch_FALSE;
|
|
571
|
+
*out_checksumPlugin=testChecksumPlugin;
|
|
572
|
+
return hpatch_TRUE;
|
|
573
|
+
}
|
|
574
|
+
#define __setChecksum(_checksumPlugin) \
|
|
575
|
+
if (_trySetChecksum(out_checksumPlugin,checksumType,_checksumPlugin)) return hpatch_TRUE;
|
|
576
|
+
|
|
577
|
+
static hpatch_BOOL findChecksum(hpatch_TChecksum** out_checksumPlugin,const char* checksumType){
|
|
578
|
+
*out_checksumPlugin=0;
|
|
579
|
+
if (strlen(checksumType)==0) return hpatch_TRUE;
|
|
580
|
+
#ifdef _ChecksumPlugin_fadler64
|
|
581
|
+
__setChecksum(&fadler64ChecksumPlugin);
|
|
582
|
+
#endif
|
|
583
|
+
#ifdef _ChecksumPlugin_xxh128
|
|
584
|
+
__setChecksum(&xxh128ChecksumPlugin);
|
|
585
|
+
#endif
|
|
586
|
+
#ifdef _ChecksumPlugin_xxh3
|
|
587
|
+
__setChecksum(&xxh3ChecksumPlugin);
|
|
588
|
+
#endif
|
|
589
|
+
#ifdef _ChecksumPlugin_md5
|
|
590
|
+
__setChecksum(&md5ChecksumPlugin);
|
|
591
|
+
#endif
|
|
592
|
+
#ifdef _ChecksumPlugin_crc32
|
|
593
|
+
__setChecksum(&crc32ChecksumPlugin);
|
|
594
|
+
#endif
|
|
595
|
+
#ifdef _ChecksumPlugin_adler32
|
|
596
|
+
__setChecksum(&adler32ChecksumPlugin);
|
|
597
|
+
#endif
|
|
598
|
+
#ifdef _ChecksumPlugin_adler64
|
|
599
|
+
__setChecksum(&adler64ChecksumPlugin);
|
|
600
|
+
#endif
|
|
601
|
+
#ifdef _ChecksumPlugin_fadler32
|
|
602
|
+
__setChecksum(&fadler32ChecksumPlugin);
|
|
603
|
+
#endif
|
|
604
|
+
#ifdef _ChecksumPlugin_fadler128
|
|
605
|
+
__setChecksum(&fadler128ChecksumPlugin);
|
|
606
|
+
#endif
|
|
607
|
+
#ifdef _ChecksumPlugin_blake3
|
|
608
|
+
__setChecksum(&blake3ChecksumPlugin);
|
|
609
|
+
#endif
|
|
610
|
+
return hpatch_FALSE;
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
static hpatch_BOOL _getOptChecksum(hpatch_TChecksum** out_checksumPlugin,
|
|
614
|
+
const char* checksumType,const char* kNoChecksum){
|
|
615
|
+
assert(0==*out_checksumPlugin);
|
|
616
|
+
if (0==strcmp(checksumType,kNoChecksum))
|
|
617
|
+
return hpatch_TRUE;
|
|
618
|
+
else
|
|
619
|
+
return findChecksum(out_checksumPlugin,checksumType);
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
#endif //_IS_NEED_DIR_DIFF_PATCH
|
|
623
|
+
|
|
624
|
+
|
|
625
|
+
static bool _tryGetCompressSet(const char** isMatchedType,const char* ptype,const char* ptypeEnd,
|
|
626
|
+
const char* cmpType,const char* cmpType2=0,
|
|
627
|
+
size_t* compressLevel=0,size_t levelMin=0,size_t levelMax=0,size_t levelDefault=0,
|
|
628
|
+
size_t* dictSize=0,size_t dictSizeMin=0,size_t dictSizeMax=0,size_t dictSizeDefault=0){
|
|
629
|
+
assert (0==(*isMatchedType));
|
|
630
|
+
const size_t ctypeLen=strlen(cmpType);
|
|
631
|
+
const size_t ctype2Len=(cmpType2!=0)?strlen(cmpType2):0;
|
|
632
|
+
if ( ((ctypeLen==(size_t)(ptypeEnd-ptype))&&(0==strncmp(ptype,cmpType,ctypeLen)))
|
|
633
|
+
|| ((cmpType2!=0)&&(ctype2Len==(size_t)(ptypeEnd-ptype))&&(0==strncmp(ptype,cmpType2,ctype2Len))) )
|
|
634
|
+
*isMatchedType=cmpType; //ok
|
|
635
|
+
else
|
|
636
|
+
return true;//type mismatch
|
|
637
|
+
|
|
638
|
+
if ((compressLevel)&&(ptypeEnd[0]=='-')){
|
|
639
|
+
const char* plevel=ptypeEnd+1;
|
|
640
|
+
const char* plevelEnd=findUntilEnd(plevel,'-');
|
|
641
|
+
if (!kmg_to_size(plevel,plevelEnd-plevel,compressLevel)) return false; //error
|
|
642
|
+
if (*compressLevel<levelMin) *compressLevel=levelMin;
|
|
643
|
+
else if (*compressLevel>levelMax) *compressLevel=levelMax;
|
|
644
|
+
if ((dictSize)&&(plevelEnd[0]=='-')){
|
|
645
|
+
const char* pdictSize=plevelEnd+1;
|
|
646
|
+
const char* pdictSizeEnd=findUntilEnd(pdictSize,'-');
|
|
647
|
+
if (!kmg_to_size(pdictSize,pdictSizeEnd-pdictSize,dictSize)) return false; //error
|
|
648
|
+
if (*dictSize<dictSizeMin) *dictSize=dictSizeMin;
|
|
649
|
+
else if (*dictSize>dictSizeMax) *dictSize=dictSizeMax;
|
|
650
|
+
}else{
|
|
651
|
+
if (plevelEnd[0]!='\0') return false; //error
|
|
652
|
+
if (dictSize) *dictSize=(dictSizeDefault<dictSizeMax)?dictSizeDefault:dictSizeMax;
|
|
653
|
+
}
|
|
654
|
+
}else{
|
|
655
|
+
if (ptypeEnd[0]!='\0') return false; //error
|
|
656
|
+
if (compressLevel) *compressLevel=levelDefault;
|
|
657
|
+
if (dictSize) *dictSize=dictSizeDefault;
|
|
658
|
+
}
|
|
659
|
+
return true;
|
|
660
|
+
}
|
|
661
|
+
|
|
662
|
+
#define _options_check(value,errorInfo){ \
|
|
663
|
+
if (!(value)) { LOG_ERR("options " errorInfo " ERROR!\n\n"); printHelpInfo(); return HDIFF_OPTIONS_ERROR; } }
|
|
664
|
+
|
|
665
|
+
#define __getCompressSet(_tryGet_code,_errTag) \
|
|
666
|
+
if (isMatchedType==0){ \
|
|
667
|
+
_options_check(_tryGet_code,_errTag); \
|
|
668
|
+
if (isMatchedType)
|
|
669
|
+
|
|
670
|
+
static int _checkSetCompress(hdiff_TCompress** out_compressPlugin,
|
|
671
|
+
const char* ptype,const char* ptypeEnd){
|
|
672
|
+
const char* isMatchedType=0;
|
|
673
|
+
size_t compressLevel=0;
|
|
674
|
+
#if (defined _CompressPlugin_lzma)||(defined _CompressPlugin_lzma2)||(defined _CompressPlugin_tuz)
|
|
675
|
+
size_t dictSize=0;
|
|
676
|
+
const size_t defaultDictSize=(1<<20)*8; //8m
|
|
677
|
+
#endif
|
|
678
|
+
#if (defined _CompressPlugin_zlib)||(defined _CompressPlugin_ldef)||(defined _CompressPlugin_zstd) \
|
|
679
|
+
||(defined _CompressPlugin_brotli)||(defined _CompressPlugin_lzham)
|
|
680
|
+
size_t dictBits=0;
|
|
681
|
+
const size_t defaultDictBits=20+3; //8m
|
|
682
|
+
const size_t defaultDictBits_zlib=15; //32k
|
|
683
|
+
#endif
|
|
684
|
+
#ifdef _CompressPlugin_zlib
|
|
685
|
+
__getCompressSet(_tryGetCompressSet(&isMatchedType,ptype,ptypeEnd,"zlib","pzlib",
|
|
686
|
+
&compressLevel,1,9,9, &dictBits,9,15,defaultDictBits_zlib),"-c-zlib-?"){
|
|
687
|
+
# if (!_IS_USED_MULTITHREAD)
|
|
688
|
+
static TCompressPlugin_zlib _zlibCompressPlugin=zlibCompressPlugin;
|
|
689
|
+
_zlibCompressPlugin.compress_level=(int)compressLevel;
|
|
690
|
+
_zlibCompressPlugin.windowBits=(signed char)(-dictBits);
|
|
691
|
+
*out_compressPlugin=&_zlibCompressPlugin.base; }}
|
|
692
|
+
# else
|
|
693
|
+
static TCompressPlugin_pzlib _pzlibCompressPlugin=pzlibCompressPlugin;
|
|
694
|
+
_pzlibCompressPlugin.base.compress_level=(int)compressLevel;
|
|
695
|
+
_pzlibCompressPlugin.base.windowBits=(signed char)(-(int)dictBits);
|
|
696
|
+
*out_compressPlugin=&_pzlibCompressPlugin.base.base; }}
|
|
697
|
+
# endif // _IS_USED_MULTITHREAD
|
|
698
|
+
#endif
|
|
699
|
+
#ifdef _CompressPlugin_ldef
|
|
700
|
+
__getCompressSet(_tryGetCompressSet(&isMatchedType,ptype,ptypeEnd,"ldef","pldef",
|
|
701
|
+
&compressLevel,1,12,12, &dictBits,15,15,defaultDictBits_zlib),"-c-ldef-?"){
|
|
702
|
+
# if (!_IS_USED_MULTITHREAD)
|
|
703
|
+
static TCompressPlugin_ldef _ldefCompressPlugin=ldefCompressPlugin;
|
|
704
|
+
_ldefCompressPlugin.compress_level=(int)compressLevel;
|
|
705
|
+
*out_compressPlugin=&_ldefCompressPlugin.base; }}
|
|
706
|
+
# else
|
|
707
|
+
static TCompressPlugin_pldef _pldefCompressPlugin=pldefCompressPlugin;
|
|
708
|
+
_pldefCompressPlugin.base.compress_level=(int)compressLevel;
|
|
709
|
+
*out_compressPlugin=&_pldefCompressPlugin.base.base; }}
|
|
710
|
+
# endif // _IS_USED_MULTITHREAD
|
|
711
|
+
#endif
|
|
712
|
+
#ifdef _CompressPlugin_bz2
|
|
713
|
+
__getCompressSet(_tryGetCompressSet(&isMatchedType,ptype,ptypeEnd,"bzip2","bz2",
|
|
714
|
+
&compressLevel,1,9,9),"-c-bzip2-?"){
|
|
715
|
+
static TCompressPlugin_bz2 _bz2CompressPlugin=bz2CompressPlugin;
|
|
716
|
+
_bz2CompressPlugin.compress_level=(int)compressLevel;
|
|
717
|
+
*out_compressPlugin=&_bz2CompressPlugin.base; }}
|
|
718
|
+
# if (_IS_USED_MULTITHREAD)
|
|
719
|
+
//pbzip2
|
|
720
|
+
__getCompressSet(_tryGetCompressSet(&isMatchedType,ptype,ptypeEnd,"pbzip2","pbz2",
|
|
721
|
+
&compressLevel,1,9,8),"-c-pbzip2-?"){
|
|
722
|
+
static TCompressPlugin_pbz2 _pbz2CompressPlugin=pbz2CompressPlugin;
|
|
723
|
+
_pbz2CompressPlugin.base.compress_level=(int)compressLevel;
|
|
724
|
+
*out_compressPlugin=&_pbz2CompressPlugin.base.base; }}
|
|
725
|
+
# endif // _IS_USED_MULTITHREAD
|
|
726
|
+
#endif
|
|
727
|
+
#ifdef _CompressPlugin_lzma
|
|
728
|
+
__getCompressSet(_tryGetCompressSet(&isMatchedType,ptype,ptypeEnd,"lzma",0,
|
|
729
|
+
&compressLevel,0,9,7, &dictSize,1<<12,
|
|
730
|
+
(sizeof(size_t)<=4)?(1<<27):((size_t)3<<29),defaultDictSize),"-c-lzma-?"){
|
|
731
|
+
static TCompressPlugin_lzma _lzmaCompressPlugin=lzmaCompressPlugin;
|
|
732
|
+
_lzmaCompressPlugin.compress_level=(int)compressLevel;
|
|
733
|
+
_lzmaCompressPlugin.dict_size=(UInt32)dictSize;
|
|
734
|
+
*out_compressPlugin=&_lzmaCompressPlugin.base; }}
|
|
735
|
+
#endif
|
|
736
|
+
#ifdef _CompressPlugin_lzma2
|
|
737
|
+
__getCompressSet(_tryGetCompressSet(&isMatchedType,ptype,ptypeEnd,"lzma2",0,
|
|
738
|
+
&compressLevel,0,9,7, &dictSize,1<<12,
|
|
739
|
+
(sizeof(size_t)<=4)?(1<<27):((size_t)3<<29),defaultDictSize),"-c-lzma2-?"){
|
|
740
|
+
static TCompressPlugin_lzma2 _lzma2CompressPlugin=lzma2CompressPlugin;
|
|
741
|
+
_lzma2CompressPlugin.compress_level=(int)compressLevel;
|
|
742
|
+
_lzma2CompressPlugin.dict_size=(UInt32)dictSize;
|
|
743
|
+
*out_compressPlugin=&_lzma2CompressPlugin.base; }}
|
|
744
|
+
#endif
|
|
745
|
+
#ifdef _CompressPlugin_lz4
|
|
746
|
+
__getCompressSet(_tryGetCompressSet(&isMatchedType,ptype,ptypeEnd,"lz4",0,
|
|
747
|
+
&compressLevel,1,50,50),"-c-lz4-?"){
|
|
748
|
+
static TCompressPlugin_lz4 _lz4CompressPlugin=lz4CompressPlugin;
|
|
749
|
+
_lz4CompressPlugin.compress_level=(int)compressLevel;
|
|
750
|
+
*out_compressPlugin=&_lz4CompressPlugin.base; }}
|
|
751
|
+
#endif
|
|
752
|
+
#ifdef _CompressPlugin_lz4hc
|
|
753
|
+
__getCompressSet(_tryGetCompressSet(&isMatchedType,ptype,ptypeEnd,"lz4hc",0,
|
|
754
|
+
&compressLevel,3,12,11),"-c-lz4hc-?"){
|
|
755
|
+
static TCompressPlugin_lz4hc _lz4hcCompressPlugin=lz4hcCompressPlugin;
|
|
756
|
+
_lz4hcCompressPlugin.compress_level=(int)compressLevel;
|
|
757
|
+
*out_compressPlugin=&_lz4hcCompressPlugin.base; }}
|
|
758
|
+
#endif
|
|
759
|
+
#ifdef _CompressPlugin_zstd
|
|
760
|
+
__getCompressSet(_tryGetCompressSet(&isMatchedType,ptype,ptypeEnd,"zstd",0,
|
|
761
|
+
&compressLevel,0,22,20, &dictBits,10,
|
|
762
|
+
_ZSTD_WINDOWLOG_MAX,defaultDictBits),"-c-zstd-?"){
|
|
763
|
+
static TCompressPlugin_zstd _zstdCompressPlugin=zstdCompressPlugin;
|
|
764
|
+
_zstdCompressPlugin.compress_level=(int)compressLevel;
|
|
765
|
+
_zstdCompressPlugin.dict_bits = (int)dictBits;
|
|
766
|
+
*out_compressPlugin=&_zstdCompressPlugin.base; }}
|
|
767
|
+
#endif
|
|
768
|
+
#ifdef _CompressPlugin_brotli
|
|
769
|
+
__getCompressSet(_tryGetCompressSet(&isMatchedType,ptype,ptypeEnd,"brotli",0,
|
|
770
|
+
&compressLevel,0,11,9, &dictBits,10,
|
|
771
|
+
30,defaultDictBits),"-c-brotli-?"){
|
|
772
|
+
static TCompressPlugin_brotli _brotliCompressPlugin=brotliCompressPlugin;
|
|
773
|
+
_brotliCompressPlugin.compress_level=(int)compressLevel;
|
|
774
|
+
_brotliCompressPlugin.dict_bits = (int)dictBits;
|
|
775
|
+
*out_compressPlugin=&_brotliCompressPlugin.base; }}
|
|
776
|
+
#endif
|
|
777
|
+
#ifdef _CompressPlugin_lzham
|
|
778
|
+
__getCompressSet(_tryGetCompressSet(&isMatchedType,ptype,ptypeEnd,"lzham",0,
|
|
779
|
+
&compressLevel,0,5,4, &dictBits,15,
|
|
780
|
+
(sizeof(size_t)<=4)?26:29,defaultDictBits),"-c-lzham-?"){
|
|
781
|
+
static TCompressPlugin_lzham _lzhamCompressPlugin=lzhamCompressPlugin;
|
|
782
|
+
_lzhamCompressPlugin.compress_level=(int)compressLevel;
|
|
783
|
+
_lzhamCompressPlugin.dict_bits = (int)dictBits;
|
|
784
|
+
*out_compressPlugin=&_lzhamCompressPlugin.base; }}
|
|
785
|
+
#endif
|
|
786
|
+
#ifdef _CompressPlugin_tuz
|
|
787
|
+
__getCompressSet(_tryGetCompressSet(&isMatchedType,
|
|
788
|
+
ptype,ptypeEnd,"tuz","tinyuz",
|
|
789
|
+
&dictSize,1,tuz_kMaxOfDictSize,defaultDictSize),"-c-tuz-?"){
|
|
790
|
+
static TCompressPlugin_tuz _tuzCompressPlugin=tuzCompressPlugin;
|
|
791
|
+
_tuzCompressPlugin.props.dictSize=(tuz_size_t)dictSize;
|
|
792
|
+
*out_compressPlugin=&_tuzCompressPlugin.base; }}
|
|
793
|
+
#endif
|
|
794
|
+
|
|
795
|
+
_options_check((*out_compressPlugin!=0),"-c-?");
|
|
796
|
+
return HDIFF_SUCCESS;
|
|
797
|
+
}
|
|
798
|
+
|
|
799
|
+
#define _return_check(value,exitCode,errorInfo){ \
|
|
800
|
+
if (!(value)) { LOG_ERR(errorInfo " ERROR!\n"); return exitCode; } }
|
|
801
|
+
|
|
802
|
+
#define _kNULL_VALUE ((hpatch_BOOL)(-1))
|
|
803
|
+
#define _kNULL_SIZE (~(size_t)0)
|
|
804
|
+
|
|
805
|
+
#define _THREAD_NUMBER_NULL _kNULL_SIZE
|
|
806
|
+
#define _THREAD_NUMBER_DEFUALT kDefaultCompressThreadNumber
|
|
807
|
+
#define _THREAD_NUMBER_MAX (1<<8)
|
|
808
|
+
|
|
809
|
+
int hdiff_cmd_line(int argc, const char * argv[]){
|
|
810
|
+
TDiffSets diffSets;
|
|
811
|
+
memset(&diffSets,0,sizeof(diffSets));
|
|
812
|
+
#if (_IS_NEED_BSDIFF)
|
|
813
|
+
diffSets.isBsDiff = _kNULL_VALUE;
|
|
814
|
+
#endif
|
|
815
|
+
#if (_IS_NEED_VCDIFF)
|
|
816
|
+
diffSets.isVcDiff = _kNULL_VALUE;
|
|
817
|
+
#endif
|
|
818
|
+
diffSets.isDoDiff =_kNULL_VALUE;
|
|
819
|
+
diffSets.isDoPatchCheck=_kNULL_VALUE;
|
|
820
|
+
diffSets.isDiffInMem =_kNULL_VALUE;
|
|
821
|
+
diffSets.isSingleCompressedDiff =_kNULL_VALUE;
|
|
822
|
+
diffSets.isUseBigCacheMatch =_kNULL_VALUE;
|
|
823
|
+
diffSets.isCheckNotEqual =_kNULL_VALUE;
|
|
824
|
+
diffSets.matchBlockSize=_kNULL_SIZE;
|
|
825
|
+
diffSets.threadNum=_THREAD_NUMBER_NULL;
|
|
826
|
+
diffSets.threadNumSearch_s=_THREAD_NUMBER_NULL;
|
|
827
|
+
hpatch_BOOL isPrintFileInfo=_kNULL_VALUE;
|
|
828
|
+
hpatch_BOOL isForceOverwrite=_kNULL_VALUE;
|
|
829
|
+
hpatch_BOOL isOutputHelp=_kNULL_VALUE;
|
|
830
|
+
hpatch_BOOL isOutputVersion=_kNULL_VALUE;
|
|
831
|
+
hpatch_BOOL isOldPathInputEmpty=_kNULL_VALUE;
|
|
832
|
+
hdiff_TCompress* compressPlugin=0;
|
|
833
|
+
#if (_IS_NEED_DIR_DIFF_PATCH)
|
|
834
|
+
hpatch_BOOL isForceRunDirDiff=_kNULL_VALUE;
|
|
835
|
+
size_t kMaxOpenFileNumber=_kNULL_SIZE; //only used in dir diff by stream
|
|
836
|
+
hpatch_BOOL isSetChecksum=_kNULL_VALUE;
|
|
837
|
+
hpatch_TChecksum* checksumPlugin=0;
|
|
838
|
+
std::string manifestOut;
|
|
839
|
+
std::string manifestOld;
|
|
840
|
+
std::string manifestNew;
|
|
841
|
+
std::vector<std::string> ignorePathList;
|
|
842
|
+
std::vector<std::string> ignoreOldPathList;
|
|
843
|
+
std::vector<std::string> ignoreNewPathList;
|
|
844
|
+
#endif
|
|
845
|
+
std::vector<const char *> arg_values;
|
|
846
|
+
if (argc<=1){
|
|
847
|
+
printUsage();
|
|
848
|
+
return HDIFF_OPTIONS_ERROR;
|
|
849
|
+
}
|
|
850
|
+
for (int i=1; i<argc; ++i) {
|
|
851
|
+
const char* op=argv[i];
|
|
852
|
+
_options_check(op!=0,"?");
|
|
853
|
+
if (op[0]!='-'){
|
|
854
|
+
hpatch_BOOL isEmpty=(strlen(op)==0);
|
|
855
|
+
if (isEmpty){
|
|
856
|
+
if (isOldPathInputEmpty==_kNULL_VALUE)
|
|
857
|
+
isOldPathInputEmpty=hpatch_TRUE;
|
|
858
|
+
else
|
|
859
|
+
_options_check(!isEmpty,"?"); //error return
|
|
860
|
+
}else{
|
|
861
|
+
if (isOldPathInputEmpty==_kNULL_VALUE)
|
|
862
|
+
isOldPathInputEmpty=hpatch_FALSE;
|
|
863
|
+
}
|
|
864
|
+
arg_values.push_back(op); //path:file or directory
|
|
865
|
+
continue;
|
|
866
|
+
}
|
|
867
|
+
switch (op[1]) {
|
|
868
|
+
case 'm':{ //diff in memory
|
|
869
|
+
_options_check((diffSets.isDiffInMem==_kNULL_VALUE)&&((op[2]=='\0')||(op[2]=='-')),"-m");
|
|
870
|
+
diffSets.isDiffInMem=hpatch_TRUE;
|
|
871
|
+
if (op[2]=='-'){
|
|
872
|
+
const char* pnum=op+3;
|
|
873
|
+
_options_check(kmg_to_size(pnum,strlen(pnum),&diffSets.matchScore),"-m-?");
|
|
874
|
+
_options_check((0<=(int)diffSets.matchScore)&&(diffSets.matchScore==(size_t)(int)diffSets.matchScore),"-m-?");
|
|
875
|
+
}else{
|
|
876
|
+
diffSets.matchScore=kMinSingleMatchScore_default;
|
|
877
|
+
}
|
|
878
|
+
} break;
|
|
879
|
+
case 's':{
|
|
880
|
+
_options_check((diffSets.isDiffInMem==_kNULL_VALUE)&&((op[2]=='\0')||(op[2]=='-')),"-s");
|
|
881
|
+
_options_check((diffSets.matchBlockSize==_kNULL_SIZE),"-block must run with -m");
|
|
882
|
+
diffSets.isDiffInMem=hpatch_FALSE; //diff by stream
|
|
883
|
+
if (op[2]=='-'){
|
|
884
|
+
const char* pnum=op+3;
|
|
885
|
+
_options_check(kmg_to_size(pnum,strlen(pnum),&diffSets.matchBlockSize),"-s-?");
|
|
886
|
+
_options_check((kMatchBlockSize_min<=diffSets.matchBlockSize)
|
|
887
|
+
&&(diffSets.matchBlockSize!=_kNULL_SIZE),"-s-?");
|
|
888
|
+
}else{
|
|
889
|
+
diffSets.matchBlockSize=kMatchBlockSize_default;
|
|
890
|
+
}
|
|
891
|
+
} break;
|
|
892
|
+
case 'S':{
|
|
893
|
+
_options_check((diffSets.isSingleCompressedDiff==_kNULL_VALUE)
|
|
894
|
+
&&(op[2]=='D')&&((op[3]=='\0')||(op[3]=='-')),"-SD");
|
|
895
|
+
diffSets.isSingleCompressedDiff=hpatch_TRUE;
|
|
896
|
+
if (op[3]=='-'){
|
|
897
|
+
const char* pnum=op+4;
|
|
898
|
+
_options_check(kmg_to_size(pnum,strlen(pnum),&diffSets.patchStepMemSize),"-SD-?");
|
|
899
|
+
_options_check((diffSets.patchStepMemSize>=hpatch_kStreamCacheSize),"-SD-?");
|
|
900
|
+
}else{
|
|
901
|
+
diffSets.patchStepMemSize=kDefaultPatchStepMemSize;
|
|
902
|
+
}
|
|
903
|
+
} break;
|
|
904
|
+
#if (_IS_NEED_BSDIFF)
|
|
905
|
+
case 'B':{
|
|
906
|
+
_options_check((diffSets.isBsDiff==_kNULL_VALUE)
|
|
907
|
+
&&(op[2]=='S')&&(op[3]=='D')&&(op[4]=='\0'),"-BSD");
|
|
908
|
+
diffSets.isBsDiff=hpatch_TRUE;
|
|
909
|
+
} break;
|
|
910
|
+
#endif
|
|
911
|
+
#if (_IS_NEED_VCDIFF)
|
|
912
|
+
# ifdef _CompressPlugin_7zXZ
|
|
913
|
+
case 'V':{
|
|
914
|
+
_options_check((diffSets.isVcDiff==_kNULL_VALUE)&&(op[2]=='C')&&(op[3]=='D')
|
|
915
|
+
&&((op[4]=='\0')||(op[4]=='-')),"-VCD");
|
|
916
|
+
_options_check((compressPlugin==0),"-VCD compress support 7zXZ, unsupport -c-*");
|
|
917
|
+
if (op[4]=='-'){
|
|
918
|
+
size_t compressLevel;
|
|
919
|
+
size_t dictSize;
|
|
920
|
+
const char* isMatchedType=0;
|
|
921
|
+
_options_check(_tryGetCompressSet(&isMatchedType,op+1,op+4,"VCD",0,
|
|
922
|
+
&compressLevel,0,9,7, &dictSize,1<<12,
|
|
923
|
+
vcdiff_kMaxTargetWindowsSize,(1<<20)*8),"-VCD-?");
|
|
924
|
+
|
|
925
|
+
_init_CompressPlugin_7zXZ();
|
|
926
|
+
static TCompressPlugin_7zXZ xzCompressPlugin=_7zXZCompressPlugin;
|
|
927
|
+
xzCompressPlugin.compress_level=(int)compressLevel;
|
|
928
|
+
xzCompressPlugin.dict_size=(UInt32)dictSize;
|
|
929
|
+
compressPlugin=&xzCompressPlugin.base;
|
|
930
|
+
}
|
|
931
|
+
diffSets.isVcDiff=hpatch_TRUE;
|
|
932
|
+
} break;
|
|
933
|
+
# else
|
|
934
|
+
case 'V':{
|
|
935
|
+
_options_check((diffSets.isVcDiff==_kNULL_VALUE)&&(op[2]=='C')&&(op[3]=='D')
|
|
936
|
+
&&(op[4]=='\0'),"-VCD");
|
|
937
|
+
_options_check((compressPlugin==0),"-VCD unsupport -c-*");
|
|
938
|
+
diffSets.isVcDiff=hpatch_TRUE;
|
|
939
|
+
} break;
|
|
940
|
+
# endif
|
|
941
|
+
#endif
|
|
942
|
+
case 'i':{
|
|
943
|
+
_options_check((isPrintFileInfo==_kNULL_VALUE)&&(op[2]=='n')&&(op[3]=='f')
|
|
944
|
+
&&(op[4]=='o')&&(op[5]=='\0'),"-info");
|
|
945
|
+
isPrintFileInfo=hpatch_TRUE;
|
|
946
|
+
} break;
|
|
947
|
+
case '?':
|
|
948
|
+
case 'h':{
|
|
949
|
+
_options_check((isOutputHelp==_kNULL_VALUE)&&(op[2]=='\0'),"-h");
|
|
950
|
+
isOutputHelp=hpatch_TRUE;
|
|
951
|
+
} break;
|
|
952
|
+
case 'v':{
|
|
953
|
+
_options_check((isOutputVersion==_kNULL_VALUE)&&(op[2]=='\0'),"-v");
|
|
954
|
+
isOutputVersion=hpatch_TRUE;
|
|
955
|
+
} break;
|
|
956
|
+
case 't':{
|
|
957
|
+
_options_check((diffSets.isDoDiff==_kNULL_VALUE)&&(diffSets.isDoPatchCheck==_kNULL_VALUE)&&(op[2]=='\0'),"-t -d?");
|
|
958
|
+
diffSets.isDoDiff=hpatch_FALSE;
|
|
959
|
+
diffSets.isDoPatchCheck=hpatch_TRUE; //only test diffFile
|
|
960
|
+
} break;
|
|
961
|
+
case 'd':{
|
|
962
|
+
_options_check((diffSets.isDoDiff==_kNULL_VALUE)&&(diffSets.isDoPatchCheck==_kNULL_VALUE)&&(op[2]=='\0'),"-t -d?");
|
|
963
|
+
diffSets.isDoDiff=hpatch_TRUE; //only diff
|
|
964
|
+
diffSets.isDoPatchCheck=hpatch_FALSE;
|
|
965
|
+
} break;
|
|
966
|
+
case 'f':{
|
|
967
|
+
_options_check((isForceOverwrite==_kNULL_VALUE)&&(op[2]=='\0'),"-f");
|
|
968
|
+
isForceOverwrite=hpatch_TRUE;
|
|
969
|
+
} break;
|
|
970
|
+
#if (_IS_USED_MULTITHREAD)
|
|
971
|
+
case 'p':{
|
|
972
|
+
_options_check((op[2]=='-'),"-p?");
|
|
973
|
+
if ((op[3]=='s')){
|
|
974
|
+
_options_check((diffSets.threadNumSearch_s==_THREAD_NUMBER_NULL)&&
|
|
975
|
+
(op[4]=='e')&&(op[5]=='a')&&(op[6]=='r')&&(op[7]=='c')&&(op[8]=='h')&&(op[9]=='-'),"-p-search?");
|
|
976
|
+
const char* pnum=op+10;
|
|
977
|
+
_options_check(a_to_size(pnum,strlen(pnum),&diffSets.threadNumSearch_s),"-p-search-?");
|
|
978
|
+
}else{
|
|
979
|
+
_options_check(diffSets.threadNum==_THREAD_NUMBER_NULL,"-p-?");
|
|
980
|
+
const char* pnum=op+3;
|
|
981
|
+
_options_check(a_to_size(pnum,strlen(pnum),&diffSets.threadNum),"-p-?");
|
|
982
|
+
}
|
|
983
|
+
} break;
|
|
984
|
+
#endif
|
|
985
|
+
case 'b':{
|
|
986
|
+
_options_check((diffSets.matchBlockSize==_kNULL_SIZE)&&
|
|
987
|
+
(op[2]=='l')&&(op[3]=='o')&&(op[4]=='c')&&(op[5]=='k')&&
|
|
988
|
+
((op[6]=='\0')||(op[6]=='-')),"-block?");
|
|
989
|
+
if (op[6]=='-'){
|
|
990
|
+
const char* pnum=op+7;
|
|
991
|
+
_options_check(kmg_to_size(pnum,strlen(pnum),&diffSets.matchBlockSize),"-block-?");
|
|
992
|
+
if (diffSets.matchBlockSize!=0)
|
|
993
|
+
_options_check((kMatchBlockSize_min<=diffSets.matchBlockSize)
|
|
994
|
+
&&(diffSets.matchBlockSize!=_kNULL_SIZE),"-block-?");
|
|
995
|
+
}else{
|
|
996
|
+
diffSets.matchBlockSize=kDefaultFastMatchBlockSize;
|
|
997
|
+
}
|
|
998
|
+
} break;
|
|
999
|
+
case 'c':{
|
|
1000
|
+
if (op[2]=='-'){
|
|
1001
|
+
_options_check((compressPlugin==0),"-c-");
|
|
1002
|
+
const char* ptype=op+3;
|
|
1003
|
+
const char* ptypeEnd=findUntilEnd(ptype,'-');
|
|
1004
|
+
int result=_checkSetCompress(&compressPlugin,ptype,ptypeEnd);
|
|
1005
|
+
if (HDIFF_SUCCESS!=result)
|
|
1006
|
+
return result;
|
|
1007
|
+
}else if (op[2]=='a'){
|
|
1008
|
+
_options_check((diffSets.isUseBigCacheMatch==_kNULL_VALUE)&&
|
|
1009
|
+
(op[3]=='c')&&(op[4]=='h')&&(op[5]=='e')&&(op[6]=='\0'),"-cache?");
|
|
1010
|
+
diffSets.isUseBigCacheMatch=hpatch_TRUE; //use big cache for match
|
|
1011
|
+
}else{
|
|
1012
|
+
_options_check(false,"-c?");
|
|
1013
|
+
}
|
|
1014
|
+
} break;
|
|
1015
|
+
#if (_IS_NEED_DIR_DIFF_PATCH)
|
|
1016
|
+
case 'C':{
|
|
1017
|
+
_options_check((isSetChecksum==_kNULL_VALUE)&&(checksumPlugin==0)&&(op[2]=='-'),"-C");
|
|
1018
|
+
const char* ptype=op+3;
|
|
1019
|
+
isSetChecksum=hpatch_TRUE;
|
|
1020
|
+
_options_check(_getOptChecksum(&checksumPlugin,ptype,"no"),"-C-?");
|
|
1021
|
+
} break;
|
|
1022
|
+
case 'g':{
|
|
1023
|
+
if (op[2]=='#'){ //-g#
|
|
1024
|
+
const char* plist=op+3;
|
|
1025
|
+
_options_check(_getIgnorePathSetList(ignorePathList,plist),"-g#?");
|
|
1026
|
+
}else if (op[2]=='-'){
|
|
1027
|
+
const char* plist=op+7;
|
|
1028
|
+
if ((op[3]=='o')&&(op[4]=='l')&&(op[5]=='d')&&(op[6]=='#')){
|
|
1029
|
+
_options_check(_getIgnorePathSetList(ignoreOldPathList,plist),"-g-old#?");
|
|
1030
|
+
}else if ((op[3]=='n')&&(op[4]=='e')&&(op[5]=='w')&&(op[6]=='#')){
|
|
1031
|
+
_options_check(_getIgnorePathSetList(ignoreNewPathList,plist),"-g-new#?");
|
|
1032
|
+
}else{
|
|
1033
|
+
_options_check(hpatch_FALSE,"-g-?");
|
|
1034
|
+
}
|
|
1035
|
+
}else{
|
|
1036
|
+
_options_check(hpatch_FALSE,"-g?");
|
|
1037
|
+
}
|
|
1038
|
+
} break;
|
|
1039
|
+
case 'M':{
|
|
1040
|
+
if (op[2]=='#'){ //-M#
|
|
1041
|
+
const char* plist=op+3;
|
|
1042
|
+
_options_check(manifestOut.empty()&&manifestOld.empty()&&manifestNew.empty(),"-M#");
|
|
1043
|
+
manifestOut=plist;
|
|
1044
|
+
}else if (op[2]=='-'){
|
|
1045
|
+
const char* plist=op+7;
|
|
1046
|
+
if ((op[3]=='o')&&(op[4]=='l')&&(op[5]=='d')&&(op[6]=='#')){
|
|
1047
|
+
_options_check(manifestOut.empty()&&manifestOld.empty(),"-M-old#");
|
|
1048
|
+
manifestOld=plist;
|
|
1049
|
+
}else if ((op[3]=='n')&&(op[4]=='e')&&(op[5]=='w')&&(op[6]=='#')){
|
|
1050
|
+
_options_check(manifestOut.empty()&&manifestNew.empty(),"-M-new#");
|
|
1051
|
+
manifestNew=plist;
|
|
1052
|
+
}else{
|
|
1053
|
+
_options_check(hpatch_FALSE,"-M-?");
|
|
1054
|
+
}
|
|
1055
|
+
}else{
|
|
1056
|
+
_options_check(hpatch_FALSE,"-M?");
|
|
1057
|
+
}
|
|
1058
|
+
} break;
|
|
1059
|
+
case 'D':{
|
|
1060
|
+
_options_check((isForceRunDirDiff==_kNULL_VALUE)&&(op[2]=='\0'),"-D");
|
|
1061
|
+
isForceRunDirDiff=hpatch_TRUE; //force run DirDiff
|
|
1062
|
+
} break;
|
|
1063
|
+
#endif
|
|
1064
|
+
case 'n':{
|
|
1065
|
+
_options_check((op[2]!='\0'), "-n?");
|
|
1066
|
+
#if (_IS_NEED_DIR_DIFF_PATCH)
|
|
1067
|
+
if (op[2]=='-'){
|
|
1068
|
+
_options_check((kMaxOpenFileNumber == _kNULL_SIZE), "-n-")
|
|
1069
|
+
const char* pnum = op + 3;
|
|
1070
|
+
_options_check(kmg_to_size(pnum, strlen(pnum), &kMaxOpenFileNumber), "-n-?");
|
|
1071
|
+
_options_check((kMaxOpenFileNumber != _kNULL_SIZE), "-n-?");
|
|
1072
|
+
}else
|
|
1073
|
+
#endif
|
|
1074
|
+
{
|
|
1075
|
+
_options_check((diffSets.isCheckNotEqual==_kNULL_VALUE)&&(op[2]=='e')&&(op[3]=='q')&&(op[4]=='\0'),"-neq");
|
|
1076
|
+
diffSets.isCheckNotEqual=hpatch_TRUE;
|
|
1077
|
+
}
|
|
1078
|
+
} break;
|
|
1079
|
+
default: {
|
|
1080
|
+
_options_check(hpatch_FALSE,"-?");
|
|
1081
|
+
} break;
|
|
1082
|
+
}//switch
|
|
1083
|
+
}
|
|
1084
|
+
|
|
1085
|
+
if (isOutputHelp==_kNULL_VALUE)
|
|
1086
|
+
isOutputHelp=hpatch_FALSE;
|
|
1087
|
+
if (isOutputVersion==_kNULL_VALUE)
|
|
1088
|
+
isOutputVersion=hpatch_FALSE;
|
|
1089
|
+
if (isForceOverwrite==_kNULL_VALUE)
|
|
1090
|
+
isForceOverwrite=hpatch_FALSE;
|
|
1091
|
+
if (isPrintFileInfo==_kNULL_VALUE)
|
|
1092
|
+
isPrintFileInfo=hpatch_FALSE;
|
|
1093
|
+
if (isOutputHelp||isOutputVersion){
|
|
1094
|
+
if (isOutputHelp)
|
|
1095
|
+
printUsage();//with version
|
|
1096
|
+
else
|
|
1097
|
+
printVersion();
|
|
1098
|
+
if (arg_values.empty())
|
|
1099
|
+
return 0; //ok
|
|
1100
|
+
}
|
|
1101
|
+
if (isPrintFileInfo){
|
|
1102
|
+
return hpatch_printFilesInfos((int)arg_values.size(),arg_values.data());
|
|
1103
|
+
}
|
|
1104
|
+
if (diffSets.isCheckNotEqual==_kNULL_VALUE)
|
|
1105
|
+
diffSets.isCheckNotEqual=hpatch_FALSE;
|
|
1106
|
+
if (diffSets.isSingleCompressedDiff==_kNULL_VALUE)
|
|
1107
|
+
diffSets.isSingleCompressedDiff=hpatch_FALSE;
|
|
1108
|
+
#if (_IS_NEED_BSDIFF)
|
|
1109
|
+
if (diffSets.isBsDiff==_kNULL_VALUE)
|
|
1110
|
+
diffSets.isBsDiff=hpatch_FALSE;
|
|
1111
|
+
if (diffSets.isBsDiff){
|
|
1112
|
+
if (compressPlugin!=0){
|
|
1113
|
+
_options_check(0==strcmp(compressPlugin->compressType(),"bz2"),"bsdiff must run with -c-bz2");
|
|
1114
|
+
}else{
|
|
1115
|
+
static TCompressPlugin_bz2 _bz2CompressPlugin=bz2CompressPlugin;
|
|
1116
|
+
compressPlugin=&_bz2CompressPlugin.base;
|
|
1117
|
+
}
|
|
1118
|
+
}
|
|
1119
|
+
#endif
|
|
1120
|
+
#if (_IS_NEED_VCDIFF)
|
|
1121
|
+
if (diffSets.isVcDiff==_kNULL_VALUE)
|
|
1122
|
+
diffSets.isVcDiff=hpatch_FALSE;
|
|
1123
|
+
if (diffSets.isVcDiff){
|
|
1124
|
+
_options_check(!diffSets.isSingleCompressedDiff,"-SD -VCD can only set one");
|
|
1125
|
+
#if (_IS_NEED_BSDIFF)
|
|
1126
|
+
_options_check(!diffSets.isBsDiff,"-BSD -VCD can only set one");
|
|
1127
|
+
#endif
|
|
1128
|
+
}
|
|
1129
|
+
#endif
|
|
1130
|
+
#if (_IS_NEED_DIR_DIFF_PATCH)
|
|
1131
|
+
if (isSetChecksum==_kNULL_VALUE)
|
|
1132
|
+
isSetChecksum=hpatch_FALSE;
|
|
1133
|
+
if (kMaxOpenFileNumber==_kNULL_SIZE)
|
|
1134
|
+
kMaxOpenFileNumber=kMaxOpenFileNumber_default_diff;
|
|
1135
|
+
if (kMaxOpenFileNumber<kMaxOpenFileNumber_default_min)
|
|
1136
|
+
kMaxOpenFileNumber=kMaxOpenFileNumber_default_min;
|
|
1137
|
+
#endif
|
|
1138
|
+
if (diffSets.isDiffInMem&&(diffSets.matchBlockSize==_kNULL_SIZE))
|
|
1139
|
+
diffSets.matchBlockSize=kDefaultFastMatchBlockSize;
|
|
1140
|
+
if (diffSets.threadNum==_THREAD_NUMBER_NULL)
|
|
1141
|
+
diffSets.threadNum=_THREAD_NUMBER_DEFUALT;
|
|
1142
|
+
else if (diffSets.threadNum>_THREAD_NUMBER_MAX)
|
|
1143
|
+
diffSets.threadNum=_THREAD_NUMBER_MAX;
|
|
1144
|
+
else if (diffSets.threadNum<1)
|
|
1145
|
+
diffSets.threadNum=1;
|
|
1146
|
+
if (diffSets.threadNumSearch_s==_THREAD_NUMBER_NULL)
|
|
1147
|
+
diffSets.threadNumSearch_s=diffSets.threadNum;
|
|
1148
|
+
else if (diffSets.threadNumSearch_s>_THREAD_NUMBER_MAX)
|
|
1149
|
+
diffSets.threadNumSearch_s=_THREAD_NUMBER_MAX;
|
|
1150
|
+
else if (diffSets.threadNumSearch_s<1)
|
|
1151
|
+
diffSets.threadNumSearch_s=1;
|
|
1152
|
+
if (compressPlugin!=0){
|
|
1153
|
+
compressPlugin->setParallelThreadNumber(compressPlugin,(int)diffSets.threadNum);
|
|
1154
|
+
}
|
|
1155
|
+
|
|
1156
|
+
if (isOldPathInputEmpty==_kNULL_VALUE)
|
|
1157
|
+
isOldPathInputEmpty=hpatch_FALSE;
|
|
1158
|
+
_options_check((arg_values.size()==1)||(arg_values.size()==2)||(arg_values.size()==3),"input count");
|
|
1159
|
+
if (arg_values.size()==3){ //diff
|
|
1160
|
+
if (diffSets.isDiffInMem==_kNULL_VALUE){
|
|
1161
|
+
diffSets.isDiffInMem=hpatch_TRUE;
|
|
1162
|
+
diffSets.matchScore=kMinSingleMatchScore_default;
|
|
1163
|
+
}
|
|
1164
|
+
if (diffSets.isDoDiff==_kNULL_VALUE)
|
|
1165
|
+
diffSets.isDoDiff=hpatch_TRUE;
|
|
1166
|
+
if (diffSets.isDoPatchCheck==_kNULL_VALUE)
|
|
1167
|
+
diffSets.isDoPatchCheck=hpatch_TRUE;
|
|
1168
|
+
assert(diffSets.isDoDiff||diffSets.isDoPatchCheck);
|
|
1169
|
+
if (diffSets.isUseBigCacheMatch==_kNULL_VALUE)
|
|
1170
|
+
diffSets.isUseBigCacheMatch=hpatch_FALSE;
|
|
1171
|
+
if (diffSets.isDoDiff&&(!diffSets.isDiffInMem)){
|
|
1172
|
+
_options_check(!diffSets.isUseBigCacheMatch, "-cache must run with -m");
|
|
1173
|
+
}
|
|
1174
|
+
|
|
1175
|
+
#if (_IS_NEED_DIR_DIFF_PATCH)
|
|
1176
|
+
if (isForceRunDirDiff==_kNULL_VALUE)
|
|
1177
|
+
isForceRunDirDiff=hpatch_FALSE;
|
|
1178
|
+
if ((!manifestOld.empty())||(!manifestNew.empty())){
|
|
1179
|
+
isForceRunDirDiff=hpatch_TRUE;
|
|
1180
|
+
_options_check(manifestOut.empty()&&(!manifestNew.empty()),"-M?");
|
|
1181
|
+
if (isOldPathInputEmpty){
|
|
1182
|
+
_options_check(manifestOld.empty(),"-M?");
|
|
1183
|
+
}else{
|
|
1184
|
+
_options_check(!manifestOld.empty(),"-M?");
|
|
1185
|
+
}
|
|
1186
|
+
_options_check(ignorePathList.empty()&&ignoreOldPathList.empty()
|
|
1187
|
+
&&ignoreNewPathList.empty(),"-M can't run with -g");
|
|
1188
|
+
}
|
|
1189
|
+
#endif
|
|
1190
|
+
|
|
1191
|
+
const char* oldPath =arg_values[0];
|
|
1192
|
+
const char* newPath =arg_values[1];
|
|
1193
|
+
const char* outDiffFileName=arg_values[2];
|
|
1194
|
+
|
|
1195
|
+
_return_check(!hpatch_getIsSamePath(oldPath,outDiffFileName),
|
|
1196
|
+
HDIFF_PATHTYPE_ERROR,"oldPath outDiffFile same path");
|
|
1197
|
+
_return_check(!hpatch_getIsSamePath(newPath,outDiffFileName),
|
|
1198
|
+
HDIFF_PATHTYPE_ERROR,"newPath outDiffFile same path");
|
|
1199
|
+
if (!isForceOverwrite){
|
|
1200
|
+
hpatch_TPathType outDiffFileType;
|
|
1201
|
+
_return_check(hpatch_getPathStat(outDiffFileName,&outDiffFileType,0),
|
|
1202
|
+
HDIFF_PATHTYPE_ERROR,"get outDiffFile type");
|
|
1203
|
+
_return_check((outDiffFileType==kPathType_notExist)||(!diffSets.isDoDiff),
|
|
1204
|
+
HDIFF_PATHTYPE_ERROR,"diff outDiffFile already exists, overwrite");
|
|
1205
|
+
}
|
|
1206
|
+
hpatch_TPathType oldType;
|
|
1207
|
+
hpatch_TPathType newType;
|
|
1208
|
+
if (isOldPathInputEmpty){
|
|
1209
|
+
oldType=kPathType_file; //as empty file
|
|
1210
|
+
diffSets.isDiffInMem=hpatch_FALSE; //not need -m, set as -s
|
|
1211
|
+
diffSets.matchBlockSize=kDefaultFastMatchBlockSize; //not used
|
|
1212
|
+
diffSets.isUseBigCacheMatch=hpatch_FALSE;
|
|
1213
|
+
}else{
|
|
1214
|
+
_return_check(hpatch_getPathStat(oldPath,&oldType,0),HDIFF_PATHTYPE_ERROR,"get oldPath type");
|
|
1215
|
+
_return_check((oldType!=kPathType_notExist),HDIFF_PATHTYPE_ERROR,"oldPath not exist");
|
|
1216
|
+
}
|
|
1217
|
+
_return_check(hpatch_getPathStat(newPath,&newType,0),HDIFF_PATHTYPE_ERROR,"get newPath type");
|
|
1218
|
+
_return_check((newType!=kPathType_notExist),HDIFF_PATHTYPE_ERROR,"newPath not exist");
|
|
1219
|
+
#if (_IS_NEED_DIR_DIFF_PATCH)
|
|
1220
|
+
hpatch_BOOL isUseDirDiff=isForceRunDirDiff||(kPathType_dir==oldType)||(kPathType_dir==newType);
|
|
1221
|
+
if (!diffSets.isDoDiff){
|
|
1222
|
+
TDirDiffInfo dirinfo;
|
|
1223
|
+
_return_check(getDirDiffInfoByFile(&dirinfo,outDiffFileName,0,0),DIRDIFF_PATCH_ERROR,"get dir diff info");
|
|
1224
|
+
isUseDirDiff=dirinfo.isDirDiff;
|
|
1225
|
+
}
|
|
1226
|
+
if (isUseDirDiff){
|
|
1227
|
+
#ifdef _ChecksumPlugin_fadler64
|
|
1228
|
+
if (isSetChecksum==hpatch_FALSE)
|
|
1229
|
+
checksumPlugin=&fadler64ChecksumPlugin; //DEFAULT
|
|
1230
|
+
#else
|
|
1231
|
+
# ifdef _ChecksumPlugin_crc32
|
|
1232
|
+
if (isSetChecksum==hpatch_FALSE)
|
|
1233
|
+
checksumPlugin=&crc32ChecksumPlugin; //DEFAULT
|
|
1234
|
+
# endif
|
|
1235
|
+
#endif
|
|
1236
|
+
}else
|
|
1237
|
+
{
|
|
1238
|
+
_options_check(checksumPlugin==0,"-C now only support dir diff, unsupport diff");
|
|
1239
|
+
}
|
|
1240
|
+
#endif //_IS_NEED_DIR_DIFF_PATCH
|
|
1241
|
+
|
|
1242
|
+
if (!diffSets.isDoDiff)
|
|
1243
|
+
diffSets.isDiffInMem=hpatch_FALSE; //all check diffFile (-t) run with stream;
|
|
1244
|
+
|
|
1245
|
+
#if (_IS_NEED_DIR_DIFF_PATCH)
|
|
1246
|
+
if (isUseDirDiff){
|
|
1247
|
+
#if (_IS_NEED_BSDIFF)
|
|
1248
|
+
_options_check(!diffSets.isBsDiff,"bsdiff unsupport dir diff");
|
|
1249
|
+
#endif
|
|
1250
|
+
#if (_IS_NEED_VCDIFF)
|
|
1251
|
+
_options_check(!diffSets.isVcDiff,"VCDIFF unsupport dir diff");
|
|
1252
|
+
#endif
|
|
1253
|
+
return hdiff_dir(oldPath,newPath,outDiffFileName,compressPlugin,
|
|
1254
|
+
checksumPlugin,(kPathType_dir==oldType),(kPathType_dir==newType),
|
|
1255
|
+
diffSets,kMaxOpenFileNumber,
|
|
1256
|
+
ignorePathList,ignoreOldPathList,ignoreNewPathList,
|
|
1257
|
+
manifestOld,manifestNew);
|
|
1258
|
+
}else
|
|
1259
|
+
#endif
|
|
1260
|
+
{
|
|
1261
|
+
return hdiff(oldPath,newPath,outDiffFileName,
|
|
1262
|
+
compressPlugin,diffSets);
|
|
1263
|
+
}
|
|
1264
|
+
#if (_IS_NEED_DIR_DIFF_PATCH)
|
|
1265
|
+
}else if (!manifestOut.empty()){ //() //create manifest
|
|
1266
|
+
_options_check(arg_values.size()==1,"create manifest file used one inputPath");
|
|
1267
|
+
_options_check(ignoreOldPathList.empty(),"-g-old unsupport run with create manifest file mode");
|
|
1268
|
+
_options_check(ignoreNewPathList.empty(),"-g-new unsupport run with create manifest file mode");
|
|
1269
|
+
|
|
1270
|
+
#ifdef _ChecksumPlugin_fadler64
|
|
1271
|
+
if (isSetChecksum==hpatch_FALSE)
|
|
1272
|
+
checksumPlugin=&fadler64ChecksumPlugin; //DEFAULT
|
|
1273
|
+
#else
|
|
1274
|
+
# ifdef _ChecksumPlugin_crc32
|
|
1275
|
+
if (isSetChecksum==hpatch_FALSE)
|
|
1276
|
+
checksumPlugin=&crc32ChecksumPlugin; //DEFAULT
|
|
1277
|
+
# endif
|
|
1278
|
+
#endif
|
|
1279
|
+
|
|
1280
|
+
if (checksumPlugin==0) { printf("WARNING: create manifest file not set chercksum!\n\n"); }
|
|
1281
|
+
const char* inputPath =arg_values[0];
|
|
1282
|
+
if (!isForceOverwrite){
|
|
1283
|
+
hpatch_TPathType outFileType;
|
|
1284
|
+
_return_check(hpatch_getPathStat(manifestOut.c_str(),&outFileType,0),
|
|
1285
|
+
HDIFF_PATHTYPE_ERROR,"get outManifestFile type");
|
|
1286
|
+
_return_check(outFileType==kPathType_notExist,
|
|
1287
|
+
HDIFF_PATHTYPE_ERROR,"create outManifestFile already exists, overwrite");
|
|
1288
|
+
}
|
|
1289
|
+
return create_manifest(inputPath,manifestOut.c_str(),checksumPlugin,ignorePathList);
|
|
1290
|
+
#endif
|
|
1291
|
+
}else{// (arg_values.size()==2) //resave
|
|
1292
|
+
_options_check(!isOldPathInputEmpty,"can't resave, must input a diffFile");
|
|
1293
|
+
_options_check((diffSets.isDoDiff==_kNULL_VALUE),"-d unsupport run with resave mode");
|
|
1294
|
+
_options_check((diffSets.isDoPatchCheck==_kNULL_VALUE),"-t unsupport run with resave mode");
|
|
1295
|
+
#if (_IS_NEED_BSDIFF)
|
|
1296
|
+
_options_check((diffSets.isBsDiff==hpatch_FALSE),"-BSD unsupport run with resave mode");
|
|
1297
|
+
#endif
|
|
1298
|
+
#if (_IS_NEED_VCDIFF)
|
|
1299
|
+
_options_check((diffSets.isVcDiff==hpatch_FALSE),"-VCD unsupport run with resave mode");
|
|
1300
|
+
#endif
|
|
1301
|
+
|
|
1302
|
+
#if (_IS_NEED_DIR_DIFF_PATCH)
|
|
1303
|
+
_options_check((isForceRunDirDiff==_kNULL_VALUE),"-D unsupport run with resave mode");
|
|
1304
|
+
_options_check((checksumPlugin==0),"-C unsupport run with resave mode");
|
|
1305
|
+
#endif
|
|
1306
|
+
const char* diffFileName =arg_values[0];
|
|
1307
|
+
const char* outDiffFileName=arg_values[1];
|
|
1308
|
+
hpatch_BOOL isDiffFile=_getIsCompressedDiffFile(diffFileName);
|
|
1309
|
+
isDiffFile=isDiffFile || _getIsSingleStreamDiffFile(diffFileName);
|
|
1310
|
+
#if (_IS_NEED_DIR_DIFF_PATCH)
|
|
1311
|
+
isDiffFile=isDiffFile || getIsDirDiffFile(diffFileName);
|
|
1312
|
+
#endif
|
|
1313
|
+
#if (_IS_NEED_BSDIFF)
|
|
1314
|
+
isDiffFile=isDiffFile || _getIsBsDiffFile(diffFileName);
|
|
1315
|
+
#endif
|
|
1316
|
+
#if (_IS_NEED_VCDIFF)
|
|
1317
|
+
isDiffFile=isDiffFile || _getIsVcDiffFile(diffFileName);
|
|
1318
|
+
#endif
|
|
1319
|
+
_return_check(isDiffFile,HDIFF_RESAVE_DIFFINFO_ERROR,"can't resave, input file is not diffFile");
|
|
1320
|
+
if (!isForceOverwrite){
|
|
1321
|
+
hpatch_TPathType outDiffFileType;
|
|
1322
|
+
_return_check(hpatch_getPathStat(outDiffFileName,&outDiffFileType,0),
|
|
1323
|
+
HDIFF_PATHTYPE_ERROR,"get outDiffFile type");
|
|
1324
|
+
_return_check(outDiffFileType==kPathType_notExist,
|
|
1325
|
+
HDIFF_PATHTYPE_ERROR,"resave outDiffFile already exists, overwrite");
|
|
1326
|
+
}
|
|
1327
|
+
hpatch_BOOL isSamePath=hpatch_getIsSamePath(diffFileName,outDiffFileName);
|
|
1328
|
+
if (isSamePath)
|
|
1329
|
+
_return_check(isForceOverwrite,HDIFF_PATHTYPE_ERROR,"diffFile outDiffFile same name");
|
|
1330
|
+
|
|
1331
|
+
if (!isSamePath){
|
|
1332
|
+
return hdiff_resave(diffFileName,outDiffFileName,compressPlugin);
|
|
1333
|
+
}else{
|
|
1334
|
+
// 1. resave to newDiffTempName
|
|
1335
|
+
// 2. if resave ok then { delelte oldDiffFile; rename newDiffTempName to oldDiffName; }
|
|
1336
|
+
// if resave error then { delelte newDiffTempName; }
|
|
1337
|
+
char newDiffTempName[hpatch_kPathMaxSize];
|
|
1338
|
+
_return_check(hpatch_getTempPathName(outDiffFileName,newDiffTempName,newDiffTempName+hpatch_kPathMaxSize),
|
|
1339
|
+
HDIFF_TEMPPATH_ERROR,"getTempPathName(diffFile)");
|
|
1340
|
+
printf("NOTE: out_diff temp file will be rename to in_diff name after resave!\n");
|
|
1341
|
+
int result=hdiff_resave(diffFileName,newDiffTempName,compressPlugin);
|
|
1342
|
+
if (result==0){//resave ok
|
|
1343
|
+
_return_check(hpatch_removeFile(diffFileName),
|
|
1344
|
+
HDIFF_DELETEPATH_ERROR,"removeFile(diffFile)");
|
|
1345
|
+
_return_check(hpatch_renamePath(newDiffTempName,diffFileName),
|
|
1346
|
+
HDIFF_RENAMEPATH_ERROR,"renamePath(temp,diffFile)");
|
|
1347
|
+
printf("out_diff temp file renamed to in_diff name!\n");
|
|
1348
|
+
}else{//resave error
|
|
1349
|
+
if (!hpatch_removeFile(newDiffTempName)){
|
|
1350
|
+
printf("WARNING: can't remove temp file \"");
|
|
1351
|
+
hpatch_printPath_utf8(newDiffTempName); printf("\"\n");
|
|
1352
|
+
}
|
|
1353
|
+
}
|
|
1354
|
+
return result;
|
|
1355
|
+
}
|
|
1356
|
+
}
|
|
1357
|
+
}
|
|
1358
|
+
|
|
1359
|
+
#if (_IS_NEED_VCDIFF)
|
|
1360
|
+
static hpatch_BOOL getVcDiffDecompressPlugin(hpatch_TDecompress* out_decompressPlugin,
|
|
1361
|
+
const hpatch_VcDiffInfo* vcdInfo){
|
|
1362
|
+
const hpatch_TDecompress* decompressPlugin=0;
|
|
1363
|
+
memset(out_decompressPlugin,0,sizeof(*out_decompressPlugin));
|
|
1364
|
+
|
|
1365
|
+
switch (vcdInfo->compressorID){
|
|
1366
|
+
case 0: return hpatch_TRUE;
|
|
1367
|
+
#ifdef _CompressPlugin_7zXZ
|
|
1368
|
+
case kVcDiff_compressorID_7zXZ:{
|
|
1369
|
+
_init_CompressPlugin_7zXZ();
|
|
1370
|
+
if (vcdInfo->isHDiffzAppHead_a)
|
|
1371
|
+
decompressPlugin=&_7zXZDecompressPlugin_a;
|
|
1372
|
+
else
|
|
1373
|
+
decompressPlugin=&_7zXZDecompressPlugin;
|
|
1374
|
+
} break;
|
|
1375
|
+
#endif
|
|
1376
|
+
default: return hpatch_FALSE; //unsupport
|
|
1377
|
+
}
|
|
1378
|
+
if (decompressPlugin){
|
|
1379
|
+
*out_decompressPlugin=*decompressPlugin;
|
|
1380
|
+
out_decompressPlugin->decError=hpatch_dec_ok;
|
|
1381
|
+
}
|
|
1382
|
+
return hpatch_TRUE;
|
|
1383
|
+
}
|
|
1384
|
+
|
|
1385
|
+
#ifdef _CompressPlugin_7zXZ
|
|
1386
|
+
#define _CompressPluginForVcDiff(vcdiffCompressPlugin,compressPlugin) \
|
|
1387
|
+
vcdiff_TCompress _vcdiffCompressPlugin; \
|
|
1388
|
+
vcdiffCompressPlugin=0; \
|
|
1389
|
+
if (compressPlugin){ \
|
|
1390
|
+
check(0==strcmp(compressPlugin->compressType(),"7zXZ"),HDIFF_OPTIONS_ERROR,"-VCD unsupport compressType"); \
|
|
1391
|
+
_vcdiffCompressPlugin.compress_type=kVcDiff_compressorID_7zXZ; \
|
|
1392
|
+
_vcdiffCompressPlugin.compress=compressPlugin; \
|
|
1393
|
+
_vcdiffCompressPlugin.compress_open=_7zXZ_compress_open; \
|
|
1394
|
+
_vcdiffCompressPlugin.compress_encode=_7zXZ_compress_encode; \
|
|
1395
|
+
_vcdiffCompressPlugin.compress_close=_7zXZ_compress_close; \
|
|
1396
|
+
vcdiffCompressPlugin=&_vcdiffCompressPlugin; }
|
|
1397
|
+
#else
|
|
1398
|
+
#define _CompressPluginForVcDiff(vcdiffCompressPlugin,compressPlugin) \
|
|
1399
|
+
vcdiffCompressPlugin=0; \
|
|
1400
|
+
if (compressPlugin){ \
|
|
1401
|
+
check(hpatch_FALSE,HDIFF_OPTIONS_ERROR,"-VCD unsupport compress"); }
|
|
1402
|
+
#endif
|
|
1403
|
+
|
|
1404
|
+
#endif //_IS_NEED_VCDIFF
|
|
1405
|
+
|
|
1406
|
+
#define _check_on_error(errorType) { \
|
|
1407
|
+
if (result==HDIFF_SUCCESS) result=errorType; if (!_isInClear){ goto clear; } }
|
|
1408
|
+
#define check(value,errorType,errorInfo) { if (!(value)){ \
|
|
1409
|
+
hpatch_printStdErrPath_utf8((std::string()+errorInfo+" ERROR!\n").c_str()); \
|
|
1410
|
+
_check_on_error(errorType); } }
|
|
1411
|
+
|
|
1412
|
+
static int hdiff_by_stream(const char* oldFileName,const char* newFileName,const char* outDiffFileName,
|
|
1413
|
+
const hdiff_TCompress* compressPlugin,const TDiffSets& diffSets){
|
|
1414
|
+
double diff_time0=clock_s();
|
|
1415
|
+
int result=HDIFF_SUCCESS;
|
|
1416
|
+
int _isInClear=hpatch_FALSE;
|
|
1417
|
+
hpatch_TFileStreamInput oldData;
|
|
1418
|
+
hpatch_TFileStreamInput newData;
|
|
1419
|
+
hpatch_TFileStreamOutput diffData_out;
|
|
1420
|
+
hpatch_TFileStreamInput diffData_in;
|
|
1421
|
+
hpatch_TFileStreamInput_init(&oldData);
|
|
1422
|
+
hpatch_TFileStreamInput_init(&newData);
|
|
1423
|
+
hpatch_TFileStreamOutput_init(&diffData_out);
|
|
1424
|
+
hpatch_TFileStreamInput_init(&diffData_in);
|
|
1425
|
+
|
|
1426
|
+
if (oldFileName&&(strlen(oldFileName)>0)){
|
|
1427
|
+
check(hpatch_TFileStreamInput_open(&oldData,oldFileName),HDIFF_OPENREAD_ERROR,"open oldFile");
|
|
1428
|
+
}else{
|
|
1429
|
+
mem_as_hStreamInput(&oldData.base,0,0);
|
|
1430
|
+
}
|
|
1431
|
+
check(hpatch_TFileStreamInput_open(&newData,newFileName),HDIFF_OPENREAD_ERROR,"open newFile");
|
|
1432
|
+
printf("oldDataSize : %" PRIu64 "\nnewDataSize : %" PRIu64 "\n",
|
|
1433
|
+
oldData.base.streamSize,newData.base.streamSize);
|
|
1434
|
+
if (diffSets.isDoDiff){
|
|
1435
|
+
if (diffSets.isCheckNotEqual){
|
|
1436
|
+
_out_diff_info(" load datas of oldFile & newFile for equal check ...\n");
|
|
1437
|
+
check(!hdiff_streamDataIsEqual(&oldData.base,&newData.base),HDIFF_OLD_NEW_SAME_ERROR,"oldFile & newFile's datas can't be equal");
|
|
1438
|
+
}
|
|
1439
|
+
const hdiff_TMTSets_s mtsets={diffSets.threadNum,diffSets.threadNumSearch_s,false,false};
|
|
1440
|
+
check(hpatch_TFileStreamOutput_open(&diffData_out,outDiffFileName,hpatch_kNullStreamPos),
|
|
1441
|
+
HDIFF_OPENWRITE_ERROR,"open out diffFile");
|
|
1442
|
+
hpatch_TFileStreamOutput_setRandomOut(&diffData_out,hpatch_TRUE);
|
|
1443
|
+
try{
|
|
1444
|
+
#if (_IS_NEED_BSDIFF)
|
|
1445
|
+
if (diffSets.isBsDiff){
|
|
1446
|
+
if (diffSets.isDiffInMem)
|
|
1447
|
+
create_bsdiff_block(&newData.base,&oldData.base,&diffData_out.base,compressPlugin,
|
|
1448
|
+
diffSets.isSingleCompressedDiff,(int)diffSets.matchScore,diffSets.isUseBigCacheMatch,
|
|
1449
|
+
diffSets.matchBlockSize,diffSets.threadNum,diffSets.threadNumSearch_s);
|
|
1450
|
+
else
|
|
1451
|
+
create_bsdiff_stream(&newData.base,&oldData.base,&diffData_out.base,
|
|
1452
|
+
compressPlugin,diffSets.isSingleCompressedDiff,
|
|
1453
|
+
diffSets.matchBlockSize,&mtsets);
|
|
1454
|
+
}else
|
|
1455
|
+
#endif
|
|
1456
|
+
#if (_IS_NEED_VCDIFF)
|
|
1457
|
+
if (diffSets.isVcDiff){
|
|
1458
|
+
vcdiff_TCompress* vcdiffCompressPlugin;
|
|
1459
|
+
_CompressPluginForVcDiff(vcdiffCompressPlugin,compressPlugin);
|
|
1460
|
+
if (diffSets.isDiffInMem)
|
|
1461
|
+
create_vcdiff_block(&newData.base,&oldData.base,&diffData_out.base,vcdiffCompressPlugin,
|
|
1462
|
+
(int)diffSets.matchScore,diffSets.isUseBigCacheMatch,
|
|
1463
|
+
diffSets.matchBlockSize,diffSets.threadNum,diffSets.threadNumSearch_s);
|
|
1464
|
+
else
|
|
1465
|
+
create_vcdiff_stream(&newData.base,&oldData.base,&diffData_out.base,
|
|
1466
|
+
vcdiffCompressPlugin,diffSets.matchBlockSize,&mtsets);
|
|
1467
|
+
}else
|
|
1468
|
+
#endif
|
|
1469
|
+
if (diffSets.isSingleCompressedDiff)
|
|
1470
|
+
if (diffSets.isDiffInMem)
|
|
1471
|
+
create_single_compressed_diff_block(&newData.base,&oldData.base,&diffData_out.base,compressPlugin,
|
|
1472
|
+
(int)diffSets.matchScore,diffSets.patchStepMemSize,diffSets.isUseBigCacheMatch,
|
|
1473
|
+
diffSets.matchBlockSize,diffSets.threadNum,diffSets.threadNumSearch_s);
|
|
1474
|
+
else
|
|
1475
|
+
create_single_compressed_diff_stream(&newData.base,&oldData.base, &diffData_out.base,
|
|
1476
|
+
compressPlugin,diffSets.matchBlockSize,
|
|
1477
|
+
diffSets.patchStepMemSize,&mtsets);
|
|
1478
|
+
else{
|
|
1479
|
+
if (diffSets.isDiffInMem)
|
|
1480
|
+
create_compressed_diff_block(&newData.base,&oldData.base,&diffData_out.base,compressPlugin,
|
|
1481
|
+
(int)diffSets.matchScore,diffSets.isUseBigCacheMatch,
|
|
1482
|
+
diffSets.matchBlockSize,diffSets.threadNum,diffSets.threadNumSearch_s);
|
|
1483
|
+
else
|
|
1484
|
+
create_compressed_diff_stream(&newData.base,&oldData.base, &diffData_out.base,
|
|
1485
|
+
compressPlugin,diffSets.matchBlockSize,&mtsets);
|
|
1486
|
+
}
|
|
1487
|
+
diffData_out.base.streamSize=diffData_out.out_length;
|
|
1488
|
+
}catch(const std::exception& e){
|
|
1489
|
+
check(!newData.fileError,HDIFF_OPENREAD_ERROR,"read newFile");
|
|
1490
|
+
check(!oldData.fileError,HDIFF_OPENREAD_ERROR,"read oldFile");
|
|
1491
|
+
check(!diffData_out.fileError,HDIFF_OPENWRITE_ERROR,"write diffFile");
|
|
1492
|
+
check(false,HDIFF_DIFF_ERROR,"stream diff run an error: "+e.what());
|
|
1493
|
+
}
|
|
1494
|
+
const hpatch_StreamPos_t outDiffDataSize=diffData_out.base.streamSize;
|
|
1495
|
+
check(hpatch_TFileStreamOutput_close(&diffData_out),HDIFF_FILECLOSE_ERROR,"out diffFile close");
|
|
1496
|
+
printf("diffDataSize: %" PRIu64 "\n"
|
|
1497
|
+
"diff time: %.3f s\n"
|
|
1498
|
+
" out diff file ok!\n" ,outDiffDataSize,(clock_s()-diff_time0));
|
|
1499
|
+
}
|
|
1500
|
+
if (diffSets.isDoPatchCheck){
|
|
1501
|
+
double patch_time0=clock_s();
|
|
1502
|
+
printf("\nload diffFile for patch check:\n");
|
|
1503
|
+
check(hpatch_TFileStreamInput_open(&diffData_in,outDiffFileName),HDIFF_OPENREAD_ERROR,"open check diffFile");
|
|
1504
|
+
printf("diffDataSize: %" PRIu64 "\n",diffData_in.base.streamSize);
|
|
1505
|
+
|
|
1506
|
+
hpatch_BOOL isSingleCompressedDiff=hpatch_FALSE;
|
|
1507
|
+
#if (_IS_NEED_BSDIFF)
|
|
1508
|
+
hpatch_BOOL isBsDiff=hpatch_FALSE;
|
|
1509
|
+
hpatch_BOOL isSingleCompressedBsDiff=hpatch_FALSE;
|
|
1510
|
+
#endif
|
|
1511
|
+
#if (_IS_NEED_VCDIFF)
|
|
1512
|
+
hpatch_BOOL isVcDiff=hpatch_FALSE;
|
|
1513
|
+
#endif
|
|
1514
|
+
hpatch_TDecompress _decompressPlugin={0};
|
|
1515
|
+
hpatch_TDecompress* saved_decompressPlugin=&_decompressPlugin;
|
|
1516
|
+
{
|
|
1517
|
+
hpatch_compressedDiffInfo diffInfo;
|
|
1518
|
+
hpatch_singleCompressedDiffInfo sdiffInfo;
|
|
1519
|
+
#if (_IS_NEED_VCDIFF)
|
|
1520
|
+
hpatch_VcDiffInfo vcdiffInfo;
|
|
1521
|
+
#endif
|
|
1522
|
+
const char* compressType="";
|
|
1523
|
+
if (getCompressedDiffInfo(&diffInfo,&diffData_in.base)){
|
|
1524
|
+
if (!diffSets.isDoDiff)
|
|
1525
|
+
printf("test compressed diffData!\n");
|
|
1526
|
+
compressType=diffInfo.compressType;
|
|
1527
|
+
}else if (getSingleCompressedDiffInfo(&sdiffInfo,&diffData_in.base,0)){
|
|
1528
|
+
compressType=sdiffInfo.compressType;
|
|
1529
|
+
isSingleCompressedDiff=hpatch_TRUE;
|
|
1530
|
+
if (!diffSets.isDoDiff)
|
|
1531
|
+
printf("test single compressed diffData!\n");
|
|
1532
|
+
#if (_IS_NEED_BSDIFF)
|
|
1533
|
+
}else if (getIsBsDiff(&diffData_in.base,&isSingleCompressedBsDiff)){
|
|
1534
|
+
*saved_decompressPlugin=_bz2DecompressPlugin_unsz;
|
|
1535
|
+
isBsDiff=hpatch_TRUE;
|
|
1536
|
+
if (!diffSets.isDoDiff)
|
|
1537
|
+
printf(isSingleCompressedBsDiff?"test endsley/bsdiff's diffData!\n":"test bsdiff4's diffData!\n");
|
|
1538
|
+
#endif
|
|
1539
|
+
#if (_IS_NEED_VCDIFF)
|
|
1540
|
+
}else if (getVcDiffInfo(&vcdiffInfo,&diffData_in.base,hpatch_FALSE)){
|
|
1541
|
+
check(getVcDiffDecompressPlugin(saved_decompressPlugin,&vcdiffInfo),
|
|
1542
|
+
HDIFF_PATCH_ERROR,"VCDIFF unsported compressorID");
|
|
1543
|
+
isVcDiff=hpatch_TRUE;
|
|
1544
|
+
if (!diffSets.isDoDiff)
|
|
1545
|
+
printf("test VCDIFF's diffData!\n");
|
|
1546
|
+
#endif
|
|
1547
|
+
}else{
|
|
1548
|
+
check(hpatch_FALSE,HDIFF_PATCH_ERROR,"get diff info");
|
|
1549
|
+
}
|
|
1550
|
+
if (saved_decompressPlugin->open==0){
|
|
1551
|
+
check(findDecompress(saved_decompressPlugin,compressType),
|
|
1552
|
+
HDIFF_PATCH_ERROR,"diff data saved compress type");
|
|
1553
|
+
}
|
|
1554
|
+
if (saved_decompressPlugin->open==0) saved_decompressPlugin=0;
|
|
1555
|
+
else saved_decompressPlugin->decError=hpatch_dec_ok;
|
|
1556
|
+
}
|
|
1557
|
+
bool diffrt;
|
|
1558
|
+
#if (_IS_NEED_BSDIFF)
|
|
1559
|
+
if (isBsDiff)
|
|
1560
|
+
diffrt=check_bsdiff(&newData.base,&oldData.base,&diffData_in.base,saved_decompressPlugin);
|
|
1561
|
+
else
|
|
1562
|
+
#endif
|
|
1563
|
+
#if (_IS_NEED_VCDIFF)
|
|
1564
|
+
if (isVcDiff)
|
|
1565
|
+
diffrt=check_vcdiff(&newData.base,&oldData.base,&diffData_in.base,saved_decompressPlugin);
|
|
1566
|
+
else
|
|
1567
|
+
#endif
|
|
1568
|
+
if (isSingleCompressedDiff)
|
|
1569
|
+
diffrt=check_single_compressed_diff(&newData.base,&oldData.base,&diffData_in.base,saved_decompressPlugin);
|
|
1570
|
+
else
|
|
1571
|
+
diffrt=check_compressed_diff(&newData.base,&oldData.base,&diffData_in.base,saved_decompressPlugin);
|
|
1572
|
+
check(diffrt,HDIFF_PATCH_ERROR,"patch check diff data");
|
|
1573
|
+
printf("patch time: %.3f s\n"
|
|
1574
|
+
" patch check diff data ok!\n",(clock_s()-patch_time0));
|
|
1575
|
+
}
|
|
1576
|
+
clear:
|
|
1577
|
+
_isInClear=hpatch_TRUE;
|
|
1578
|
+
check(hpatch_TFileStreamOutput_close(&diffData_out),HDIFF_FILECLOSE_ERROR,"out diffFile close");
|
|
1579
|
+
check(hpatch_TFileStreamInput_close(&diffData_in),HDIFF_FILECLOSE_ERROR,"in diffFile close");
|
|
1580
|
+
check(hpatch_TFileStreamInput_close(&newData),HDIFF_FILECLOSE_ERROR,"newFile close");
|
|
1581
|
+
check(hpatch_TFileStreamInput_close(&oldData),HDIFF_FILECLOSE_ERROR,"oldFile close");
|
|
1582
|
+
return result;
|
|
1583
|
+
}
|
|
1584
|
+
|
|
1585
|
+
int hdiff(const char* oldFileName,const char* newFileName,const char* outDiffFileName,
|
|
1586
|
+
const hdiff_TCompress* compressPlugin,const TDiffSets& diffSets){
|
|
1587
|
+
double time0=clock_s();
|
|
1588
|
+
std::string fnameInfo=std::string("old : \"")+oldFileName+"\"\n"
|
|
1589
|
+
+"new : \""+newFileName+"\"\n"
|
|
1590
|
+
+(diffSets.isDoDiff?"out : \"":"test: \"")+outDiffFileName+"\"\n";
|
|
1591
|
+
hpatch_printPath_utf8(fnameInfo.c_str());
|
|
1592
|
+
|
|
1593
|
+
if (diffSets.isDoDiff) {
|
|
1594
|
+
const char* compressTypeTxt="";
|
|
1595
|
+
if (compressPlugin) compressTypeTxt=compressPlugin->compressTypeForDisplay?
|
|
1596
|
+
compressPlugin->compressTypeForDisplay():compressPlugin->compressType();
|
|
1597
|
+
printf("hdiffz run with compress plugin: \"%s\"\n",compressTypeTxt);
|
|
1598
|
+
if (diffSets.isSingleCompressedDiff){
|
|
1599
|
+
#if (_IS_NEED_BSDIFF)
|
|
1600
|
+
if (!diffSets.isBsDiff)
|
|
1601
|
+
#endif
|
|
1602
|
+
printf("create single compressed diffData!\n");
|
|
1603
|
+
}
|
|
1604
|
+
#if (_IS_NEED_BSDIFF)
|
|
1605
|
+
if (diffSets.isBsDiff)
|
|
1606
|
+
printf(diffSets.isSingleCompressedDiff?"create endsley/bsdiff diffData!\n":"create bsdiff4 diffData!\n");
|
|
1607
|
+
#endif
|
|
1608
|
+
#if (_IS_NEED_VCDIFF)
|
|
1609
|
+
if (diffSets.isVcDiff)
|
|
1610
|
+
printf("create VCDIFF diffData!\n");
|
|
1611
|
+
#endif
|
|
1612
|
+
}
|
|
1613
|
+
|
|
1614
|
+
int exitCode=hdiff_by_stream(oldFileName,newFileName,outDiffFileName,
|
|
1615
|
+
compressPlugin,diffSets);
|
|
1616
|
+
if (diffSets.isDoDiff && diffSets.isDoPatchCheck)
|
|
1617
|
+
printf("\nall time: %.3f s\n",(clock_s()-time0));
|
|
1618
|
+
return exitCode;
|
|
1619
|
+
}
|
|
1620
|
+
|
|
1621
|
+
int hdiff_resave(const char* diffFileName,const char* outDiffFileName,
|
|
1622
|
+
const hdiff_TCompress* compressPlugin){
|
|
1623
|
+
double time0=clock_s();
|
|
1624
|
+
std::string fnameInfo=std::string("in_diff : \"")+diffFileName+"\"\n"
|
|
1625
|
+
+"out_diff: \""+outDiffFileName+"\"\n";
|
|
1626
|
+
hpatch_printPath_utf8(fnameInfo.c_str());
|
|
1627
|
+
|
|
1628
|
+
int result=HDIFF_SUCCESS;
|
|
1629
|
+
hpatch_BOOL _isInClear=hpatch_FALSE;
|
|
1630
|
+
hpatch_BOOL isDirDiff=hpatch_FALSE;
|
|
1631
|
+
hpatch_BOOL isSingleDiff=hpatch_FALSE;
|
|
1632
|
+
hpatch_compressedDiffInfo diffInfo;
|
|
1633
|
+
hpatch_singleCompressedDiffInfo singleDiffInfo;
|
|
1634
|
+
#if (_IS_NEED_DIR_DIFF_PATCH)
|
|
1635
|
+
std::string dirCompressType;
|
|
1636
|
+
TDirDiffInfo dirDiffInfo;
|
|
1637
|
+
hpatch_TChecksum* checksumPlugin=0;
|
|
1638
|
+
#endif
|
|
1639
|
+
hpatch_TFileStreamInput diffData_in;
|
|
1640
|
+
hpatch_TFileStreamOutput diffData_out;
|
|
1641
|
+
hpatch_TFileStreamInput_init(&diffData_in);
|
|
1642
|
+
hpatch_TFileStreamOutput_init(&diffData_out);
|
|
1643
|
+
|
|
1644
|
+
hpatch_TDecompress _decompressPlugin={0};
|
|
1645
|
+
hpatch_TDecompress* decompressPlugin=&_decompressPlugin;
|
|
1646
|
+
check(hpatch_TFileStreamInput_open(&diffData_in,diffFileName),HDIFF_OPENREAD_ERROR,"open diffFile");
|
|
1647
|
+
#if (_IS_NEED_DIR_DIFF_PATCH)
|
|
1648
|
+
check(getDirDiffInfo(&dirDiffInfo,&diffData_in.base),HDIFF_OPENREAD_ERROR,"read diffFile");
|
|
1649
|
+
isDirDiff=dirDiffInfo.isDirDiff;
|
|
1650
|
+
if (isDirDiff){
|
|
1651
|
+
diffInfo=dirDiffInfo.hdiffInfo;
|
|
1652
|
+
diffInfo.compressedCount+=dirDiffInfo.dirDataIsCompressed?1:0;
|
|
1653
|
+
printf(" resave as dir diffFile \n");
|
|
1654
|
+
}else
|
|
1655
|
+
#endif
|
|
1656
|
+
if (getSingleCompressedDiffInfo(&singleDiffInfo,&diffData_in.base,0)){
|
|
1657
|
+
isSingleDiff=hpatch_TRUE;
|
|
1658
|
+
_singleDiffInfoToHDiffInfo(&diffInfo,&singleDiffInfo);
|
|
1659
|
+
printf(" resave as single stream diffFile \n");
|
|
1660
|
+
}else if(getCompressedDiffInfo(&diffInfo,&diffData_in.base)){
|
|
1661
|
+
//ok
|
|
1662
|
+
}else{
|
|
1663
|
+
check(!diffData_in.fileError,HDIFF_RESAVE_FILEREAD_ERROR,"read diffFile");
|
|
1664
|
+
check(hpatch_FALSE,HDIFF_RESAVE_DIFFINFO_ERROR,"is hdiff file? get diff info");
|
|
1665
|
+
}
|
|
1666
|
+
{//decompressPlugin
|
|
1667
|
+
findDecompress(decompressPlugin,diffInfo.compressType);
|
|
1668
|
+
if (decompressPlugin->open==0){
|
|
1669
|
+
if (diffInfo.compressedCount>0){
|
|
1670
|
+
check(false,HDIFF_RESAVE_COMPRESSTYPE_ERROR,
|
|
1671
|
+
"can no decompress \""+diffInfo.compressType+" data");
|
|
1672
|
+
}else{
|
|
1673
|
+
if (strlen(diffInfo.compressType)>0)
|
|
1674
|
+
printf(" diffFile added useless compress tag \"%s\"\n",diffInfo.compressType);
|
|
1675
|
+
decompressPlugin=0;
|
|
1676
|
+
}
|
|
1677
|
+
}else{
|
|
1678
|
+
decompressPlugin->decError=hpatch_dec_ok;
|
|
1679
|
+
printf("resave diffFile with decompress plugin: \"%s\" (need decompress %d)\n",diffInfo.compressType,diffInfo.compressedCount);
|
|
1680
|
+
}
|
|
1681
|
+
}
|
|
1682
|
+
{
|
|
1683
|
+
const char* compressTypeTxt="";
|
|
1684
|
+
if (compressPlugin) compressTypeTxt=compressPlugin->compressTypeForDisplay?
|
|
1685
|
+
compressPlugin->compressTypeForDisplay():compressPlugin->compressType();
|
|
1686
|
+
printf("resave diffFile with compress plugin: \"%s\"\n",compressTypeTxt);
|
|
1687
|
+
}
|
|
1688
|
+
#if (_IS_NEED_DIR_DIFF_PATCH)
|
|
1689
|
+
if (isDirDiff){ //checksumPlugin
|
|
1690
|
+
if (strlen(dirDiffInfo.checksumType)>0){
|
|
1691
|
+
check(findChecksum(&checksumPlugin,dirDiffInfo.checksumType), HDIFF_RESAVE_CHECKSUMTYPE_ERROR,
|
|
1692
|
+
"not found checksum plugin dirDiffFile used: \""+dirDiffInfo.checksumType+"\"\n");
|
|
1693
|
+
check(checksumPlugin->checksumByteSize()==dirDiffInfo.checksumByteSize,HDIFF_RESAVE_CHECKSUMTYPE_ERROR,
|
|
1694
|
+
"found checksum plugin not same as dirDiffFile used: \""+dirDiffInfo.checksumType+"\"\n");
|
|
1695
|
+
}
|
|
1696
|
+
printf("resave dirDiffFile with checksum plugin: \"%s\"\n",dirDiffInfo.checksumType);
|
|
1697
|
+
}else{
|
|
1698
|
+
_options_check(checksumPlugin==0,"-C now only support dir diff");
|
|
1699
|
+
}
|
|
1700
|
+
#endif
|
|
1701
|
+
|
|
1702
|
+
check(hpatch_TFileStreamOutput_open(&diffData_out,outDiffFileName,hpatch_kNullStreamPos),HDIFF_OPENWRITE_ERROR,
|
|
1703
|
+
"open out diffFile");
|
|
1704
|
+
hpatch_TFileStreamOutput_setRandomOut(&diffData_out,hpatch_TRUE);
|
|
1705
|
+
printf("inDiffSize : %" PRIu64 "\n",diffData_in.base.streamSize);
|
|
1706
|
+
try{
|
|
1707
|
+
#if (_IS_NEED_DIR_DIFF_PATCH)
|
|
1708
|
+
if (isDirDiff){
|
|
1709
|
+
resave_dirdiff(&diffData_in.base,decompressPlugin,
|
|
1710
|
+
&diffData_out.base,compressPlugin,checksumPlugin);
|
|
1711
|
+
}else
|
|
1712
|
+
#endif
|
|
1713
|
+
if (isSingleDiff)
|
|
1714
|
+
resave_single_compressed_diff(&diffData_in.base,decompressPlugin,
|
|
1715
|
+
&diffData_out.base,compressPlugin,&singleDiffInfo);
|
|
1716
|
+
else
|
|
1717
|
+
resave_compressed_diff(&diffData_in.base,decompressPlugin,
|
|
1718
|
+
&diffData_out.base,compressPlugin);
|
|
1719
|
+
diffData_out.base.streamSize=diffData_out.out_length;
|
|
1720
|
+
}catch(const std::exception& e){
|
|
1721
|
+
check(!diffData_in.fileError,HDIFF_RESAVE_FILEREAD_ERROR,"read diffFile");
|
|
1722
|
+
check(!diffData_out.fileError,HDIFF_RESAVE_OPENWRITE_ERROR,"write diffFile");
|
|
1723
|
+
check(false,HDIFF_RESAVE_ERROR,"resave diff run an error: "+e.what());
|
|
1724
|
+
}
|
|
1725
|
+
printf("outDiffSize: %" PRIu64 "\n",diffData_out.base.streamSize);
|
|
1726
|
+
check(hpatch_TFileStreamOutput_close(&diffData_out),HDIFF_FILECLOSE_ERROR,"out diffFile close");
|
|
1727
|
+
printf(" out diff file ok!\n");
|
|
1728
|
+
|
|
1729
|
+
printf("\nhdiffz resave diffFile time: %.3f s\n",(clock_s()-time0));
|
|
1730
|
+
clear:
|
|
1731
|
+
_isInClear=hpatch_TRUE;
|
|
1732
|
+
check(hpatch_TFileStreamOutput_close(&diffData_out),HDIFF_FILECLOSE_ERROR,"out diffFile close");
|
|
1733
|
+
check(hpatch_TFileStreamInput_close(&diffData_in),HDIFF_FILECLOSE_ERROR,"in diffFile close");
|
|
1734
|
+
return result;
|
|
1735
|
+
}
|
|
1736
|
+
|
|
1737
|
+
|
|
1738
|
+
#if (_IS_NEED_DIR_DIFF_PATCH)
|
|
1739
|
+
|
|
1740
|
+
struct DirPathIgnoreListener:public CDirPathIgnore,IDirPathIgnore{
|
|
1741
|
+
DirPathIgnoreListener(const std::vector<std::string>& ignorePathListBase,
|
|
1742
|
+
const std::vector<std::string>& ignorePathList,bool isPrintIgnore=true)
|
|
1743
|
+
:CDirPathIgnore(ignorePathListBase,ignorePathList,isPrintIgnore){}
|
|
1744
|
+
//IDirPathIgnore
|
|
1745
|
+
virtual bool isNeedIgnore(const std::string& path,size_t rootPathNameLen){
|
|
1746
|
+
return CDirPathIgnore::isNeedIgnore(path,rootPathNameLen);
|
|
1747
|
+
}
|
|
1748
|
+
};
|
|
1749
|
+
|
|
1750
|
+
struct DirDiffListener:public IDirDiffListener{
|
|
1751
|
+
virtual bool isExecuteFile(const std::string& fileName) {
|
|
1752
|
+
bool result= 0!=hpatch_getIsExecuteFile(fileName.c_str());
|
|
1753
|
+
if (result){
|
|
1754
|
+
std::string info=" got new file Execute tag:\""+fileName+"\"\n";
|
|
1755
|
+
hpatch_printPath_utf8(info.c_str());
|
|
1756
|
+
}
|
|
1757
|
+
return result;
|
|
1758
|
+
}
|
|
1759
|
+
virtual void diffRefInfo(size_t oldPathCount,size_t newPathCount,size_t sameFilePairCount,
|
|
1760
|
+
hpatch_StreamPos_t sameFileSize,size_t refOldFileCount,size_t refNewFileCount,
|
|
1761
|
+
hpatch_StreamPos_t refOldFileSize,hpatch_StreamPos_t refNewFileSize){
|
|
1762
|
+
printf(" old path count: %" PRIu64 "\n",(hpatch_StreamPos_t)oldPathCount);
|
|
1763
|
+
printf(" new path count: %" PRIu64 " (fileCount:%" PRIu64 ")\n",
|
|
1764
|
+
(hpatch_StreamPos_t)newPathCount,(hpatch_StreamPos_t)(sameFilePairCount+refNewFileCount));
|
|
1765
|
+
printf(" same file count: %" PRIu64 " (dataSize: %" PRIu64 ")\n",
|
|
1766
|
+
(hpatch_StreamPos_t)sameFilePairCount,sameFileSize);
|
|
1767
|
+
printf(" ref old file count: %" PRIu64 "\n",(hpatch_StreamPos_t)refOldFileCount);
|
|
1768
|
+
printf(" ref new file count: %" PRIu64 "\n",(hpatch_StreamPos_t)refNewFileCount);
|
|
1769
|
+
printf("\nrun hdiffz:\n");
|
|
1770
|
+
printf(" oldRefSize : %" PRIu64 "\n",refOldFileSize);
|
|
1771
|
+
printf(" newRefSize : %" PRIu64 " (all newSize: %" PRIu64 ")\n",refNewFileSize,refNewFileSize+sameFileSize);
|
|
1772
|
+
}
|
|
1773
|
+
|
|
1774
|
+
double _runHDiffBegin_time0;
|
|
1775
|
+
virtual void runHDiffBegin(){ _runHDiffBegin_time0=clock_s(); }
|
|
1776
|
+
virtual void runHDiffEnd(hpatch_StreamPos_t diffDataSize){
|
|
1777
|
+
printf(" diffDataSize: %" PRIu64 "\n",diffDataSize);
|
|
1778
|
+
printf(" diff time: %.3f s\n",clock_s()-_runHDiffBegin_time0);
|
|
1779
|
+
}
|
|
1780
|
+
};
|
|
1781
|
+
|
|
1782
|
+
static void check_manifest(TManifest& out_manifest,const std::string& rootPath,const std::string& manifestFileName){
|
|
1783
|
+
TManifestSaved manifest;
|
|
1784
|
+
load_manifestFile(manifest,rootPath,manifestFileName);
|
|
1785
|
+
hpatch_TChecksum* checksumPlugin=0;
|
|
1786
|
+
findChecksum(&checksumPlugin,manifest.checksumType.c_str());
|
|
1787
|
+
checksum_manifest(manifest,checksumPlugin);
|
|
1788
|
+
out_manifest.rootPath.swap(manifest.rootPath);
|
|
1789
|
+
out_manifest.pathList.swap(manifest.pathList);
|
|
1790
|
+
}
|
|
1791
|
+
|
|
1792
|
+
int hdiff_dir(const char* _oldPath,const char* _newPath,const char* outDiffFileName,
|
|
1793
|
+
const hdiff_TCompress* compressPlugin,hpatch_TChecksum* checksumPlugin,
|
|
1794
|
+
hpatch_BOOL oldIsDir, hpatch_BOOL newIsDir,
|
|
1795
|
+
const TDiffSets& diffSets,size_t kMaxOpenFileNumber,
|
|
1796
|
+
const std::vector<std::string>& ignorePathListBase,const std::vector<std::string>& ignoreOldPathList,
|
|
1797
|
+
const std::vector<std::string>& ignoreNewPathList,
|
|
1798
|
+
const std::string& oldManifestFileName,const std::string& newManifestFileName){
|
|
1799
|
+
double time0=clock_s();
|
|
1800
|
+
std::string oldPath(_oldPath);
|
|
1801
|
+
std::string newPath(_newPath);
|
|
1802
|
+
if (oldIsDir) assignDirTag(oldPath); else assert(!hpatch_getIsDirName(oldPath.c_str()));
|
|
1803
|
+
if (newIsDir) assignDirTag(newPath); else assert(!hpatch_getIsDirName(newPath.c_str()));
|
|
1804
|
+
std::string fnameInfo=std::string("")
|
|
1805
|
+
+(oldIsDir?"oldDir : \"":"oldFile: \"")+oldPath+"\"\n"
|
|
1806
|
+
+(newIsDir?"newDir : \"":"newFile: \"")+newPath+"\"\n"
|
|
1807
|
+
+(diffSets.isDoDiff ? "outDiff: \"":" test : \"")+outDiffFileName+"\"\n";
|
|
1808
|
+
hpatch_printPath_utf8(fnameInfo.c_str());
|
|
1809
|
+
|
|
1810
|
+
bool isManifest= (!newManifestFileName.empty());
|
|
1811
|
+
if (diffSets.isDoDiff) {
|
|
1812
|
+
const char* checksumType="";
|
|
1813
|
+
const char* compressTypeTxt="";
|
|
1814
|
+
if (checksumPlugin)
|
|
1815
|
+
checksumType=checksumPlugin->checksumType();
|
|
1816
|
+
if (compressPlugin) compressTypeTxt=compressPlugin->compressTypeForDisplay?
|
|
1817
|
+
compressPlugin->compressTypeForDisplay():compressPlugin->compressType();
|
|
1818
|
+
printf("hdiffz run %sdir diff with compress plugin: \"%s\"\n",isManifest?"manifest ":"",compressTypeTxt);
|
|
1819
|
+
printf("hdiffz run %sdir diff with checksum plugin: \"%s\"\n",isManifest?"manifest ":"",checksumType);
|
|
1820
|
+
}
|
|
1821
|
+
printf("\n");
|
|
1822
|
+
|
|
1823
|
+
int result=HDIFF_SUCCESS;
|
|
1824
|
+
bool _isInClear=false;
|
|
1825
|
+
hpatch_TFileStreamOutput diffData_out;
|
|
1826
|
+
hpatch_TFileStreamInput diffData_in;
|
|
1827
|
+
hpatch_TFileStreamOutput_init(&diffData_out);
|
|
1828
|
+
hpatch_TFileStreamInput_init(&diffData_in);
|
|
1829
|
+
|
|
1830
|
+
TManifest oldManifest;
|
|
1831
|
+
TManifest newManifest;
|
|
1832
|
+
if (isManifest){
|
|
1833
|
+
_out_diff_info(" check old & new's datas by manifest ...\n");
|
|
1834
|
+
double check_time0=clock_s();
|
|
1835
|
+
try {
|
|
1836
|
+
if (!oldPath.empty())// isOldPathInputEmpty
|
|
1837
|
+
check_manifest(oldManifest,oldPath,oldManifestFileName);
|
|
1838
|
+
check_manifest(newManifest,newPath,newManifestFileName);
|
|
1839
|
+
}catch(const std::exception& e){
|
|
1840
|
+
check(false,MANIFEST_TEST_ERROR,"check by manifest found an error: "+e.what());
|
|
1841
|
+
}
|
|
1842
|
+
printf("check manifest time: %.3f s\n",(clock_s()-check_time0));
|
|
1843
|
+
printf(" check datas by manifest ok!\n\n");
|
|
1844
|
+
}else{
|
|
1845
|
+
DirPathIgnoreListener oldDirPathIgnore(ignorePathListBase,ignoreOldPathList);
|
|
1846
|
+
DirPathIgnoreListener newDirPathIgnore(ignorePathListBase,ignoreNewPathList);
|
|
1847
|
+
get_manifest(&oldDirPathIgnore,oldPath,oldManifest);
|
|
1848
|
+
get_manifest(&newDirPathIgnore,newPath,newManifest);
|
|
1849
|
+
}
|
|
1850
|
+
|
|
1851
|
+
if (diffSets.isDoDiff){
|
|
1852
|
+
double diff_time0=clock_s();
|
|
1853
|
+
try {
|
|
1854
|
+
check(hpatch_TFileStreamOutput_open(&diffData_out,outDiffFileName,hpatch_kNullStreamPos),
|
|
1855
|
+
HDIFF_OPENWRITE_ERROR,"open out diffFile");
|
|
1856
|
+
hpatch_TFileStreamOutput_setRandomOut(&diffData_out,hpatch_TRUE);
|
|
1857
|
+
DirDiffListener listener;
|
|
1858
|
+
dir_diff(&listener,oldManifest,newManifest,&diffData_out.base,
|
|
1859
|
+
compressPlugin,checksumPlugin,diffSets,kMaxOpenFileNumber);
|
|
1860
|
+
diffData_out.base.streamSize=diffData_out.out_length;
|
|
1861
|
+
}catch(const std::exception& e){
|
|
1862
|
+
check(false,DIRDIFF_DIFF_ERROR,"dir diff run an error: "+e.what());
|
|
1863
|
+
}
|
|
1864
|
+
printf("\ndiffDataSize : %" PRIu64 "\n",diffData_out.base.streamSize);
|
|
1865
|
+
printf("dir diff time: %.3f s\n",(clock_s()-diff_time0));
|
|
1866
|
+
check(hpatch_TFileStreamOutput_close(&diffData_out),HDIFF_FILECLOSE_ERROR,"out diffFile close");
|
|
1867
|
+
printf(" out dirDiffFile ok!\n");
|
|
1868
|
+
}
|
|
1869
|
+
if (diffSets.isDoPatchCheck){
|
|
1870
|
+
double patch_time0=clock_s();
|
|
1871
|
+
printf("\nload %sdirDiffFile for test by patch check:\n",isManifest?"manifest ":"");
|
|
1872
|
+
check(hpatch_TFileStreamInput_open(&diffData_in,outDiffFileName),
|
|
1873
|
+
HDIFF_OPENREAD_ERROR,"open check diffFile");
|
|
1874
|
+
printf("diffDataSize : %" PRIu64 "\n",diffData_in.base.streamSize);
|
|
1875
|
+
hpatch_TDecompress _decompressPlugin={0};
|
|
1876
|
+
hpatch_TDecompress* saved_decompressPlugin=&_decompressPlugin;
|
|
1877
|
+
hpatch_TChecksum* saved_checksumPlugin=0;
|
|
1878
|
+
{
|
|
1879
|
+
TDirDiffInfo dirinfo;
|
|
1880
|
+
check(getDirDiffInfo(&dirinfo,&diffData_in.base),DIRDIFF_PATCH_ERROR,"get dir diff info");
|
|
1881
|
+
check(dirinfo.isDirDiff,DIRDIFF_PATCH_ERROR,"dir diffFile data");
|
|
1882
|
+
check(findDecompress(saved_decompressPlugin,dirinfo.hdiffInfo.compressType),
|
|
1883
|
+
DIRDIFF_PATCH_ERROR,"diff data saved compress type");
|
|
1884
|
+
if (saved_decompressPlugin->open==0) saved_decompressPlugin=0;
|
|
1885
|
+
else saved_decompressPlugin->decError=hpatch_dec_ok;
|
|
1886
|
+
check(findChecksum(&saved_checksumPlugin,dirinfo.checksumType),
|
|
1887
|
+
DIRDIFF_PATCH_ERROR,"diff data saved checksum type");
|
|
1888
|
+
|
|
1889
|
+
}
|
|
1890
|
+
//check(check_dirOldDataChecksum(oldPath.c_str(),&diffData_in.base,
|
|
1891
|
+
// saved_decompressPlugin,saved_checksumPlugin),
|
|
1892
|
+
// DIRDIFF_PATCH_ERROR,"part diff data check_dirOldDataChecksum");
|
|
1893
|
+
DirDiffListener listener;
|
|
1894
|
+
check(check_dirdiff(&listener,oldManifest,newManifest,&diffData_in.base,
|
|
1895
|
+
saved_decompressPlugin,saved_checksumPlugin,kMaxOpenFileNumber),
|
|
1896
|
+
DIRDIFF_PATCH_ERROR,"dir patch check diff data");
|
|
1897
|
+
|
|
1898
|
+
printf("dir patch time: %.3f s\n",(clock_s()-patch_time0));
|
|
1899
|
+
printf(" patch check diff data ok!\n");
|
|
1900
|
+
}
|
|
1901
|
+
|
|
1902
|
+
printf("\nall time: %.3f s\n",(clock_s()-time0));
|
|
1903
|
+
clear:
|
|
1904
|
+
_isInClear=true;
|
|
1905
|
+
check(hpatch_TFileStreamOutput_close(&diffData_out),HDIFF_FILECLOSE_ERROR,"out diffFile close");
|
|
1906
|
+
check(hpatch_TFileStreamInput_close(&diffData_in),HDIFF_FILECLOSE_ERROR,"in diffFile close");
|
|
1907
|
+
return result;
|
|
1908
|
+
}
|
|
1909
|
+
|
|
1910
|
+
int create_manifest(const char* _inputPath,const char* outManifestFileName,
|
|
1911
|
+
hpatch_TChecksum* checksumPlugin,const std::vector<std::string>& ignorePathList){
|
|
1912
|
+
double time0=clock_s();
|
|
1913
|
+
int result=HDIFF_SUCCESS;
|
|
1914
|
+
bool _isInClear=false;
|
|
1915
|
+
std::string inputPath(_inputPath);
|
|
1916
|
+
{
|
|
1917
|
+
hpatch_TPathType inputType;
|
|
1918
|
+
check(hpatch_getPathStat(_inputPath,&inputType,0),HDIFF_PATHTYPE_ERROR,"get inputPath type");
|
|
1919
|
+
check((inputType!=kPathType_notExist),HDIFF_PATHTYPE_ERROR,"inputPath not exist");
|
|
1920
|
+
hpatch_BOOL inputIsDir=(inputType==kPathType_dir);
|
|
1921
|
+
if (inputIsDir) assignDirTag(inputPath);
|
|
1922
|
+
std::string fnameInfo=std::string("")
|
|
1923
|
+
+(inputIsDir? "inputDir : \"":"inputFile: \"")+inputPath+"\"\n"
|
|
1924
|
+
+ "outManifest: \""+outManifestFileName+"\"\n";
|
|
1925
|
+
hpatch_printPath_utf8(fnameInfo.c_str());
|
|
1926
|
+
}
|
|
1927
|
+
{
|
|
1928
|
+
const char* checksumType="";
|
|
1929
|
+
if (checksumPlugin) checksumType=checksumPlugin->checksumType();
|
|
1930
|
+
printf("hdiffz run create Manifest with checksum plugin: \"%s\"\n",checksumType);
|
|
1931
|
+
printf("\n");
|
|
1932
|
+
}
|
|
1933
|
+
|
|
1934
|
+
hpatch_TFileStreamOutput manifestData_out;
|
|
1935
|
+
hpatch_TFileStreamOutput_init(&manifestData_out);
|
|
1936
|
+
{//create
|
|
1937
|
+
try {
|
|
1938
|
+
std::vector<std::string> emptyPathList;
|
|
1939
|
+
check(hpatch_TFileStreamOutput_open(&manifestData_out,outManifestFileName,hpatch_kNullStreamPos),
|
|
1940
|
+
HDIFF_OPENWRITE_ERROR,"open out manifestFile");
|
|
1941
|
+
//hpatch_TFileStreamOutput_setRandomOut(&manifestData_out,hpatch_TRUE);
|
|
1942
|
+
DirPathIgnoreListener dirPathIgnore(ignorePathList,emptyPathList);
|
|
1943
|
+
save_manifest(&dirPathIgnore,inputPath,&manifestData_out.base,checksumPlugin);
|
|
1944
|
+
manifestData_out.base.streamSize=manifestData_out.out_length;
|
|
1945
|
+
}catch(const std::exception& e){
|
|
1946
|
+
check(false,MANIFEST_CREATE_ERROR,"create manifest run an error: "+e.what());
|
|
1947
|
+
}
|
|
1948
|
+
printf("\nManifestFile size: %" PRIu64 "\n",manifestData_out.base.streamSize);
|
|
1949
|
+
check(hpatch_TFileStreamOutput_close(&manifestData_out),HDIFF_FILECLOSE_ERROR,"check manifestFile close");
|
|
1950
|
+
printf(" out manifestFile ok!\n");
|
|
1951
|
+
printf("create manifest time: %.3f s\n",(clock_s()-time0));
|
|
1952
|
+
}
|
|
1953
|
+
{//test
|
|
1954
|
+
double time1=clock_s();
|
|
1955
|
+
TManifest manifest;
|
|
1956
|
+
try {
|
|
1957
|
+
check_manifest(manifest,inputPath,outManifestFileName);
|
|
1958
|
+
}catch(const std::exception& e){
|
|
1959
|
+
check(false,MANIFEST_TEST_ERROR,"test manifestFile found an error: "+e.what());
|
|
1960
|
+
}
|
|
1961
|
+
printf(" test manifestFile ok!\n");
|
|
1962
|
+
printf("test manifest time: %.3f s\n",(clock_s()-time1));
|
|
1963
|
+
}
|
|
1964
|
+
|
|
1965
|
+
printf("\nall time: %.3f s\n",(clock_s()-time0));
|
|
1966
|
+
clear:
|
|
1967
|
+
_isInClear=true;
|
|
1968
|
+
check(hpatch_TFileStreamOutput_close(&manifestData_out),HDIFF_FILECLOSE_ERROR,"check manifestFile close");
|
|
1969
|
+
return result;
|
|
1970
|
+
}
|
|
1971
|
+
#endif //_IS_NEED_DIR_DIFF_PATCH
|