react-native-update 10.34.3 → 10.34.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/harmony/pushy/src/main/cpp/HDiffPatch/CHANGELOG.md +34 -172
- package/harmony/pushy/src/main/cpp/HDiffPatch/LICENSE +4 -4
- package/harmony/pushy/src/main/cpp/HDiffPatch/Makefile +63 -379
- package/harmony/pushy/src/main/cpp/HDiffPatch/README.md +170 -415
- package/harmony/pushy/src/main/cpp/HDiffPatch/_atosize.h +10 -54
- package/harmony/pushy/src/main/cpp/HDiffPatch/_clock_for_demo.h +1 -13
- package/harmony/pushy/src/main/cpp/HDiffPatch/builds/android_ndk_jni_mk/Android.mk +18 -171
- package/harmony/pushy/src/main/cpp/HDiffPatch/builds/android_ndk_jni_mk/Application.mk +4 -5
- package/harmony/pushy/src/main/cpp/HDiffPatch/builds/android_ndk_jni_mk/hpatch.c +7 -38
- package/harmony/pushy/src/main/cpp/HDiffPatch/builds/android_ndk_jni_mk/hpatch.h +4 -15
- package/harmony/pushy/src/main/cpp/HDiffPatch/builds/android_ndk_jni_mk/hpatch_jni.c +12 -22
- package/harmony/pushy/src/main/cpp/HDiffPatch/builds/android_ndk_jni_mk/java/com/github/sisong/HPatch.java +4 -22
- package/harmony/pushy/src/main/cpp/HDiffPatch/builds/codeblocks/HDiffPatch.workspace +8 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/builds/codeblocks/HDiffZ.cbp +219 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/builds/codeblocks/HPatchZ.cbp +156 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/builds/codeblocks/unitTest.cbp +65 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/HDiffPatch.sln +105 -155
- package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/HDiffZ.vcxproj +236 -363
- package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/HDiffZ.vcxproj.user +3 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/HPatchZ.vcxproj +317 -347
- package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/HPatchZ.vcxproj.user +3 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/unitTest.vcxproj +181 -295
- package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/unitTest.vcxproj.user +3 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode/HDiffPatch.xcworkspace/contents.xcworkspacedata +0 -9
- package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode/bestParams.xcodeproj/project.pbxproj +14 -53
- package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode/hdiffz.xcodeproj/project.pbxproj +32 -162
- package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode/hpatchz.xcodeproj/project.pbxproj +22 -89
- package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode/lzma.xcodeproj/project.pbxproj +13 -237
- package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode/testHashClash.xcodeproj/project.pbxproj +2 -2
- package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode/unitTest.xcodeproj/project.pbxproj +14 -194
- package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode/zstd.xcodeproj/project.pbxproj +10 -30
- package/harmony/pushy/src/main/cpp/HDiffPatch/checksum_plugin_demo.h +3 -458
- package/harmony/pushy/src/main/cpp/HDiffPatch/compress_parallel.cpp +71 -106
- package/harmony/pushy/src/main/cpp/HDiffPatch/compress_parallel.h +3 -3
- package/harmony/pushy/src/main/cpp/HDiffPatch/compress_plugin_demo.h +110 -484
- package/harmony/pushy/src/main/cpp/HDiffPatch/decompress_plugin_demo.h +193 -835
- package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_diff/dir_diff.cpp +50 -99
- package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_diff/dir_diff.h +4 -18
- package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_diff/dir_diff_tools.cpp +8 -147
- package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_diff/dir_diff_tools.h +6 -18
- package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_diff/dir_manifest.cpp +25 -7
- package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_diff/file_for_dirDiff.h +113 -5
- package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/dir_patch.c +97 -163
- package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/dir_patch.h +39 -49
- package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/dir_patch_tools.c +15 -15
- package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/dir_patch_tools.h +2 -18
- package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/dir_patch_types.h +4 -8
- package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/new_dir_output.c +57 -72
- package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/new_dir_output.h +13 -18
- package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/new_stream.c +1 -1
- package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/new_stream.h +2 -2
- package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/ref_stream.c +2 -2
- package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/ref_stream.h +2 -2
- package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/res_handle_limit.c +2 -2
- package/harmony/pushy/src/main/cpp/HDiffPatch/dirDiffPatch/dir_patch/res_handle_limit.h +1 -1
- package/harmony/pushy/src/main/cpp/HDiffPatch/file_for_patch.c +100 -311
- package/harmony/pushy/src/main/cpp/HDiffPatch/file_for_patch.h +72 -53
- package/harmony/pushy/src/main/cpp/HDiffPatch/hdiffz.cpp +487 -888
- package/harmony/pushy/src/main/cpp/HDiffPatch/hpatch_dir_listener.h +28 -45
- package/harmony/pushy/src/main/cpp/HDiffPatch/hpatchz.c +247 -812
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/diff.cpp +544 -1265
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/diff.h +38 -123
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/diff_types.h +0 -115
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/bytes_rle.cpp +102 -272
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/bytes_rle.h +12 -22
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/compress_detect.cpp +4 -18
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/compress_detect.h +5 -7
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/{divsufsort.cpp → divsufsort.c} +8 -5
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/divsufsort.c.inc.h +164 -91
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/divsufsort.h +102 -5
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/divsufsort64.c +13 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/divsufsort64.h +97 -1
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/divsufsort_private.h +44 -23
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/sssort.c.inc.h +89 -54
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/trsort.c.inc.h +55 -48
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/utils.c.inc.h +381 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/adler_roll.c +47 -110
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/adler_roll.h +4 -11
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/bloom_filter.h +26 -53
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/covers.h +25 -103
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/digest_matcher.cpp +130 -271
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/digest_matcher.h +7 -17
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/stream_serialize.cpp +37 -628
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/stream_serialize.h +43 -203
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/mem_buf.h +10 -14
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/pack_uint.h +7 -22
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/suffix_string.cpp +46 -132
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/suffix_string.h +9 -48
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/patch.c +299 -650
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/patch.h +82 -120
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/patch_private.h +7 -87
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/patch_types.h +9 -119
- package/harmony/pushy/src/main/cpp/HDiffPatch/libParallel/parallel_channel.cpp +6 -2
- package/harmony/pushy/src/main/cpp/HDiffPatch/libParallel/parallel_channel.h +15 -192
- package/harmony/pushy/src/main/cpp/HDiffPatch/libParallel/parallel_import.cpp +367 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/libParallel/parallel_import.h +56 -31
- package/harmony/pushy/src/main/cpp/HDiffPatch/test/_private_searchBestParams.cpp +1 -1
- package/harmony/pushy/src/main/cpp/HDiffPatch/test/hpatchz_test.cpp +1 -0
- package/harmony/pushy/src/main/cpp/HDiffPatch/test/testHashClash.cpp +31 -225
- package/harmony/pushy/src/main/cpp/HDiffPatch/test/unit_test.cpp +94 -566
- package/harmony/pushy/src/main/cpp/lzma/Asm/x86/7zAsm.asm +28 -222
- package/harmony/pushy/src/main/cpp/lzma/Asm/x86/7zCrcOpt.asm +117 -228
- package/harmony/pushy/src/main/cpp/lzma/Asm/x86/AesOpt.asm +173 -678
- package/harmony/pushy/src/main/cpp/lzma/Asm/x86/LzmaDecOpt.asm +22 -103
- package/harmony/pushy/src/main/cpp/lzma/Asm/x86/XzCrc64Opt.asm +167 -485
- package/harmony/pushy/src/main/cpp/lzma/C/7z.h +6 -8
- package/harmony/pushy/src/main/cpp/lzma/C/7zAlloc.c +30 -39
- package/harmony/pushy/src/main/cpp/lzma/C/7zAlloc.h +3 -3
- package/harmony/pushy/src/main/cpp/lzma/C/7zArcIn.c +217 -232
- package/harmony/pushy/src/main/cpp/lzma/C/7zBuf.h +3 -3
- package/harmony/pushy/src/main/cpp/lzma/C/7zCrc.c +68 -404
- package/harmony/pushy/src/main/cpp/lzma/C/7zCrc.h +6 -9
- package/harmony/pushy/src/main/cpp/lzma/C/7zCrcOpt.c +79 -163
- package/harmony/pushy/src/main/cpp/lzma/C/7zDec.c +78 -160
- package/harmony/pushy/src/main/cpp/lzma/C/7zFile.c +58 -215
- package/harmony/pushy/src/main/cpp/lzma/C/7zFile.h +6 -15
- package/harmony/pushy/src/main/cpp/lzma/C/7zStream.c +23 -46
- package/harmony/pushy/src/main/cpp/lzma/C/7zTypes.h +89 -311
- package/harmony/pushy/src/main/cpp/lzma/C/7zVersion.h +5 -5
- package/harmony/pushy/src/main/cpp/lzma/C/Aes.c +68 -191
- package/harmony/pushy/src/main/cpp/lzma/C/Aes.h +8 -30
- package/harmony/pushy/src/main/cpp/lzma/C/AesOpt.c +108 -926
- package/harmony/pushy/src/main/cpp/lzma/C/Alloc.c +96 -246
- package/harmony/pushy/src/main/cpp/lzma/C/Alloc.h +8 -33
- package/harmony/pushy/src/main/cpp/lzma/C/Bcj2.c +144 -177
- package/harmony/pushy/src/main/cpp/lzma/C/Bcj2.h +42 -228
- package/harmony/pushy/src/main/cpp/lzma/C/Bcj2Enc.c +182 -377
- package/harmony/pushy/src/main/cpp/lzma/C/Bra.c +143 -622
- package/harmony/pushy/src/main/cpp/lzma/C/Bra.h +40 -81
- package/harmony/pushy/src/main/cpp/lzma/C/Bra86.c +58 -163
- package/harmony/pushy/src/main/cpp/lzma/C/BraIA64.c +48 -9
- package/harmony/pushy/src/main/cpp/lzma/C/Compiler.h +15 -228
- package/harmony/pushy/src/main/cpp/lzma/C/CpuArch.c +133 -885
- package/harmony/pushy/src/main/cpp/lzma/C/CpuArch.h +78 -428
- package/harmony/pushy/src/main/cpp/lzma/C/Delta.c +31 -136
- package/harmony/pushy/src/main/cpp/lzma/C/Delta.h +3 -3
- package/harmony/pushy/src/main/cpp/lzma/C/DllSecur.c +62 -53
- package/harmony/pushy/src/main/cpp/lzma/C/DllSecur.h +5 -5
- package/harmony/pushy/src/main/cpp/lzma/C/LzFind.c +495 -1114
- package/harmony/pushy/src/main/cpp/lzma/C/LzFind.h +25 -64
- package/harmony/pushy/src/main/cpp/lzma/C/LzFindMt.c +400 -969
- package/harmony/pushy/src/main/cpp/lzma/C/LzFindMt.h +24 -37
- package/harmony/pushy/src/main/cpp/lzma/C/LzHash.h +48 -25
- package/harmony/pushy/src/main/cpp/lzma/C/Lzma2Dec.c +7 -12
- package/harmony/pushy/src/main/cpp/lzma/C/Lzma2Dec.h +7 -8
- package/harmony/pushy/src/main/cpp/lzma/C/Lzma2DecMt.c +83 -96
- package/harmony/pushy/src/main/cpp/lzma/C/Lzma2DecMt.h +9 -11
- package/harmony/pushy/src/main/cpp/lzma/C/Lzma2Enc.c +92 -96
- package/harmony/pushy/src/main/cpp/lzma/C/Lzma2Enc.h +9 -12
- package/harmony/pushy/src/main/cpp/lzma/C/Lzma86.h +3 -3
- package/harmony/pushy/src/main/cpp/lzma/C/Lzma86Dec.c +4 -3
- package/harmony/pushy/src/main/cpp/lzma/C/Lzma86Enc.c +6 -3
- package/harmony/pushy/src/main/cpp/lzma/C/LzmaDec.c +206 -384
- package/harmony/pushy/src/main/cpp/lzma/C/LzmaDec.h +8 -11
- package/harmony/pushy/src/main/cpp/lzma/C/LzmaEnc.c +315 -489
- package/harmony/pushy/src/main/cpp/lzma/C/LzmaEnc.h +9 -18
- package/harmony/pushy/src/main/cpp/lzma/C/LzmaLib.c +3 -5
- package/harmony/pushy/src/main/cpp/lzma/C/LzmaLib.h +14 -21
- package/harmony/pushy/src/main/cpp/lzma/C/MtCoder.c +87 -90
- package/harmony/pushy/src/main/cpp/lzma/C/MtCoder.h +25 -28
- package/harmony/pushy/src/main/cpp/lzma/C/MtDec.c +88 -74
- package/harmony/pushy/src/main/cpp/lzma/C/MtDec.h +20 -21
- package/harmony/pushy/src/main/cpp/lzma/C/Ppmd.h +34 -118
- package/harmony/pushy/src/main/cpp/lzma/C/Ppmd7.c +293 -712
- package/harmony/pushy/src/main/cpp/lzma/C/Ppmd7.h +70 -109
- package/harmony/pushy/src/main/cpp/lzma/C/Ppmd7Dec.c +116 -237
- package/harmony/pushy/src/main/cpp/lzma/C/Ppmd7Enc.c +95 -245
- package/harmony/pushy/src/main/cpp/lzma/C/Precomp.h +5 -122
- package/harmony/pushy/src/main/cpp/lzma/C/RotateDefs.h +4 -24
- package/harmony/pushy/src/main/cpp/lzma/C/Sha256.c +143 -387
- package/harmony/pushy/src/main/cpp/lzma/C/Sha256.h +7 -67
- package/harmony/pushy/src/main/cpp/lzma/C/Sort.c +114 -241
- package/harmony/pushy/src/main/cpp/lzma/C/Sort.h +7 -4
- package/harmony/pushy/src/main/cpp/lzma/C/Threads.c +14 -731
- package/harmony/pushy/src/main/cpp/lzma/C/Threads.h +14 -204
- package/harmony/pushy/src/main/cpp/lzma/C/ThreadsP.c +396 -0
- package/harmony/pushy/src/main/cpp/lzma/C/ThreadsP.h +31 -0
- package/harmony/pushy/src/main/cpp/lzma/C/Util/7z/7z.dsp +2 -10
- package/harmony/pushy/src/main/cpp/lzma/C/Util/7z/7zMain.c +79 -282
- package/harmony/pushy/src/main/cpp/lzma/C/Util/7z/Precomp.h +7 -10
- package/harmony/pushy/src/main/cpp/lzma/C/Util/7z/makefile +3 -7
- package/harmony/pushy/src/main/cpp/lzma/C/Util/7z/makefile.gcc +75 -32
- package/harmony/pushy/src/main/cpp/lzma/C/Util/Lzma/LzmaUtil.c +56 -111
- package/harmony/pushy/src/main/cpp/lzma/C/Util/Lzma/LzmaUtil.dsp +0 -24
- package/harmony/pushy/src/main/cpp/lzma/C/Util/Lzma/makefile +0 -2
- package/harmony/pushy/src/main/cpp/lzma/C/Util/Lzma/makefile.gcc +41 -18
- package/harmony/pushy/src/main/cpp/lzma/C/Util/LzmaLib/LzmaLib.dsp +2 -30
- package/harmony/pushy/src/main/cpp/lzma/C/Util/LzmaLib/LzmaLibExports.c +6 -7
- package/harmony/pushy/src/main/cpp/lzma/C/Util/LzmaLib/makefile +2 -27
- package/harmony/pushy/src/main/cpp/lzma/C/Util/SfxSetup/Precomp.h +7 -10
- package/harmony/pushy/src/main/cpp/lzma/C/Util/SfxSetup/SfxSetup.c +22 -39
- package/harmony/pushy/src/main/cpp/lzma/C/Util/SfxSetup/makefile +2 -9
- package/harmony/pushy/src/main/cpp/lzma/C/Util/SfxSetup/makefile_con +1 -3
- package/harmony/pushy/src/main/cpp/lzma/C/Xz.c +3 -5
- package/harmony/pushy/src/main/cpp/lzma/C/Xz.h +47 -129
- package/harmony/pushy/src/main/cpp/lzma/C/XzCrc64.c +43 -97
- package/harmony/pushy/src/main/cpp/lzma/C/XzCrc64.h +8 -8
- package/harmony/pushy/src/main/cpp/lzma/C/XzCrc64Opt.c +36 -228
- package/harmony/pushy/src/main/cpp/lzma/C/XzDec.c +295 -405
- package/harmony/pushy/src/main/cpp/lzma/C/XzEnc.c +139 -194
- package/harmony/pushy/src/main/cpp/lzma/C/XzEnc.h +11 -15
- package/harmony/pushy/src/main/cpp/lzma/C/XzIn.c +134 -200
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/7zip.mak +6 -6
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Aes.mak +1 -4
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zCompressionMode.h +13 -29
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zDecode.cpp +90 -120
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zDecode.h +6 -9
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zEncode.cpp +140 -183
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zEncode.h +20 -23
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zExtract.cpp +57 -78
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zFolderInStream.cpp +44 -169
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zFolderInStream.h +17 -57
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zHandler.cpp +109 -141
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zHandler.h +57 -54
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zHandlerOut.cpp +116 -336
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zHeader.cpp +1 -1
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zHeader.h +9 -17
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zIn.cpp +136 -234
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zIn.h +26 -35
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zItem.h +5 -10
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zOut.cpp +155 -280
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zOut.h +40 -51
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zProperties.cpp +59 -67
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zProperties.h +2 -6
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zRegister.cpp +2 -8
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zSpecStream.cpp +3 -12
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zSpecStream.h +9 -23
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zUpdate.cpp +387 -975
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/7zUpdate.h +16 -44
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/7z/StdAfx.h +2 -5
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Archive.def +0 -2
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Archive2.def +0 -2
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/ArchiveExports.cpp +8 -15
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/CoderMixer2.cpp +87 -106
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/CoderMixer2.h +57 -57
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/DummyOutStream.cpp +1 -1
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/DummyOutStream.h +8 -6
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/HandlerOut.cpp +43 -126
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/HandlerOut.h +18 -77
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/InStreamWithCRC.cpp +9 -20
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/InStreamWithCRC.h +23 -20
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/ItemNameUtils.cpp +9 -61
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/ItemNameUtils.h +3 -8
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/MultiStream.cpp +27 -29
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/MultiStream.h +26 -23
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/OutStreamWithCRC.cpp +2 -2
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/OutStreamWithCRC.h +8 -6
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/ParseProperties.h +2 -2
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/Common/StdAfx.h +2 -5
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/DllExports2.cpp +10 -63
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/IArchive.h +173 -319
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/LzmaHandler.cpp +113 -92
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/SplitHandler.cpp +53 -47
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/StdAfx.h +2 -5
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/XzHandler.cpp +208 -352
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Archive/XzHandler.h +2 -2
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Asm.mak +3 -6
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/Alone7z/Alone.dsp +47 -227
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/Alone7z/StdAfx.h +2 -5
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/Alone7z/makefile +5 -19
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/Format7zExtractR/StdAfx.h +2 -5
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/Format7zExtractR/makefile +2 -4
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/Format7zR/StdAfx.h +2 -5
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/Format7zR/makefile +1 -6
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/LzmaCon/LzmaAlone.cpp +53 -71
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/LzmaCon/LzmaCon.dsp +22 -85
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/LzmaCon/StdAfx.h +2 -5
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/LzmaCon/makefile +4 -13
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/LzmaCon/makefile.gcc +166 -102
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXCon/SFXCon.dsp +4 -109
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXCon/SfxCon.cpp +30 -69
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXCon/StdAfx.h +2 -5
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXCon/makefile +7 -10
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXCon/resource.rc +1 -5
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXSetup/ExtractCallbackSfx.cpp +16 -16
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXSetup/ExtractCallbackSfx.h +12 -9
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXSetup/ExtractEngine.cpp +9 -7
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXSetup/ExtractEngine.h +2 -2
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXSetup/SFXSetup.dsp +5 -74
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXSetup/SfxSetup.cpp +51 -58
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXSetup/StdAfx.h +10 -3
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXSetup/makefile +5 -9
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXWin/SFXWin.dsp +6 -92
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXWin/SfxWin.cpp +19 -46
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXWin/StdAfx.h +11 -3
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXWin/makefile +5 -11
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXWin/resource.rc +0 -5
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/CWrappers.cpp +28 -136
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/CWrappers.h +5 -67
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/CreateCoder.cpp +62 -74
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/CreateCoder.h +24 -32
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/FilePathAutoRename.cpp +7 -7
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/FilePathAutoRename.h +2 -2
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/FileStreams.cpp +100 -548
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/FileStreams.h +86 -125
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/FilterCoder.cpp +116 -258
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/FilterCoder.h +76 -72
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/InBuffer.cpp +15 -34
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/InBuffer.h +9 -38
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/InOutTempBuffer.cpp +82 -192
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/InOutTempBuffer.h +28 -25
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/LimitedStreams.cpp +52 -78
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/LimitedStreams.h +83 -52
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/LockedStream.h +2 -2
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/MethodId.h +2 -2
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/MethodProps.cpp +67 -323
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/MethodProps.h +38 -123
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/OffsetStream.cpp +8 -6
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/OffsetStream.h +13 -9
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/OutBuffer.cpp +12 -12
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/OutBuffer.h +7 -74
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/ProgressUtils.cpp +5 -5
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/ProgressUtils.h +13 -11
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/PropId.cpp +1 -10
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/RegisterArc.h +14 -16
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/RegisterCodec.h +16 -16
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/StdAfx.h +2 -5
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/StreamBinder.cpp +50 -45
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/StreamBinder.h +21 -39
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/StreamObjects.cpp +42 -47
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/StreamObjects.h +53 -42
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/StreamUtils.cpp +4 -49
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/StreamUtils.h +2 -20
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/UniqBlocks.cpp +4 -4
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/UniqBlocks.h +5 -20
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/VirtThread.cpp +9 -8
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/VirtThread.h +5 -5
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/Bcj2Coder.cpp +355 -556
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/Bcj2Coder.h +59 -66
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/Bcj2Register.cpp +2 -2
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/BcjCoder.cpp +6 -6
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/BcjCoder.h +13 -19
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/BcjRegister.cpp +2 -2
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/BranchMisc.cpp +5 -88
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/BranchMisc.h +18 -42
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/BranchRegister.cpp +16 -33
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/ByteSwap.cpp +53 -52
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/CodecExports.cpp +30 -64
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/CopyCoder.cpp +22 -55
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/CopyCoder.h +26 -11
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/DeltaFilter.cpp +28 -26
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/Lzma2Decoder.cpp +28 -30
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/Lzma2Decoder.h +54 -45
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/Lzma2Encoder.cpp +12 -24
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/Lzma2Encoder.h +22 -10
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/Lzma2Register.cpp +1 -1
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/LzmaDecoder.cpp +26 -33
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/LzmaDecoder.h +51 -51
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/LzmaEncoder.cpp +40 -232
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/LzmaEncoder.h +14 -13
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/LzmaRegister.cpp +1 -1
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/PpmdDecoder.cpp +35 -84
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/PpmdDecoder.h +41 -42
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/PpmdEncoder.cpp +25 -66
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/PpmdEncoder.h +17 -8
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/PpmdRegister.cpp +1 -1
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/StdAfx.h +2 -5
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/XzDecoder.cpp +12 -13
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/XzDecoder.h +32 -26
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/XzEncoder.cpp +16 -14
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Compress/XzEncoder.h +20 -9
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Crc.mak +1 -1
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Crc64.mak +1 -1
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Crypto/7zAes.cpp +32 -67
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Crypto/7zAes.h +18 -30
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Crypto/7zAesRegister.cpp +3 -3
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Crypto/MyAes.cpp +43 -208
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Crypto/MyAes.h +25 -90
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Crypto/MyAesReg.cpp +4 -17
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Crypto/RandGen.cpp +21 -29
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Crypto/RandGen.h +3 -4
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Crypto/StdAfx.h +2 -5
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/GuiCommon.rc +3 -38
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Guid.txt +3 -26
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/ICoder.h +172 -253
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/IDecl.h +7 -55
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/IPassword.h +12 -43
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/IProgress.h +9 -10
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/IStream.h +50 -133
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/LzmaDec.mak +2 -4
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/MyVersionInfo.rc +1 -1
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/PropID.h +2 -53
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Client7z/Client7z.cpp +177 -329
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Client7z/Client7z.dsp +1 -97
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Client7z/StdAfx.h +2 -5
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Client7z/makefile +1 -2
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ArchiveCommandLine.cpp +183 -687
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ArchiveCommandLine.h +15 -49
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ArchiveExtractCallback.cpp +913 -2275
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ArchiveExtractCallback.h +115 -353
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ArchiveName.cpp +106 -127
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ArchiveName.h +3 -9
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ArchiveOpenCallback.cpp +35 -272
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ArchiveOpenCallback.h +64 -134
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/Bench.cpp +1200 -2608
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/Bench.h +20 -64
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/DefaultName.cpp +1 -1
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/DefaultName.h +2 -2
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/DirItem.h +36 -253
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/EnumDirItems.cpp +233 -774
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/EnumDirItems.h +6 -2
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ExitCode.h +2 -2
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/Extract.cpp +63 -156
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/Extract.h +10 -23
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ExtractMode.h +2 -12
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ExtractingFilePath.cpp +6 -22
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ExtractingFilePath.h +4 -4
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/HashCalc.cpp +65 -1991
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/HashCalc.h +29 -241
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/IFileExtractCallback.h +47 -45
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/LoadCodecs.cpp +179 -442
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/LoadCodecs.h +89 -147
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/OpenArchive.cpp +380 -529
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/OpenArchive.h +42 -75
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/PropIDUtils.cpp +86 -163
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/PropIDUtils.h +5 -5
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/Property.h +2 -2
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/SetProperties.cpp +15 -23
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/SetProperties.h +2 -2
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/SortUtils.h +2 -2
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/StdAfx.h +2 -5
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/TempFiles.cpp +1 -2
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/TempFiles.h +2 -5
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/Update.cpp +368 -595
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/Update.h +47 -68
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/UpdateAction.h +2 -2
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/UpdateCallback.cpp +146 -444
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/UpdateCallback.h +68 -103
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/UpdatePair.cpp +42 -111
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/UpdatePair.h +2 -2
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/UpdateProduce.cpp +3 -7
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/UpdateProduce.h +6 -11
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/WorkDir.cpp +35 -25
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/WorkDir.h +4 -8
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Common/ZipRegistry.h +9 -91
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/BenchCon.cpp +4 -4
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/BenchCon.h +2 -2
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/Console.mak +1 -4
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/Console.manifest +0 -3
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/ConsoleClose.cpp +19 -48
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/ConsoleClose.h +12 -18
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/ExtractCallbackConsole.cpp +41 -162
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/ExtractCallbackConsole.h +41 -88
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/HashCon.cpp +81 -140
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/HashCon.h +17 -27
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/List.cpp +124 -182
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/List.h +7 -22
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/Main.cpp +109 -590
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/MainAr.cpp +2 -62
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/OpenCallbackConsole.cpp +3 -3
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/OpenCallbackConsole.h +10 -17
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/PercentPrinter.cpp +10 -13
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/PercentPrinter.h +9 -13
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/StdAfx.h +2 -5
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/UpdateCallbackConsole.cpp +24 -320
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/UpdateCallbackConsole.h +26 -50
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/UserInputUtils.cpp +5 -13
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/UserInputUtils.h +2 -2
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/makefile +2 -6
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Explorer/MyMessages.cpp +6 -12
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Explorer/MyMessages.h +4 -4
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/BrowseDialog.cpp +195 -302
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/BrowseDialog.h +4 -15
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/ComboDialog.cpp +2 -2
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/ComboDialog.h +6 -6
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/DialogSize.h +2 -2
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/ExtractCallback.cpp +181 -416
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/ExtractCallback.h +197 -216
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/FormatUtils.h +2 -2
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/LangUtils.h +5 -13
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/MyWindowsNew.h +5 -48
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/OverwriteDialog.cpp +49 -215
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/OverwriteDialog.h +30 -50
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/OverwriteDialog.rc +1 -3
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/OverwriteDialogRes.h +3 -5
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/PasswordDialog.cpp +5 -5
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/PasswordDialog.h +6 -6
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/PasswordDialog.rc +0 -4
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/ProgressDialog.cpp +10 -15
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/ProgressDialog.h +17 -18
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/ProgressDialog2.cpp +130 -276
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/ProgressDialog2.h +52 -56
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/ProgressDialog2Res.h +1 -2
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/ProgressDialog2a.rc +3 -8
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/PropertyName.h +2 -2
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/PropertyNameRes.h +0 -9
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/SysIconUtils.cpp +89 -185
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/SysIconUtils.h +20 -23
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/resource.h +1 -23
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/resourceGui.h +0 -10
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/GUI/Extract.rc +4 -4
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/GUI/ExtractDialog.cpp +33 -36
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/GUI/ExtractDialog.h +15 -15
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/GUI/ExtractGUI.cpp +22 -39
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/GUI/ExtractGUI.h +3 -4
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/GUI/HashGUI.h +2 -2
- package/harmony/pushy/src/main/cpp/lzma/CPP/Build.mak +13 -109
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/AutoPtr.h +14 -25
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/CRC.cpp +1 -1
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/C_FileIO.cpp +90 -1
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/C_FileIO.h +49 -2
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/ComTry.h +2 -2
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/CommandLineParser.cpp +7 -41
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/CommandLineParser.h +3 -3
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/Common.h +29 -14
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/CrcReg.cpp +45 -24
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/Defs.h +2 -3
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/DynamicBuffer.h +5 -17
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/IntToString.cpp +110 -132
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/IntToString.h +9 -35
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/Lang.h +5 -12
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/ListFileUtils.cpp +31 -49
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/ListFileUtils.h +4 -4
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyBuffer.h +21 -59
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyBuffer2.h +10 -95
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyCom.h +81 -497
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyException.h +2 -2
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyGuidDef.h +9 -18
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyInitGuid.h +5 -17
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyLinux.h +2 -35
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyString.cpp +164 -347
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyString.h +35 -246
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyTypes.h +8 -11
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyUnknown.h +11 -2
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyVector.h +94 -184
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyWindows.cpp +11 -158
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/MyWindows.h +54 -148
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/NewHandler.cpp +27 -204
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/NewHandler.h +5 -38
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/Sha256Reg.cpp +16 -43
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/StdAfx.h +2 -2
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/StdInStream.cpp +11 -20
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/StdInStream.h +5 -13
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/StdOutStream.cpp +39 -124
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/StdOutStream.h +11 -27
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/StringConvert.cpp +15 -458
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/StringConvert.h +2 -24
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/StringToInt.cpp +89 -99
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/StringToInt.h +2 -19
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/TextConfig.cpp +11 -10
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/TextConfig.h +2 -2
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/UTFConvert.cpp +102 -677
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/UTFConvert.h +5 -377
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/Wildcard.cpp +84 -197
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/Wildcard.h +25 -107
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/XzCrc64Reg.cpp +14 -11
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/COM.h +8 -24
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/CommonDialog.cpp +113 -197
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/CommonDialog.h +12 -32
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/ComboBox.cpp +4 -4
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/ComboBox.h +10 -22
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/CommandBar.h +6 -6
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/Dialog.cpp +47 -242
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/Dialog.h +51 -94
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/Edit.h +2 -2
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/ImageList.h +4 -4
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/ListView.cpp +26 -33
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/ListView.h +22 -32
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/ProgressBar.h +13 -13
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/PropertyPage.cpp +34 -56
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/PropertyPage.h +9 -9
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/ReBar.h +3 -3
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/Static.h +2 -2
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/StatusBar.h +5 -5
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/StdAfx.h +2 -5
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/ToolBar.h +3 -3
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/Trackbar.h +2 -2
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/Window2.cpp +6 -8
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Control/Window2.h +7 -9
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/DLL.cpp +8 -77
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/DLL.h +10 -55
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Defs.h +4 -4
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/ErrorMsg.cpp +2 -69
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/ErrorMsg.h +2 -3
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileDir.cpp +80 -728
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileDir.h +7 -62
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileFind.cpp +56 -756
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileFind.h +19 -205
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileIO.cpp +47 -569
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileIO.h +28 -283
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileLink.cpp +112 -369
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileMapping.h +3 -3
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileName.cpp +113 -185
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileName.h +14 -41
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileSystem.cpp +10 -66
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/FileSystem.h +2 -6
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Handle.h +4 -6
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/MemoryLock.cpp +14 -29
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/MemoryLock.h +2 -2
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/NtCheck.h +2 -14
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/PropVariant.cpp +56 -102
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/PropVariant.h +9 -68
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/PropVariantConv.cpp +14 -150
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/PropVariantConv.h +3 -13
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Registry.cpp +128 -212
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Registry.h +20 -32
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/ResourceString.cpp +4 -4
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/ResourceString.h +2 -3
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/SecurityUtils.cpp +18 -23
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/SecurityUtils.h +56 -39
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Shell.cpp +58 -539
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Shell.h +14 -49
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/StdAfx.h +2 -5
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Synchronization.cpp +0 -77
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Synchronization.h +18 -240
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/System.cpp +38 -317
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/System.h +5 -154
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Thread.h +10 -18
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/TimeUtils.cpp +37 -291
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/TimeUtils.h +10 -124
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Window.cpp +7 -7
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Window.h +19 -98
- package/harmony/pushy/src/main/cpp/lzma/CS/7zip/Compress/LzmaAlone/LzmaAlone.csproj +90 -0
- package/harmony/pushy/src/main/cpp/lzma/DOC/Methods.txt +2 -6
- package/harmony/pushy/src/main/cpp/lzma/DOC/lzma-history.txt +0 -205
- package/harmony/pushy/src/main/cpp/lzma/DOC/lzma-sdk.txt +13 -93
- package/harmony/pushy/src/main/cpp/lzma/DOC/lzma.txt +13 -30
- 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/lzma.exe +0 -0
- package/harmony/pushy/src/main/cpp/lzma/bin/x64/7zr.exe +0 -0
- package/package.json +1 -1
- package/harmony/pushy/src/main/cpp/HDiffPatch/README_cn.md +0 -547
- package/harmony/pushy/src/main/cpp/HDiffPatch/_hextobytes.h +0 -112
- package/harmony/pushy/src/main/cpp/HDiffPatch/bsdiff_wrapper/bsdiff_wrapper.cpp +0 -389
- package/harmony/pushy/src/main/cpp/HDiffPatch/bsdiff_wrapper/bsdiff_wrapper.h +0 -73
- package/harmony/pushy/src/main/cpp/HDiffPatch/bsdiff_wrapper/bspatch_wrapper.c +0 -266
- package/harmony/pushy/src/main/cpp/HDiffPatch/bsdiff_wrapper/bspatch_wrapper.h +0 -58
- package/harmony/pushy/src/main/cpp/HDiffPatch/builds/android_ndk_jni_mk/build_libs_patchers.bat +0 -1
- package/harmony/pushy/src/main/cpp/HDiffPatch/builds/android_ndk_jni_mk/build_libs_patchers.sh +0 -1
- package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/bzip2.vcxproj +0 -228
- package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/hpatchz_test.vcxproj +0 -215
- package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/libdeflate.vcxproj +0 -256
- package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/longPathAware.exe.manifest +0 -7
- package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/lzma.vcxproj +0 -271
- package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/testHashClash.vcxproj +0 -228
- package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/zlib.vcxproj +0 -242
- package/harmony/pushy/src/main/cpp/HDiffPatch/builds/vc/zstd.vcxproj +0 -287
- package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode/HDiffPatch.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +0 -8
- package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode/libdeflate.xcodeproj/project.pbxproj +0 -286
- package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode/zlib.xcodeproj/project.pbxproj +0 -308
- package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode_iOS_hpatchz/hpatch_objc/hpatch_objc.h +0 -33
- package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode_iOS_hpatchz/hpatch_objc/hpatch_objc.m +0 -33
- package/harmony/pushy/src/main/cpp/HDiffPatch/builds/xcode_iOS_hpatchz/hpatchz.xcodeproj/project.pbxproj +0 -774
- package/harmony/pushy/src/main/cpp/HDiffPatch/hdiffz_import_patch.c +0 -31
- package/harmony/pushy/src/main/cpp/HDiffPatch/hdiffz_import_patch.h +0 -42
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/diff_for_hpatch_lite.h +0 -74
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/match_block.cpp +0 -478
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/match_block.h +0 -222
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/divsufsort64.cpp +0 -14
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/match_inplace.cpp +0 -168
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/match_inplace.h +0 -44
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HDiff/private_diff/qsort_parallel.h +0 -125
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/hpatch_mt/_hcache_old_mt.c +0 -243
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/hpatch_mt/_hcache_old_mt.h +0 -51
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/hpatch_mt/_hinput_mt.c +0 -153
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/hpatch_mt/_hinput_mt.h +0 -54
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/hpatch_mt/_houtput_mt.c +0 -158
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/hpatch_mt/_houtput_mt.h +0 -49
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/hpatch_mt/_hpatch_mt.c +0 -294
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/hpatch_mt/_hpatch_mt.h +0 -59
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/hpatch_mt/_patch_private_mt.h +0 -217
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/hpatch_mt/hpatch_mt.c +0 -349
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatch/hpatch_mt/hpatch_mt.h +0 -110
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatchLite/hpatch_lite.c +0 -366
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatchLite/hpatch_lite.h +0 -91
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatchLite/hpatch_lite_input_cache.h +0 -31
- package/harmony/pushy/src/main/cpp/HDiffPatch/libHDiffPatch/HPatchLite/hpatch_lite_types.h +0 -106
- package/harmony/pushy/src/main/cpp/HDiffPatch/libParallel/parallel_import_c.c +0 -497
- package/harmony/pushy/src/main/cpp/HDiffPatch/libParallel/parallel_import_c.h +0 -106
- package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sign_diff/_match_in_old_sign.cpp +0 -254
- package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sign_diff/_match_in_old_sign.h +0 -39
- package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sign_diff/_sign_diff_type.h +0 -37
- package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sign_diff/sign_diff.cpp +0 -62
- package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sign_diff/sign_diff.h +0 -44
- package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/dict_decompress_plugin.h +0 -156
- package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/dir_sync_client.cpp +0 -440
- package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/dir_sync_client.h +0 -88
- package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/match_in_old.cpp +0 -332
- package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/match_in_old.h +0 -48
- package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/match_in_types.h +0 -198
- package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/sync_client.cpp +0 -697
- package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/sync_client.h +0 -74
- package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/sync_client_private.h +0 -262
- package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/sync_client_type.h +0 -174
- package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/sync_client_type_private.h +0 -174
- package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/sync_diff_data.cpp +0 -252
- package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/sync_diff_data.h +0 -67
- package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/sync_info_client.cpp +0 -680
- package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_client/sync_info_client.h +0 -137
- package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_make/dict_compress_plugin.h +0 -83
- package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_make/dir_sync_make.cpp +0 -125
- package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_make/dir_sync_make.h +0 -56
- package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_make/hsynz_plugin.h +0 -55
- package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_make/match_in_new.cpp +0 -147
- package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_make/match_in_new.h +0 -38
- package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_make/sync_info_make.cpp +0 -354
- package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_make/sync_info_make.h +0 -76
- package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_make/sync_make.cpp +0 -521
- package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_make/sync_make.h +0 -69
- package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_make/sync_make_hash_clash.h +0 -122
- package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/sync_make/sync_make_private.h +0 -66
- package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/zsync_client_wrapper/zsync_client_type.h +0 -36
- package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/zsync_client_wrapper/zsync_client_type_private.h +0 -81
- package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/zsync_client_wrapper/zsync_client_wrapper.cpp +0 -247
- package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/zsync_client_wrapper/zsync_client_wrapper.h +0 -71
- package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/zsync_client_wrapper/zsync_info_client.cpp +0 -351
- package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/zsync_client_wrapper/zsync_info_client.h +0 -42
- package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/zsync_client_wrapper/zsync_match_in_old.cpp +0 -124
- package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/zsync_client_wrapper/zsync_match_in_old.h +0 -38
- package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/zsync_make_wrapper/zsync_info_make.cpp +0 -203
- package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/zsync_make_wrapper/zsync_info_make.h +0 -55
- package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/zsync_make_wrapper/zsync_make_wrapper.cpp +0 -79
- package/harmony/pushy/src/main/cpp/HDiffPatch/libhsync/zsync_make_wrapper/zsync_make_wrapper.h +0 -66
- package/harmony/pushy/src/main/cpp/HDiffPatch/vcdiff_wrapper/vcdiff_wrapper.cpp +0 -628
- package/harmony/pushy/src/main/cpp/HDiffPatch/vcdiff_wrapper/vcdiff_wrapper.h +0 -95
- package/harmony/pushy/src/main/cpp/HDiffPatch/vcdiff_wrapper/vcpatch_code_table.h +0 -78
- package/harmony/pushy/src/main/cpp/HDiffPatch/vcdiff_wrapper/vcpatch_wrapper.c +0 -950
- package/harmony/pushy/src/main/cpp/HDiffPatch/vcdiff_wrapper/vcpatch_wrapper.h +0 -72
- package/harmony/pushy/src/main/cpp/lzma/Asm/arm64/7zAsm.S +0 -181
- package/harmony/pushy/src/main/cpp/lzma/Asm/arm64/LzmaDecOpt.S +0 -1487
- package/harmony/pushy/src/main/cpp/lzma/Asm/x86/LzFindOpt.asm +0 -540
- package/harmony/pushy/src/main/cpp/lzma/Asm/x86/Sha256Opt.asm +0 -275
- package/harmony/pushy/src/main/cpp/lzma/Asm/x86/Sort.asm +0 -860
- package/harmony/pushy/src/main/cpp/lzma/C/7zWindows.h +0 -101
- package/harmony/pushy/src/main/cpp/lzma/C/7zip_gcc_c.mak +0 -360
- package/harmony/pushy/src/main/cpp/lzma/C/Asm_c.mak +0 -12
- package/harmony/pushy/src/main/cpp/lzma/C/LzFindOpt.c +0 -578
- package/harmony/pushy/src/main/cpp/lzma/C/Sha256Opt.c +0 -451
- package/harmony/pushy/src/main/cpp/lzma/C/SwapBytes.c +0 -835
- package/harmony/pushy/src/main/cpp/lzma/C/SwapBytes.h +0 -17
- package/harmony/pushy/src/main/cpp/lzma/C/Util/Lzma/Precomp.h +0 -13
- package/harmony/pushy/src/main/cpp/lzma/C/Util/LzmaLib/Precomp.c +0 -4
- package/harmony/pushy/src/main/cpp/lzma/C/Util/LzmaLib/Precomp.h +0 -13
- package/harmony/pushy/src/main/cpp/lzma/C/var_clang.mak +0 -11
- package/harmony/pushy/src/main/cpp/lzma/C/var_clang_arm64.mak +0 -12
- package/harmony/pushy/src/main/cpp/lzma/C/var_clang_x64.mak +0 -11
- package/harmony/pushy/src/main/cpp/lzma/C/var_clang_x86.mak +0 -11
- package/harmony/pushy/src/main/cpp/lzma/C/var_gcc.mak +0 -12
- package/harmony/pushy/src/main/cpp/lzma/C/var_gcc_arm64.mak +0 -12
- package/harmony/pushy/src/main/cpp/lzma/C/var_gcc_x64.mak +0 -10
- package/harmony/pushy/src/main/cpp/lzma/C/var_gcc_x86.mak +0 -10
- package/harmony/pushy/src/main/cpp/lzma/C/var_mac_arm64.mak +0 -11
- package/harmony/pushy/src/main/cpp/lzma/C/var_mac_x64.mak +0 -11
- package/harmony/pushy/src/main/cpp/lzma/C/warn_clang.mak +0 -1
- package/harmony/pushy/src/main/cpp/lzma/C/warn_clang_mac.mak +0 -1
- package/harmony/pushy/src/main/cpp/lzma/C/warn_gcc.mak +0 -51
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/7zip_gcc.mak +0 -1370
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/Alone7z/makefile.gcc +0 -279
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Bundles/SFXCon/makefile.gcc +0 -215
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/MultiOutStream.cpp +0 -855
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Common/MultiOutStream.h +0 -160
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/LzFindOpt.mak +0 -7
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/LzmaDec_gcc.mak +0 -14
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Sha256.mak +0 -13
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/Sort.mak +0 -6
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Client7z/makefile.gcc +0 -72
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/Console/makefile.gcc +0 -187
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/MemDialog.cpp +0 -218
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/MemDialog.h +0 -48
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/MemDialogRes.h +0 -13
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/FileManager/StdAfx.h +0 -67
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/UI/GUI/7zG.exe.manifest +0 -23
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/cmpl_clang.mak +0 -3
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/cmpl_clang_arm64.mak +0 -3
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/cmpl_clang_x64.mak +0 -3
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/cmpl_clang_x86.mak +0 -3
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/cmpl_gcc.mak +0 -3
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/cmpl_gcc_arm64.mak +0 -3
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/cmpl_gcc_x64.mak +0 -3
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/cmpl_gcc_x86.mak +0 -3
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/cmpl_mac_arm64.mak +0 -3
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/cmpl_mac_x64.mak +0 -3
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/var_clang.mak +0 -11
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/var_clang_arm64.mak +0 -19
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/var_clang_x64.mak +0 -11
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/var_clang_x86.mak +0 -11
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/var_gcc.mak +0 -12
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/var_gcc_arm64.mak +0 -12
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/var_gcc_x64.mak +0 -11
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/var_gcc_x86.mak +0 -10
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/var_mac_arm64.mak +0 -13
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/var_mac_x64.mak +0 -11
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/warn_clang.mak +0 -3
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/warn_clang_mac.mak +0 -9
- package/harmony/pushy/src/main/cpp/lzma/CPP/7zip/warn_gcc.mak +0 -55
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/Common0.h +0 -330
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/DynLimBuf.cpp +0 -93
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/DynLimBuf.h +0 -41
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/LzFindPrepare.cpp +0 -7
- package/harmony/pushy/src/main/cpp/lzma/CPP/Common/Sha256Prepare.cpp +0 -7
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Clipboard.cpp +0 -130
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/Clipboard.h +0 -28
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/MemoryGlobal.cpp +0 -36
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/MemoryGlobal.h +0 -55
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/SystemInfo.cpp +0 -1251
- package/harmony/pushy/src/main/cpp/lzma/CPP/Windows/SystemInfo.h +0 -19
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
/*
|
|
5
5
|
This is the HDiffPatch copyright.
|
|
6
6
|
|
|
7
|
-
Copyright (c) 2012-
|
|
7
|
+
Copyright (c) 2012-2019 HouSisong All Rights Reserved.
|
|
8
8
|
|
|
9
9
|
Permission is hereby granted, free of charge, to any person
|
|
10
10
|
obtaining a copy of this software and associated documentation
|
|
@@ -30,47 +30,20 @@
|
|
|
30
30
|
|
|
31
31
|
#include <string.h>
|
|
32
32
|
#include <stdlib.h>
|
|
33
|
-
#include <stdio.h>
|
|
33
|
+
#include <stdio.h> //fprintf
|
|
34
34
|
#include "libHDiffPatch/HPatch/patch.h"
|
|
35
35
|
#include "_clock_for_demo.h"
|
|
36
36
|
#include "_atosize.h"
|
|
37
37
|
#include "file_for_patch.h"
|
|
38
|
-
|
|
38
|
+
|
|
39
39
|
#if (_IS_NEED_DIR_DIFF_PATCH)
|
|
40
|
+
#include "dirDiffPatch/dir_patch/dir_patch.h"
|
|
40
41
|
#include "hpatch_dir_listener.h"
|
|
41
42
|
#endif
|
|
42
43
|
|
|
43
|
-
#ifndef _IS_NEED_PRINT_LOG
|
|
44
|
-
# define _IS_NEED_PRINT_LOG 1
|
|
45
|
-
#endif
|
|
46
|
-
#if (_IS_NEED_PRINT_LOG)
|
|
47
|
-
# define _log_info_utf8 hpatch_printPath_utf8
|
|
48
|
-
#else
|
|
49
|
-
# define printf(...)
|
|
50
|
-
# define _log_info_utf8(...) do{}while(0)
|
|
51
|
-
#endif
|
|
52
|
-
#ifndef _IS_NEED_PRINT_PROGRESS
|
|
53
|
-
# define _IS_NEED_PRINT_PROGRESS _IS_NEED_PRINT_LOG
|
|
54
|
-
#endif
|
|
55
|
-
|
|
56
44
|
#ifndef _IS_NEED_MAIN
|
|
57
45
|
# define _IS_NEED_MAIN 1
|
|
58
46
|
#endif
|
|
59
|
-
#if (_IS_NEED_MAIN && _IS_USED_MULTITHREAD)
|
|
60
|
-
# include "libParallel/parallel_import_c.h"
|
|
61
|
-
#endif
|
|
62
|
-
#ifndef _IS_NEED_CMDLINE
|
|
63
|
-
# define _IS_NEED_CMDLINE 1
|
|
64
|
-
#endif
|
|
65
|
-
#ifndef _IS_NEED_SINGLE_STREAM_DIFF
|
|
66
|
-
# define _IS_NEED_SINGLE_STREAM_DIFF 1
|
|
67
|
-
#endif
|
|
68
|
-
#ifndef _IS_NEED_BSDIFF
|
|
69
|
-
# define _IS_NEED_BSDIFF 1
|
|
70
|
-
#endif
|
|
71
|
-
#ifndef _IS_NEED_VCDIFF
|
|
72
|
-
# define _IS_NEED_VCDIFF 1
|
|
73
|
-
#endif
|
|
74
47
|
#ifndef _IS_NEED_SFX
|
|
75
48
|
# define _IS_NEED_SFX 1
|
|
76
49
|
#endif
|
|
@@ -84,46 +57,17 @@
|
|
|
84
57
|
#endif
|
|
85
58
|
#if (_IS_NEED_DEFAULT_CompressPlugin)
|
|
86
59
|
//===== select needs decompress plugins or change to your plugin=====
|
|
87
|
-
#
|
|
88
|
-
# define _IS_NEED_decompressor_ldef_replace_zlib 0
|
|
89
|
-
# endif
|
|
90
|
-
# if (_IS_NEED_decompressor_ldef_replace_zlib)
|
|
91
|
-
# define _CompressPlugin_ldef //optimized zlib&ldef's deflate code decompress speed by libdeflate
|
|
92
|
-
# else
|
|
93
|
-
# define _CompressPlugin_zlib
|
|
94
|
-
# endif
|
|
60
|
+
# define _CompressPlugin_zlib
|
|
95
61
|
# define _CompressPlugin_bz2
|
|
96
62
|
# define _CompressPlugin_lzma
|
|
97
63
|
# define _CompressPlugin_lzma2
|
|
98
|
-
# define _CompressPlugin_zstd
|
|
99
|
-
#if (_IS_NEED_VCDIFF)
|
|
100
|
-
# define _CompressPlugin_7zXZ
|
|
101
|
-
#endif
|
|
102
64
|
#endif
|
|
103
65
|
#if (_IS_NEED_ALL_CompressPlugin)
|
|
104
66
|
//===== select needs decompress plugins or change to your plugin=====
|
|
105
67
|
# define _CompressPlugin_lz4 // || _CompressPlugin_lz4hc
|
|
68
|
+
# define _CompressPlugin_zstd
|
|
106
69
|
# define _CompressPlugin_brotli
|
|
107
70
|
# define _CompressPlugin_lzham
|
|
108
|
-
# define _CompressPlugin_tuz
|
|
109
|
-
#endif
|
|
110
|
-
#ifdef _CompressPlugin_ldef
|
|
111
|
-
# ifndef _CompressPlugin_ldef_is_use_zlib
|
|
112
|
-
# define _CompressPlugin_ldef_is_use_zlib 1 //now ldef need zlib decompressor for any all of deflate code
|
|
113
|
-
# endif
|
|
114
|
-
# if (_IS_NEED_decompressor_ldef_replace_zlib&&(defined(_CompressPlugin_zlib)))
|
|
115
|
-
# undef _CompressPlugin_zlib
|
|
116
|
-
# endif
|
|
117
|
-
#endif
|
|
118
|
-
|
|
119
|
-
#if (_IS_NEED_BSDIFF)
|
|
120
|
-
# include "bsdiff_wrapper/bspatch_wrapper.h"
|
|
121
|
-
# ifndef _CompressPlugin_bz2
|
|
122
|
-
# define _CompressPlugin_bz2 //bsdiff4 need bz2
|
|
123
|
-
# endif
|
|
124
|
-
#endif
|
|
125
|
-
#if (_IS_NEED_VCDIFF)
|
|
126
|
-
# include "vcdiff_wrapper/vcpatch_wrapper.h"
|
|
127
71
|
#endif
|
|
128
72
|
|
|
129
73
|
#include "decompress_plugin_demo.h"
|
|
@@ -139,11 +83,8 @@
|
|
|
139
83
|
#endif
|
|
140
84
|
#if (_IS_NEED_DEFAULT_ChecksumPlugin)
|
|
141
85
|
//===== select needs checksum plugins or change to your plugin=====
|
|
142
|
-
# define _ChecksumPlugin_crc32 //
|
|
86
|
+
# define _ChecksumPlugin_crc32 // = 32 bit effective //need zlib
|
|
143
87
|
# define _ChecksumPlugin_fadler64 // ? 63 bit effective
|
|
144
|
-
# define _ChecksumPlugin_md5 // 128 bit
|
|
145
|
-
# define _ChecksumPlugin_xxh3 // 64 bit fast
|
|
146
|
-
# define _ChecksumPlugin_xxh128 // 128 bit fast
|
|
147
88
|
#endif
|
|
148
89
|
#if (_IS_NEED_ALL_ChecksumPlugin)
|
|
149
90
|
//===== select needs checksum plugins or change to your plugin=====
|
|
@@ -151,84 +92,39 @@
|
|
|
151
92
|
# define _ChecksumPlugin_adler64 // ? 30 bit effective
|
|
152
93
|
# define _ChecksumPlugin_fadler32 // ~ 32 bit effective
|
|
153
94
|
# define _ChecksumPlugin_fadler128// ? 81 bit effective
|
|
154
|
-
# define
|
|
95
|
+
# define _ChecksumPlugin_md5 // ? 128 bit effective
|
|
155
96
|
#endif
|
|
156
97
|
|
|
98
|
+
|
|
157
99
|
#include "checksum_plugin_demo.h"
|
|
158
100
|
#endif
|
|
159
101
|
|
|
160
|
-
#if (_IS_NEED_CMDLINE)
|
|
161
102
|
static void printVersion(){
|
|
162
|
-
printf("HDiffPatch::hpatchz v" HDIFFPATCH_VERSION_STRING "\n");
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
static void printHelpInfo(){
|
|
166
|
-
printf(" -h (or -?)\n"
|
|
167
|
-
" print usage info.\n");
|
|
103
|
+
printf("HDiffPatch::hpatchz v" HDIFFPATCH_VERSION_STRING "\n\n");
|
|
168
104
|
}
|
|
169
105
|
|
|
170
|
-
int hpatch_printFilesInfos(int fileCount,const char* fileNames[]);
|
|
171
|
-
|
|
172
|
-
#if (_IS_NEED_SFX)
|
|
173
|
-
# ifdef _WIN32
|
|
174
|
-
#define kSFX_curDefaultPath ".\\"
|
|
175
|
-
# else
|
|
176
|
-
#define kSFX_curDefaultPath "./"
|
|
177
|
-
# endif
|
|
178
|
-
#endif
|
|
179
|
-
|
|
180
106
|
static void printUsage(){
|
|
181
107
|
printVersion();
|
|
182
|
-
printf("\n");
|
|
183
108
|
printf("patch usage: hpatchz [options] oldPath diffFile outNewPath\n"
|
|
184
|
-
"print info: hpatchz -info diffFile\n"
|
|
185
109
|
#if (_IS_NEED_SFX)
|
|
186
110
|
"create SFX: hpatchz [-X-exe#selfExecuteFile] diffFile -X#outSelfExtractArchive\n"
|
|
187
111
|
"run SFX: selfExtractArchive [[options] oldPath -X outNewPath]\n"
|
|
188
|
-
"extract SFX: selfExtractArchive
|
|
189
|
-
|
|
112
|
+
"extract SFX: selfExtractArchive (same as: selfExtractArchive -f \"\" -X "
|
|
113
|
+
# ifdef _WIN32
|
|
114
|
+
"\".\\\")\n"
|
|
115
|
+
# else
|
|
116
|
+
"\"./\")\n"
|
|
117
|
+
# endif
|
|
190
118
|
#endif
|
|
191
119
|
" if oldPath is empty input parameter \"\"\n"
|
|
192
|
-
"options:\n"
|
|
193
|
-
" -s[-cacheSize] \n"
|
|
194
|
-
" DEFAULT -s-8m; oldPath loaded as Stream;\n"
|
|
195
|
-
" cacheSize can like 262144 or 256k or 64m or 512m etc....\n"
|
|
196
|
-
" requires (cacheSize + 4*decompress buffer size)+O(1) bytes of memory.\n"
|
|
197
|
-
" if diffFile is single compressed diffData(created by hdiffz -SD-stepSize), then requires\n"
|
|
198
|
-
" (cacheSize+ stepSize + 1*decompress buffer size)+O(1) bytes of memory;\n"
|
|
199
|
-
#if (_IS_NEED_BSDIFF||_IS_NEED_VCDIFF)
|
|
200
|
-
" if diffFile is created by"
|
|
201
|
-
#if (_IS_NEED_BSDIFF)
|
|
202
|
-
" hdiffz -BSD,bsdiff4,"
|
|
203
|
-
#endif
|
|
204
|
-
#if (_IS_NEED_VCDIFF)
|
|
205
|
-
" hdiffz -VCD,"
|
|
206
|
-
#endif
|
|
207
|
-
" then requires\n"
|
|
208
|
-
" (cacheSize + 3*decompress buffer size)+O(1) bytes of memory;\n"
|
|
209
|
-
#endif
|
|
210
|
-
#if (_IS_NEED_VCDIFF)
|
|
211
|
-
" if diffFile is created by xdelta3,open-vcdiff, then requires\n"
|
|
212
|
-
" (sourceWindowSize+targetWindowSize + 3*decompress buffer size)+O(1) bytes of memory.\n"
|
|
213
|
-
#endif
|
|
120
|
+
"memory options:\n"
|
|
214
121
|
" -m oldPath all loaded into Memory;\n"
|
|
215
|
-
" requires (oldFileSize
|
|
216
|
-
"
|
|
217
|
-
"
|
|
218
|
-
|
|
219
|
-
"
|
|
220
|
-
"
|
|
221
|
-
#endif
|
|
222
|
-
#if (_IS_NEED_VCDIFF)
|
|
223
|
-
" if diffFile is VCDIFF(created by hdiffz -VCD,xdelta3,open-vcdiff), then requires\n"
|
|
224
|
-
" (sourceWindowSize+targetWindowSize + 3*decompress buffer size)+O(1) bytes of memory.\n"
|
|
225
|
-
#endif
|
|
226
|
-
#if (_IS_USED_MULTITHREAD)
|
|
227
|
-
" -p-parallelThreadNumber\n"
|
|
228
|
-
" if parallelThreadNumber>1 then open multi-thread Parallel mode;\n"
|
|
229
|
-
" now only support single compressed diffData(created by hdiffz -SD-stepSize);\n"
|
|
230
|
-
" can set 1..5, DEFAULT -p-1!\n"
|
|
231
|
-
#endif
|
|
122
|
+
" requires (oldFileSize+ 4*decompress stream size)+O(1) bytes of memory.\n"
|
|
123
|
+
" -s[-cacheSize] \n"
|
|
124
|
+
" DEFAULT -s-64m; oldPath loaded as Stream;\n"
|
|
125
|
+
" requires (cacheSize+ 4*decompress stream size)+O(1) bytes of memory;\n"
|
|
126
|
+
" cacheSize can like 262144 or 256k or 512m or 2g etc....\n"
|
|
127
|
+
"special options:\n"
|
|
232
128
|
#if (_IS_NEED_DIR_DIFF_PATCH)
|
|
233
129
|
" -C-checksumSets\n"
|
|
234
130
|
" set Checksum data for directory patch, DEFAULT -C-new-copy;\n"
|
|
@@ -239,12 +135,6 @@ static void printUsage(){
|
|
|
239
135
|
" -C-copy checksum new files copy from old same files;\n"
|
|
240
136
|
" -C-no no checksum;\n"
|
|
241
137
|
" -C-all same as: -C-diff-old-new-copy;\n"
|
|
242
|
-
#endif
|
|
243
|
-
#if (_IS_NEED_VCDIFF)
|
|
244
|
-
" -C-no or -C-new\n"
|
|
245
|
-
" if diffFile is VCDIFF, then to close or open checksum, DEFAULT -C-new.\n"
|
|
246
|
-
#endif
|
|
247
|
-
#if (_IS_NEED_DIR_DIFF_PATCH)
|
|
248
138
|
" -n-maxOpenFileNumber\n"
|
|
249
139
|
" limit Number of open files at same time when stream directory patch;\n"
|
|
250
140
|
" maxOpenFileNumber>=8, DEFAULT -n-24, the best limit value by different\n"
|
|
@@ -272,42 +162,30 @@ static void printUsage(){
|
|
|
272
162
|
" if patch output directory, will overwrite, but not delete\n"
|
|
273
163
|
" needless existing files in directory.\n"
|
|
274
164
|
#endif
|
|
275
|
-
" -
|
|
276
|
-
"
|
|
277
|
-
" -v
|
|
165
|
+
" -h or -?\n"
|
|
166
|
+
" output Help info (this usage).\n"
|
|
167
|
+
" -v output Version info.\n\n"
|
|
278
168
|
);
|
|
279
|
-
printHelpInfo();
|
|
280
|
-
printf("\n");
|
|
281
169
|
}
|
|
282
|
-
#endif// _IS_NEED_CMDLINE
|
|
283
170
|
|
|
284
171
|
typedef enum THPatchResult {
|
|
285
172
|
HPATCH_SUCCESS=0,
|
|
286
|
-
HPATCH_OPTIONS_ERROR
|
|
173
|
+
HPATCH_OPTIONS_ERROR,
|
|
287
174
|
HPATCH_OPENREAD_ERROR,
|
|
288
175
|
HPATCH_OPENWRITE_ERROR,
|
|
289
176
|
HPATCH_FILEREAD_ERROR,
|
|
290
|
-
HPATCH_FILEWRITE_ERROR, // 5
|
|
177
|
+
HPATCH_FILEWRITE_ERROR, // 5
|
|
291
178
|
HPATCH_FILEDATA_ERROR,
|
|
292
179
|
HPATCH_FILECLOSE_ERROR,
|
|
293
|
-
HPATCH_MEM_ERROR,
|
|
180
|
+
HPATCH_MEM_ERROR,
|
|
294
181
|
HPATCH_HDIFFINFO_ERROR,
|
|
295
182
|
HPATCH_COMPRESSTYPE_ERROR, // 10
|
|
296
|
-
|
|
183
|
+
HPATCH_PATCH_ERROR,
|
|
184
|
+
|
|
297
185
|
HPATCH_PATHTYPE_ERROR, //adding begin v3.0
|
|
298
186
|
HPATCH_TEMPPATH_ERROR,
|
|
299
187
|
HPATCH_DELETEPATH_ERROR,
|
|
300
188
|
HPATCH_RENAMEPATH_ERROR, // 15
|
|
301
|
-
HPATCH_SPATCH_ERROR,
|
|
302
|
-
HPATCH_BSPATCH_ERROR,
|
|
303
|
-
HPATCH_VCPATCH_ERROR,
|
|
304
|
-
|
|
305
|
-
HPATCH_DECOMPRESSER_OPEN_ERROR=20,
|
|
306
|
-
HPATCH_DECOMPRESSER_CLOSE_ERROR,
|
|
307
|
-
HPATCH_DECOMPRESSER_MEM_ERROR,
|
|
308
|
-
HPATCH_DECOMPRESSER_DECOMPRESS_ERROR,
|
|
309
|
-
HPATCH_FILEWRITE_NO_SPACE_ERROR,
|
|
310
|
-
HPATCH_MULTITHREAD_ERROR, // 25
|
|
311
189
|
|
|
312
190
|
#if (_IS_NEED_DIR_DIFF_PATCH)
|
|
313
191
|
DIRPATCH_DIRDIFFINFO_ERROR=101,
|
|
@@ -325,7 +203,6 @@ typedef enum THPatchResult {
|
|
|
325
203
|
DIRPATCH_CLOSE_NEWPATH_ERROR,
|
|
326
204
|
DIRPATCH_PATCHBEGIN_ERROR,
|
|
327
205
|
DIRPATCH_PATCHFINISH_ERROR, // 115
|
|
328
|
-
DIRPATCH_PATCH_FILE_ERROR,
|
|
329
206
|
#endif
|
|
330
207
|
#if (_IS_NEED_SFX)
|
|
331
208
|
HPATCH_CREATE_SFX_DIFFFILETYPE_ERROR=201,
|
|
@@ -335,20 +212,17 @@ typedef enum THPatchResult {
|
|
|
335
212
|
HPATCH_RUN_SFX_DIFFOFFSERT_ERROR, // 205
|
|
336
213
|
#endif
|
|
337
214
|
} THPatchResult;
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
exit(HPATCH_MULTITHREAD_ERROR);
|
|
341
|
-
}
|
|
342
|
-
#endif
|
|
215
|
+
|
|
216
|
+
int hpatch_cmd_line(int argc, const char * argv[]);
|
|
343
217
|
|
|
344
218
|
int hpatch(const char* oldFileName,const char* diffFileName,const char* outNewFileName,
|
|
345
|
-
hpatch_BOOL isLoadOldAll,size_t patchCacheSize,
|
|
346
|
-
hpatch_StreamPos_t
|
|
219
|
+
hpatch_BOOL isLoadOldAll,size_t patchCacheSize,
|
|
220
|
+
hpatch_StreamPos_t diffDataOffert,hpatch_StreamPos_t diffDataSize);
|
|
347
221
|
#if (_IS_NEED_DIR_DIFF_PATCH)
|
|
348
222
|
int hpatch_dir(const char* oldPath,const char* diffFileName,const char* outNewPath,
|
|
349
223
|
hpatch_BOOL isLoadOldAll,size_t patchCacheSize,size_t kMaxOpenFileNumber,
|
|
350
224
|
TDirPatchChecksumSet* checksumSet,IHPatchDirListener* hlistener,
|
|
351
|
-
hpatch_StreamPos_t diffDataOffert,hpatch_StreamPos_t diffDataSize
|
|
225
|
+
hpatch_StreamPos_t diffDataOffert,hpatch_StreamPos_t diffDataSize);
|
|
352
226
|
#endif
|
|
353
227
|
#if (_IS_NEED_SFX)
|
|
354
228
|
int createSfx(const char* selfExecuteFileName,const char* diffFileName,const char* out_sfxFileName);
|
|
@@ -356,14 +230,13 @@ hpatch_BOOL getDiffDataOffertInSfx(hpatch_StreamPos_t* out_diffDataOffert,hpatch
|
|
|
356
230
|
#endif
|
|
357
231
|
|
|
358
232
|
#if (_IS_NEED_MAIN)
|
|
359
|
-
int hpatch_cmd_line(int argc, const char * argv[]);
|
|
360
233
|
# if (_IS_USED_WIN32_UTF8_WAPI)
|
|
361
234
|
int wmain(int argc,wchar_t* argv_w[]){
|
|
362
235
|
char* argv_utf8[hpatch_kPathMaxSize*3/sizeof(char*)];
|
|
363
236
|
if (!_wFileNames_to_utf8((const wchar_t**)argv_w,argc,argv_utf8,sizeof(argv_utf8)))
|
|
364
237
|
return HPATCH_OPTIONS_ERROR;
|
|
365
238
|
SetDefaultStringLocale();
|
|
366
|
-
return hpatch_cmd_line(argc,
|
|
239
|
+
return hpatch_cmd_line(argc,argv_utf8);
|
|
367
240
|
}
|
|
368
241
|
# else
|
|
369
242
|
int main(int argc, const char * argv[]){
|
|
@@ -372,35 +245,31 @@ int main(int argc, const char * argv[]){
|
|
|
372
245
|
# endif
|
|
373
246
|
#endif
|
|
374
247
|
|
|
375
|
-
#if (
|
|
248
|
+
#if (_IS_NEED_DIR_DIFF_PATCH)
|
|
376
249
|
static hpatch_BOOL _toChecksumSet(const char* psets,TDirPatchChecksumSet* checksumSet){
|
|
377
250
|
while (hpatch_TRUE) {
|
|
378
251
|
const char* pend=findUntilEnd(psets,'-');
|
|
379
252
|
size_t len=(size_t)(pend-psets);
|
|
380
253
|
if (len==0) return hpatch_FALSE; //error no set
|
|
381
|
-
if
|
|
254
|
+
if ((len==4)&&(0==memcmp(psets,"diff",len))){
|
|
255
|
+
checksumSet->isCheck_dirDiffData=hpatch_TRUE;
|
|
256
|
+
}else if ((len==3)&&(0==memcmp(psets,"old",len))){
|
|
257
|
+
checksumSet->isCheck_oldRefData=hpatch_TRUE;
|
|
258
|
+
}else if ((len==3)&&(0==memcmp(psets,"new",len))){
|
|
382
259
|
checksumSet->isCheck_newRefData=hpatch_TRUE;
|
|
383
|
-
}else
|
|
260
|
+
}else if ((len==4)&&(0==memcmp(psets,"copy",len))){
|
|
261
|
+
checksumSet->isCheck_copyFileData=hpatch_TRUE;
|
|
262
|
+
}else if ((len==3)&&(0==memcmp(psets,"all",len))){
|
|
384
263
|
checksumSet->isCheck_dirDiffData=hpatch_TRUE;
|
|
385
264
|
checksumSet->isCheck_oldRefData=hpatch_TRUE;
|
|
386
265
|
checksumSet->isCheck_newRefData=hpatch_TRUE;
|
|
387
266
|
checksumSet->isCheck_copyFileData=hpatch_TRUE;
|
|
388
|
-
}else
|
|
267
|
+
}else if ((len==2)&&(0==memcmp(psets,"no",len))){
|
|
389
268
|
checksumSet->isCheck_dirDiffData=hpatch_FALSE;
|
|
390
269
|
checksumSet->isCheck_oldRefData=hpatch_FALSE;
|
|
391
270
|
checksumSet->isCheck_newRefData=hpatch_FALSE;
|
|
392
271
|
checksumSet->isCheck_copyFileData=hpatch_FALSE;
|
|
393
|
-
}else
|
|
394
|
-
#if (_IS_NEED_DIR_DIFF_PATCH)
|
|
395
|
-
if ((len==4)&&(0==memcmp(psets,"diff",len))){
|
|
396
|
-
checksumSet->isCheck_dirDiffData=hpatch_TRUE;
|
|
397
|
-
}else if ((len==3)&&(0==memcmp(psets,"old",len))){
|
|
398
|
-
checksumSet->isCheck_oldRefData=hpatch_TRUE;
|
|
399
|
-
}else if ((len==4)&&(0==memcmp(psets,"copy",len))){
|
|
400
|
-
checksumSet->isCheck_copyFileData=hpatch_TRUE;
|
|
401
|
-
}else
|
|
402
|
-
#endif
|
|
403
|
-
{
|
|
272
|
+
}else{
|
|
404
273
|
return hpatch_FALSE;//error unknow set
|
|
405
274
|
}
|
|
406
275
|
if (*pend=='\0')
|
|
@@ -412,60 +281,36 @@ static hpatch_BOOL _toChecksumSet(const char* psets,TDirPatchChecksumSet* checks
|
|
|
412
281
|
#endif
|
|
413
282
|
|
|
414
283
|
#define _return_check(value,exitCode,errorInfo){ \
|
|
415
|
-
if (!(value)) {
|
|
284
|
+
if (!(value)) { fprintf(stderr,errorInfo " ERROR!\n"); return exitCode; } }
|
|
416
285
|
|
|
417
286
|
#define _options_check(value,errorInfo){ \
|
|
418
|
-
if (!(value)) {
|
|
419
|
-
|
|
287
|
+
if (!(value)) { fprintf(stderr,"options " errorInfo " ERROR!\n\n"); \
|
|
288
|
+
printUsage(); return HPATCH_OPTIONS_ERROR; } }
|
|
420
289
|
|
|
421
290
|
#define kPatchCacheSize_min (hpatch_kStreamCacheSize*8)
|
|
422
291
|
#define kPatchCacheSize_bestmin ((size_t)1<<21)
|
|
423
|
-
#define kPatchCacheSize_default ((size_t)1<<
|
|
292
|
+
#define kPatchCacheSize_default ((size_t)1<<26)
|
|
293
|
+
#define kPatchCacheSize_bestmax ((size_t)1<<30)
|
|
424
294
|
|
|
425
295
|
#define _kNULL_VALUE (-1)
|
|
426
296
|
#define _kNULL_SIZE (~(size_t)0)
|
|
427
297
|
|
|
428
|
-
#define _THREAD_NUMBER_NULL _kNULL_SIZE
|
|
429
|
-
#define _THREAD_NUMBER_DEFUALT 1
|
|
430
|
-
#define _THREAD_NUMBER_MAX 5
|
|
431
|
-
|
|
432
|
-
#if (_IS_NEED_CMDLINE)
|
|
433
|
-
#define _isSwapToPatchTag(tag) (0==strcmp("--patch",tag))
|
|
434
|
-
|
|
435
|
-
int isSwapToPatchMode(int argc,const char* argv[]){
|
|
436
|
-
int i;
|
|
437
|
-
for (i=1;i<argc;++i){
|
|
438
|
-
if (_isSwapToPatchTag(argv[i]))
|
|
439
|
-
return hpatch_TRUE;
|
|
440
|
-
}
|
|
441
|
-
#if (_IS_NEED_SFX)
|
|
442
|
-
if (getDiffDataOffertInSfx(0,0))
|
|
443
|
-
return hpatch_TRUE;
|
|
444
|
-
#endif
|
|
445
|
-
return hpatch_FALSE;
|
|
446
|
-
}
|
|
447
|
-
|
|
448
298
|
int hpatch_cmd_line(int argc, const char * argv[]){
|
|
449
|
-
hpatch_BOOL isPrintFileInfo=_kNULL_VALUE;
|
|
450
299
|
hpatch_BOOL isLoadOldAll=_kNULL_VALUE;
|
|
451
300
|
hpatch_BOOL isForceOverwrite=_kNULL_VALUE;
|
|
452
301
|
hpatch_BOOL isOutputHelp=_kNULL_VALUE;
|
|
453
302
|
hpatch_BOOL isOutputVersion=_kNULL_VALUE;
|
|
454
303
|
hpatch_BOOL isOldPathInputEmpty=_kNULL_VALUE;
|
|
455
|
-
hpatch_BOOL isRunSFX=_kNULL_VALUE;
|
|
456
|
-
size_t threadNum=_THREAD_NUMBER_NULL;
|
|
457
304
|
#if (_IS_NEED_SFX)
|
|
305
|
+
hpatch_BOOL isRunSFX=_kNULL_VALUE;
|
|
458
306
|
const char* out_SFX=0;
|
|
459
307
|
const char* selfExecuteFile=0;
|
|
460
308
|
#endif
|
|
461
309
|
size_t patchCacheSize=0;
|
|
462
310
|
#if (_IS_NEED_DIR_DIFF_PATCH)
|
|
463
311
|
size_t kMaxOpenFileNumber=_kNULL_SIZE; //only used in stream dir patch
|
|
464
|
-
#endif
|
|
465
|
-
#if ((_IS_NEED_DIR_DIFF_PATCH)||(_IS_NEED_VCDIFF))
|
|
466
312
|
TDirPatchChecksumSet checksumSet={0,hpatch_FALSE,hpatch_TRUE,hpatch_TRUE,hpatch_FALSE}; //DEFAULT
|
|
467
313
|
#endif
|
|
468
|
-
hpatch_BOOL vcpatch_isChecksum=hpatch_TRUE;
|
|
469
314
|
#define kMax_arg_values_size 3
|
|
470
315
|
const char* arg_values[kMax_arg_values_size]={0};
|
|
471
316
|
int arg_values_size=0;
|
|
@@ -473,8 +318,6 @@ int hpatch_cmd_line(int argc, const char * argv[]){
|
|
|
473
318
|
for (i=1; i<argc; ++i) {
|
|
474
319
|
const char* op=argv[i];
|
|
475
320
|
_options_check(op!=0,"?");
|
|
476
|
-
if (_isSwapToPatchTag(op))
|
|
477
|
-
continue;
|
|
478
321
|
if (op[0]!='-'){
|
|
479
322
|
hpatch_BOOL isEmpty=(strlen(op)==0);
|
|
480
323
|
_options_check(arg_values_size<kMax_arg_values_size,"input count");
|
|
@@ -507,13 +350,6 @@ int hpatch_cmd_line(int argc, const char * argv[]){
|
|
|
507
350
|
patchCacheSize=kPatchCacheSize_default;
|
|
508
351
|
}
|
|
509
352
|
} break;
|
|
510
|
-
#if (_IS_USED_MULTITHREAD)
|
|
511
|
-
case 'p':{
|
|
512
|
-
const char* pnum=op+3;
|
|
513
|
-
_options_check((threadNum==_THREAD_NUMBER_NULL)&&(op[2]=='-'),"-p-?");
|
|
514
|
-
_options_check(a_to_size(pnum,strlen(pnum),&threadNum),"-p-?");
|
|
515
|
-
} break;
|
|
516
|
-
#endif
|
|
517
353
|
#if (_IS_NEED_SFX)
|
|
518
354
|
case 'X':{
|
|
519
355
|
if (op[2]=='#'){
|
|
@@ -539,27 +375,19 @@ int hpatch_cmd_line(int argc, const char * argv[]){
|
|
|
539
375
|
_options_check((isForceOverwrite==_kNULL_VALUE)&&(op[2]=='\0'),"-f");
|
|
540
376
|
isForceOverwrite=hpatch_TRUE;
|
|
541
377
|
} break;
|
|
542
|
-
#if (
|
|
378
|
+
#if (_IS_NEED_DIR_DIFF_PATCH)
|
|
543
379
|
case 'C':{
|
|
544
380
|
const char* psets=op+3;
|
|
545
381
|
_options_check((op[2]=='-'),"-C-?");
|
|
546
382
|
memset(&checksumSet,0,sizeof(checksumSet));//all set false
|
|
547
383
|
_options_check(_toChecksumSet(psets,&checksumSet),"-C-?");
|
|
548
384
|
} break;
|
|
549
|
-
#endif
|
|
550
|
-
#if (_IS_NEED_DIR_DIFF_PATCH)
|
|
551
385
|
case 'n':{
|
|
552
386
|
const char* pnum=op+3;
|
|
553
|
-
_options_check((kMaxOpenFileNumber==_kNULL_SIZE)&&(op[2]=='-'),"-n");
|
|
387
|
+
_options_check((kMaxOpenFileNumber==_kNULL_SIZE)&&(op[2]=='-'),"-n-?");
|
|
554
388
|
_options_check(kmg_to_size(pnum,strlen(pnum),&kMaxOpenFileNumber),"-n-?");
|
|
555
|
-
_options_check((kMaxOpenFileNumber!=_kNULL_SIZE),"-n-?");
|
|
556
389
|
} break;
|
|
557
390
|
#endif
|
|
558
|
-
case 'i':{
|
|
559
|
-
_options_check((isPrintFileInfo==_kNULL_VALUE)&&(op[2]=='n')&&(op[3]=='f')
|
|
560
|
-
&&(op[4]=='o')&&(op[5]=='\0'),"-info");
|
|
561
|
-
isPrintFileInfo=hpatch_TRUE;
|
|
562
|
-
} break;
|
|
563
391
|
case '?':
|
|
564
392
|
case 'h':{
|
|
565
393
|
_options_check((isOutputHelp==_kNULL_VALUE)&&(op[2]=='\0'),"-h");
|
|
@@ -581,18 +409,10 @@ int hpatch_cmd_line(int argc, const char * argv[]){
|
|
|
581
409
|
isOutputVersion=hpatch_FALSE;
|
|
582
410
|
if (isForceOverwrite==_kNULL_VALUE)
|
|
583
411
|
isForceOverwrite=hpatch_FALSE;
|
|
584
|
-
|
|
585
|
-
isPrintFileInfo=hpatch_FALSE;
|
|
412
|
+
#if (_IS_NEED_SFX)
|
|
586
413
|
if (isRunSFX==_kNULL_VALUE)
|
|
587
414
|
isRunSFX=hpatch_FALSE;
|
|
588
|
-
if (
|
|
589
|
-
threadNum=_THREAD_NUMBER_DEFUALT;
|
|
590
|
-
#if (_IS_NEED_MAIN && _IS_USED_MULTITHREAD)
|
|
591
|
-
if (threadNum>1)
|
|
592
|
-
_parallel_import_c_on_error=_on_mt_error;
|
|
593
|
-
#endif
|
|
594
|
-
#if (_IS_NEED_SFX)
|
|
595
|
-
if ((argc<=1)&&(!isRunSFX)){
|
|
415
|
+
if (arg_values_size==0){
|
|
596
416
|
hpatch_StreamPos_t _diffDataOffert=0;
|
|
597
417
|
hpatch_StreamPos_t _diffDataSize=0;
|
|
598
418
|
if (getDiffDataOffertInSfx(&_diffDataOffert,&_diffDataSize)){//autoExtractSFX
|
|
@@ -601,10 +421,6 @@ int hpatch_cmd_line(int argc, const char * argv[]){
|
|
|
601
421
|
}
|
|
602
422
|
}
|
|
603
423
|
#endif
|
|
604
|
-
if ((argc<=1)&&(!isRunSFX)){
|
|
605
|
-
printUsage();
|
|
606
|
-
return HPATCH_OPTIONS_ERROR;
|
|
607
|
-
}
|
|
608
424
|
if (isOutputHelp||isOutputVersion){
|
|
609
425
|
if (isOutputHelp)
|
|
610
426
|
printUsage();//with version
|
|
@@ -617,18 +433,12 @@ int hpatch_cmd_line(int argc, const char * argv[]){
|
|
|
617
433
|
#endif
|
|
618
434
|
return 0; //ok
|
|
619
435
|
}
|
|
620
|
-
if (isPrintFileInfo){
|
|
621
|
-
return hpatch_printFilesInfos(arg_values_size,arg_values);
|
|
622
|
-
}
|
|
623
436
|
#if (_IS_NEED_DIR_DIFF_PATCH)
|
|
624
437
|
if (kMaxOpenFileNumber==_kNULL_SIZE)
|
|
625
438
|
kMaxOpenFileNumber=kMaxOpenFileNumber_default_patch;
|
|
626
439
|
if (kMaxOpenFileNumber<kMaxOpenFileNumber_default_min)
|
|
627
440
|
kMaxOpenFileNumber=kMaxOpenFileNumber_default_min;
|
|
628
441
|
#endif
|
|
629
|
-
#if (_IS_NEED_VCDIFF)
|
|
630
|
-
vcpatch_isChecksum=checksumSet.isCheck_newRefData;
|
|
631
|
-
#endif
|
|
632
442
|
|
|
633
443
|
if (isLoadOldAll==_kNULL_VALUE){
|
|
634
444
|
isLoadOldAll=hpatch_FALSE;
|
|
@@ -666,7 +476,11 @@ int hpatch_cmd_line(int argc, const char * argv[]){
|
|
|
666
476
|
const char* diffFileName=0;
|
|
667
477
|
const char* outNewPath =0;
|
|
668
478
|
#if (_IS_NEED_SFX)
|
|
669
|
-
|
|
479
|
+
# ifdef _WIN32
|
|
480
|
+
const char* kSFX_curDefaultPath=".\\";
|
|
481
|
+
# else
|
|
482
|
+
const char* kSFX_curDefaultPath="./";
|
|
483
|
+
# endif
|
|
670
484
|
const char* kSFX_emptyPath="";
|
|
671
485
|
#endif
|
|
672
486
|
#if (_IS_NEED_DIR_DIFF_PATCH)
|
|
@@ -685,7 +499,6 @@ int hpatch_cmd_line(int argc, const char * argv[]){
|
|
|
685
499
|
if (arg_values_size==0){//autoExtractSFX
|
|
686
500
|
oldPath =kSFX_emptyPath;
|
|
687
501
|
outNewPath =kSFX_curDefaultPath;
|
|
688
|
-
isSfxDefaultPath=hpatch_TRUE;
|
|
689
502
|
}else{
|
|
690
503
|
oldPath =arg_values[0];
|
|
691
504
|
outNewPath =arg_values[1];
|
|
@@ -699,6 +512,7 @@ int hpatch_cmd_line(int argc, const char * argv[]){
|
|
|
699
512
|
outNewPath =arg_values[2];
|
|
700
513
|
}
|
|
701
514
|
|
|
515
|
+
isSamePath=hpatch_getIsSamePath(oldPath,outNewPath);
|
|
702
516
|
_return_check(!hpatch_getIsSamePath(oldPath,diffFileName),
|
|
703
517
|
HPATCH_PATHTYPE_ERROR,"oldPath diffFile same path");
|
|
704
518
|
_return_check(!hpatch_getIsSamePath(outNewPath,diffFileName),
|
|
@@ -710,28 +524,23 @@ int hpatch_cmd_line(int argc, const char * argv[]){
|
|
|
710
524
|
_return_check(outNewPathType==kPathType_notExist,
|
|
711
525
|
HPATCH_PATHTYPE_ERROR,"outNewPath already exists, overwrite");
|
|
712
526
|
}
|
|
527
|
+
if (isSamePath)
|
|
528
|
+
_return_check(isForceOverwrite,HPATCH_PATHTYPE_ERROR,"oldPath outNewPath same path, overwrite");
|
|
713
529
|
#if (_IS_NEED_DIR_DIFF_PATCH)
|
|
714
|
-
_return_check(getDirDiffInfoByFile(
|
|
530
|
+
_return_check(getDirDiffInfoByFile(diffFileName,&dirDiffInfo,diffDataOffert,diffDataSize),
|
|
715
531
|
HPATCH_OPENREAD_ERROR,"input diffFile open read");
|
|
716
532
|
isOutDir=(dirDiffInfo.isDirDiff)&&(dirDiffInfo.newPathIsDir);
|
|
717
|
-
#if (_IS_NEED_SFX)
|
|
718
|
-
if (isSfxDefaultPath && (dirDiffInfo.isDirDiff&&dirDiffInfo.oldPathIsDir))
|
|
719
|
-
oldPath=kSFX_curDefaultPath;
|
|
720
|
-
#endif
|
|
721
533
|
#endif
|
|
722
|
-
isSamePath=hpatch_getIsSamePath(oldPath,outNewPath);
|
|
723
|
-
if (isSamePath)
|
|
724
|
-
_return_check(isForceOverwrite,HPATCH_PATHTYPE_ERROR,"oldPath outNewPath same path, overwrite");
|
|
725
534
|
if (!isSamePath){ // out new file or new dir
|
|
726
535
|
#if (_IS_NEED_DIR_DIFF_PATCH)
|
|
727
536
|
if (dirDiffInfo.isDirDiff){
|
|
728
537
|
return hpatch_dir(oldPath,diffFileName,outNewPath,isLoadOldAll,patchCacheSize,kMaxOpenFileNumber,
|
|
729
|
-
&checksumSet,&defaultPatchDirlistener,diffDataOffert,diffDataSize
|
|
538
|
+
&checksumSet,&defaultPatchDirlistener,diffDataOffert,diffDataSize);
|
|
730
539
|
}else
|
|
731
540
|
#endif
|
|
732
541
|
{
|
|
733
|
-
return hpatch(oldPath,diffFileName,outNewPath,
|
|
734
|
-
patchCacheSize,diffDataOffert,diffDataSize
|
|
542
|
+
return hpatch(oldPath,diffFileName,outNewPath,
|
|
543
|
+
isLoadOldAll,patchCacheSize,diffDataOffert,diffDataSize);
|
|
735
544
|
}
|
|
736
545
|
}else
|
|
737
546
|
#if (_IS_NEED_DIR_DIFF_PATCH)
|
|
@@ -754,13 +563,12 @@ int hpatch_cmd_line(int argc, const char * argv[]){
|
|
|
754
563
|
#if (_IS_NEED_DIR_DIFF_PATCH)
|
|
755
564
|
if (dirDiffInfo.isDirDiff){
|
|
756
565
|
result=hpatch_dir(oldPath,diffFileName,newTempName,isLoadOldAll,patchCacheSize,
|
|
757
|
-
kMaxOpenFileNumber,&checksumSet,&defaultPatchDirlistener,
|
|
758
|
-
diffDataOffert,diffDataSize,threadNum);
|
|
566
|
+
kMaxOpenFileNumber,&checksumSet,&defaultPatchDirlistener,diffDataOffert,diffDataSize);
|
|
759
567
|
}else
|
|
760
568
|
#endif
|
|
761
569
|
{
|
|
762
|
-
result=hpatch(oldPath,diffFileName,newTempName,
|
|
763
|
-
patchCacheSize,diffDataOffert,diffDataSize
|
|
570
|
+
result=hpatch(oldPath,diffFileName,newTempName,
|
|
571
|
+
isLoadOldAll,patchCacheSize,diffDataOffert,diffDataSize);
|
|
764
572
|
}
|
|
765
573
|
if (result==HPATCH_SUCCESS){
|
|
766
574
|
_return_check(hpatch_removeFile(oldPath),
|
|
@@ -771,7 +579,7 @@ int hpatch_cmd_line(int argc, const char * argv[]){
|
|
|
771
579
|
}else{//patch error
|
|
772
580
|
if (!hpatch_removeFile(newTempName)){
|
|
773
581
|
printf("WARNING: can't remove temp file \"");
|
|
774
|
-
|
|
582
|
+
hpatch_printPath_utf8(newTempName); printf("\"\n");
|
|
775
583
|
}
|
|
776
584
|
}
|
|
777
585
|
return result;
|
|
@@ -786,500 +594,175 @@ int hpatch_cmd_line(int argc, const char * argv[]){
|
|
|
786
594
|
_return_check(hpatch_getTempPathName(outNewPath,newTempDir,newTempDir+hpatch_kPathMaxSize),
|
|
787
595
|
HPATCH_TEMPPATH_ERROR,"getTempPathName(outNewPath)");
|
|
788
596
|
printf("NOTE: all in outNewPath temp directory will be move to oldDirectory after patch!\n");
|
|
789
|
-
result=hpatch_dir(oldPath,diffFileName,newTempDir,isLoadOldAll,patchCacheSize,
|
|
790
|
-
|
|
597
|
+
result=hpatch_dir(oldPath,diffFileName,newTempDir,isLoadOldAll,patchCacheSize,
|
|
598
|
+
kMaxOpenFileNumber,&checksumSet,&tempDirPatchListener,diffDataOffert,diffDataSize);
|
|
791
599
|
if (result==HPATCH_SUCCESS){
|
|
792
600
|
printf("all in outNewPath temp directory moved to oldDirectory!\n");
|
|
793
601
|
}else if(!hpatch_isPathNotExist(newTempDir)){
|
|
794
602
|
printf("WARNING: not remove temp directory \"");
|
|
795
|
-
|
|
603
|
+
hpatch_printPath_utf8(newTempDir); printf("\"\n");
|
|
796
604
|
}
|
|
797
605
|
return result;
|
|
798
606
|
}
|
|
799
607
|
#endif
|
|
800
608
|
}
|
|
801
609
|
}
|
|
802
|
-
|
|
610
|
+
|
|
803
611
|
|
|
804
612
|
#define check_on_error(errorType) { \
|
|
805
613
|
if (result==HPATCH_SUCCESS) result=errorType; if (!_isInClear){ goto clear; } }
|
|
806
614
|
#define check(value,errorType,errorInfo) { \
|
|
807
|
-
if (!(value)){
|
|
808
|
-
|
|
809
|
-
#if (_HPATCH_IS_USED_errno)
|
|
810
|
-
# define check_ferr(fileError,errorType,errorInfo){ \
|
|
811
|
-
if (fileError){ \
|
|
812
|
-
result=HPATCH_SUCCESS; \
|
|
813
|
-
if (ENOSPC==(fileError)){ \
|
|
814
|
-
check(hpatch_FALSE,HPATCH_FILEWRITE_NO_SPACE_ERROR,errorInfo); \
|
|
815
|
-
}else{ \
|
|
816
|
-
check(hpatch_FALSE,errorType,errorInfo); } } }
|
|
817
|
-
#else
|
|
818
|
-
# define check_ferr(fileError,errorType,errorInfo) { \
|
|
819
|
-
if (fileError) { result=HPATCH_SUCCESS; check(hpatch_FALSE,errorType,errorInfo); } }
|
|
820
|
-
#endif
|
|
821
|
-
|
|
822
|
-
#define check_dec(decError) { \
|
|
823
|
-
switch (decError){ \
|
|
824
|
-
case hpatch_dec_ok: break; \
|
|
825
|
-
case hpatch_dec_mem_error: check(0,HPATCH_DECOMPRESSER_MEM_ERROR,"decompressPlugin alloc memory"); \
|
|
826
|
-
case hpatch_dec_open_error: check(0,HPATCH_DECOMPRESSER_OPEN_ERROR,"decompressPlugin open"); \
|
|
827
|
-
case hpatch_dec_close_error: check(0,HPATCH_DECOMPRESSER_CLOSE_ERROR,"decompressPlugin close"); \
|
|
828
|
-
default: { assert(decError==hpatch_dec_error); \
|
|
829
|
-
check(0,HPATCH_DECOMPRESSER_DECOMPRESS_ERROR,"decompressPlugin decompress"); } break; \
|
|
830
|
-
} }
|
|
615
|
+
if (!(value)){ fprintf(stderr,errorInfo " ERROR!\n"); check_on_error(errorType); } }
|
|
831
616
|
|
|
832
|
-
#define _try_rt_dec(dec) { if (dec.is_can_open(compressType)) return &dec; }
|
|
833
617
|
|
|
834
|
-
static
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
618
|
+
static hpatch_BOOL getDecompressPlugin(const hpatch_compressedDiffInfo* diffInfo,
|
|
619
|
+
hpatch_TDecompress** out_decompressPlugin){
|
|
620
|
+
hpatch_TDecompress* decompressPlugin=0;
|
|
621
|
+
assert(0==*out_decompressPlugin);
|
|
622
|
+
if (strlen(diffInfo->compressType)>0){
|
|
623
|
+
#ifdef _CompressPlugin_zlib
|
|
624
|
+
if ((!decompressPlugin)&&zlibDecompressPlugin.is_can_open(diffInfo->compressType))
|
|
625
|
+
decompressPlugin=&zlibDecompressPlugin;
|
|
841
626
|
#endif
|
|
842
627
|
#ifdef _CompressPlugin_bz2
|
|
843
|
-
|
|
628
|
+
if ((!decompressPlugin)&&bz2DecompressPlugin.is_can_open(diffInfo->compressType))
|
|
629
|
+
decompressPlugin=&bz2DecompressPlugin;
|
|
844
630
|
#endif
|
|
845
631
|
#ifdef _CompressPlugin_lzma
|
|
846
|
-
|
|
632
|
+
if ((!decompressPlugin)&&lzmaDecompressPlugin.is_can_open(diffInfo->compressType))
|
|
633
|
+
decompressPlugin=&lzmaDecompressPlugin;
|
|
847
634
|
#endif
|
|
848
635
|
#ifdef _CompressPlugin_lzma2
|
|
849
|
-
|
|
636
|
+
if ((!decompressPlugin)&&lzma2DecompressPlugin.is_can_open(diffInfo->compressType))
|
|
637
|
+
decompressPlugin=&lzma2DecompressPlugin;
|
|
850
638
|
#endif
|
|
851
639
|
#if (defined(_CompressPlugin_lz4) || (defined(_CompressPlugin_lz4hc)))
|
|
852
|
-
|
|
640
|
+
if ((!decompressPlugin)&&lz4DecompressPlugin.is_can_open(diffInfo->compressType))
|
|
641
|
+
decompressPlugin=&lz4DecompressPlugin;
|
|
853
642
|
#endif
|
|
854
643
|
#ifdef _CompressPlugin_zstd
|
|
855
|
-
|
|
644
|
+
if ((!decompressPlugin)&&zstdDecompressPlugin.is_can_open(diffInfo->compressType))
|
|
645
|
+
decompressPlugin=&zstdDecompressPlugin;
|
|
856
646
|
#endif
|
|
857
647
|
#ifdef _CompressPlugin_brotli
|
|
858
|
-
|
|
648
|
+
if ((!decompressPlugin)&&brotliDecompressPlugin.is_can_open(diffInfo->compressType))
|
|
649
|
+
decompressPlugin=&brotliDecompressPlugin;
|
|
859
650
|
#endif
|
|
860
651
|
#ifdef _CompressPlugin_lzham
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
#ifdef _CompressPlugin_tuz
|
|
864
|
-
_try_rt_dec(tuzDecompressPlugin);
|
|
865
|
-
#endif
|
|
866
|
-
return 0;
|
|
867
|
-
}
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
#if (_IS_NEED_VCDIFF)
|
|
871
|
-
static hpatch_BOOL getVcDiffDecompressPlugin(hpatch_TDecompress* out_decompressPlugin,
|
|
872
|
-
const hpatch_VcDiffInfo* vcdInfo,char* out_compressType){
|
|
873
|
-
const hpatch_TDecompress* decompressPlugin=0;
|
|
874
|
-
|
|
875
|
-
out_compressType[0]='\0';
|
|
876
|
-
memset(out_decompressPlugin,0,sizeof(*out_decompressPlugin));
|
|
877
|
-
switch (vcdInfo->compressorID){
|
|
878
|
-
case 0: return hpatch_TRUE;
|
|
879
|
-
#ifdef _CompressPlugin_7zXZ
|
|
880
|
-
case kVcDiff_compressorID_7zXZ:{
|
|
881
|
-
static const char* _7zXZCompressType="7zXZ";
|
|
882
|
-
_init_CompressPlugin_7zXZ();
|
|
883
|
-
if (vcdInfo->isHDiffzAppHead_a)
|
|
884
|
-
decompressPlugin=&_7zXZDecompressPlugin_a;
|
|
885
|
-
else
|
|
886
|
-
decompressPlugin=&_7zXZDecompressPlugin;
|
|
887
|
-
memcpy(out_compressType,_7zXZCompressType,strlen(_7zXZCompressType)+1);
|
|
888
|
-
} break;
|
|
889
|
-
#endif
|
|
890
|
-
default: return hpatch_FALSE; //now unsupport
|
|
891
|
-
}
|
|
892
|
-
if (decompressPlugin){
|
|
893
|
-
*out_decompressPlugin=*decompressPlugin;
|
|
894
|
-
out_decompressPlugin->decError=hpatch_dec_ok;
|
|
895
|
-
}
|
|
896
|
-
return hpatch_TRUE;
|
|
897
|
-
}
|
|
652
|
+
if ((!decompressPlugin)&&lzhamDecompressPlugin.is_can_open(diffInfo->compressType))
|
|
653
|
+
decompressPlugin=&lzhamDecompressPlugin;
|
|
898
654
|
#endif
|
|
899
|
-
|
|
900
|
-
static hpatch_BOOL getDecompressPlugin(const hpatch_compressedDiffInfo* diffInfo,
|
|
901
|
-
hpatch_TDecompress* out_decompressPlugin){
|
|
902
|
-
const hpatch_TDecompress* decompressPlugin=0;
|
|
903
|
-
memset(out_decompressPlugin,0,sizeof(*out_decompressPlugin));
|
|
904
|
-
if (diffInfo->compressedCount>0){
|
|
905
|
-
decompressPlugin=__find_decompressPlugin(diffInfo->compressType);
|
|
906
|
-
if ((0==decompressPlugin)||(decompressPlugin->open==0)) return hpatch_FALSE; //error
|
|
907
655
|
}
|
|
908
|
-
if (decompressPlugin){
|
|
909
|
-
|
|
910
|
-
|
|
656
|
+
if (!decompressPlugin){
|
|
657
|
+
if (diffInfo->compressedCount>0){
|
|
658
|
+
return hpatch_FALSE; //error
|
|
659
|
+
}else{
|
|
660
|
+
if (strlen(diffInfo->compressType)>0)
|
|
661
|
+
printf(" diffFile added useless compress tag \"%s\"\n",diffInfo->compressType);
|
|
662
|
+
decompressPlugin=0;
|
|
663
|
+
}
|
|
664
|
+
}else{
|
|
665
|
+
printf("hpatchz run with decompress plugin: \"%s\" (need decompress %d)\n",
|
|
666
|
+
diffInfo->compressType,diffInfo->compressedCount);
|
|
911
667
|
}
|
|
668
|
+
*out_decompressPlugin=decompressPlugin;
|
|
912
669
|
return hpatch_TRUE;
|
|
913
670
|
}
|
|
914
671
|
|
|
915
672
|
#if (_IS_NEED_DIR_DIFF_PATCH)
|
|
916
|
-
static
|
|
917
|
-
hpatch_BOOL _trySetChecksum(hpatch_TChecksum** out_checksumPlugin,const char* checksumType,
|
|
673
|
+
static void _trySetChecksum(hpatch_TChecksum** out_checksumPlugin,const char* checksumType,
|
|
918
674
|
hpatch_TChecksum* testChecksumPlugin){
|
|
919
|
-
|
|
920
|
-
if (0
|
|
921
|
-
|
|
922
|
-
return hpatch_TRUE;
|
|
675
|
+
if ((*out_checksumPlugin)!=0) return;
|
|
676
|
+
if (0==strcmp(checksumType,testChecksumPlugin->checksumType()))
|
|
677
|
+
*out_checksumPlugin=testChecksumPlugin;
|
|
923
678
|
}
|
|
924
|
-
#define __setChecksum(_checksumPlugin) \
|
|
925
|
-
if (_trySetChecksum(out_checksumPlugin,checksumType,_checksumPlugin)) return hpatch_TRUE;
|
|
926
|
-
|
|
927
679
|
static hpatch_BOOL findChecksum(hpatch_TChecksum** out_checksumPlugin,const char* checksumType){
|
|
928
680
|
*out_checksumPlugin=0;
|
|
929
681
|
if (strlen(checksumType)==0) return hpatch_TRUE;
|
|
930
|
-
#ifdef _ChecksumPlugin_fadler64
|
|
931
|
-
__setChecksum(&fadler64ChecksumPlugin);
|
|
932
|
-
#endif
|
|
933
|
-
#ifdef _ChecksumPlugin_xxh128
|
|
934
|
-
__setChecksum(&xxh128ChecksumPlugin);
|
|
935
|
-
#endif
|
|
936
|
-
#ifdef _ChecksumPlugin_xxh3
|
|
937
|
-
__setChecksum(&xxh3ChecksumPlugin);
|
|
938
|
-
#endif
|
|
939
|
-
#ifdef _ChecksumPlugin_md5
|
|
940
|
-
__setChecksum(&md5ChecksumPlugin);
|
|
941
|
-
#endif
|
|
942
682
|
#ifdef _ChecksumPlugin_crc32
|
|
943
|
-
|
|
683
|
+
_trySetChecksum(out_checksumPlugin,checksumType,&crc32ChecksumPlugin);
|
|
944
684
|
#endif
|
|
945
685
|
#ifdef _ChecksumPlugin_adler32
|
|
946
|
-
|
|
686
|
+
_trySetChecksum(out_checksumPlugin,checksumType,&adler32ChecksumPlugin);
|
|
947
687
|
#endif
|
|
948
688
|
#ifdef _ChecksumPlugin_adler64
|
|
949
|
-
|
|
689
|
+
_trySetChecksum(out_checksumPlugin,checksumType,&adler64ChecksumPlugin);
|
|
950
690
|
#endif
|
|
951
691
|
#ifdef _ChecksumPlugin_fadler32
|
|
952
|
-
|
|
953
|
-
#endif
|
|
954
|
-
#ifdef _ChecksumPlugin_fadler128
|
|
955
|
-
__setChecksum(&fadler128ChecksumPlugin);
|
|
956
|
-
#endif
|
|
957
|
-
#ifdef _ChecksumPlugin_blake3
|
|
958
|
-
__setChecksum(&blake3ChecksumPlugin);
|
|
959
|
-
#endif
|
|
960
|
-
return hpatch_FALSE;
|
|
961
|
-
}
|
|
962
|
-
#endif
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
typedef struct _THDiffInfos{
|
|
966
|
-
hpatch_BOOL isSingleCompressedDiff;
|
|
967
|
-
hpatch_BOOL isBsDiff;
|
|
968
|
-
hpatch_BOOL isVcDiff;
|
|
969
|
-
hpatch_compressedDiffInfo diffInfo;
|
|
970
|
-
#if (_IS_NEED_SINGLE_STREAM_DIFF)
|
|
971
|
-
hpatch_singleCompressedDiffInfo sdiffInfo;
|
|
972
|
-
#endif
|
|
973
|
-
#if (_IS_NEED_BSDIFF)
|
|
974
|
-
hpatch_BsDiffInfo bsdiffInfo;
|
|
975
|
-
#endif
|
|
976
|
-
#if (_IS_NEED_VCDIFF)
|
|
977
|
-
hpatch_VcDiffInfo vcdiffInfo;
|
|
978
|
-
#endif
|
|
979
|
-
hpatch_TDecompress _decompressPlugin;
|
|
980
|
-
} _THDiffInfos;
|
|
981
|
-
|
|
982
|
-
#define _kUnavailableSize hpatch_kNullStreamPos
|
|
983
|
-
|
|
984
|
-
static int _getHDiffInfos(_THDiffInfos* out_diffInfos,const hpatch_TFileStreamInput* diffData){
|
|
985
|
-
int result=HPATCH_SUCCESS;
|
|
986
|
-
int _isInClear=hpatch_FALSE;
|
|
987
|
-
hpatch_TDecompress* decompressPlugin=&out_diffInfos->_decompressPlugin;
|
|
988
|
-
hpatch_compressedDiffInfo* diffInfo=&out_diffInfos->diffInfo;
|
|
989
|
-
if (getCompressedDiffInfo(diffInfo,&diffData->base)){
|
|
990
|
-
check(diffInfo->oldDataSize!=_kUnavailableSize,HPATCH_HDIFFINFO_ERROR,"saved oldDataSize");
|
|
991
|
-
}else{
|
|
992
|
-
#if (_IS_NEED_SINGLE_STREAM_DIFF)
|
|
993
|
-
if (getSingleCompressedDiffInfo(&out_diffInfos->sdiffInfo,&diffData->base,0)){
|
|
994
|
-
out_diffInfos->isSingleCompressedDiff=hpatch_TRUE;
|
|
995
|
-
_singleDiffInfoToHDiffInfo(diffInfo,&out_diffInfos->sdiffInfo);
|
|
996
|
-
check(diffInfo->oldDataSize!=_kUnavailableSize,HPATCH_HDIFFINFO_ERROR,"saved oldDataSize");
|
|
997
|
-
}else
|
|
998
|
-
#endif
|
|
999
|
-
#if (_IS_NEED_BSDIFF)
|
|
1000
|
-
if (getBsDiffInfo(&out_diffInfos->bsdiffInfo,&diffData->base)){
|
|
1001
|
-
const char* bsCompressType="bz2";
|
|
1002
|
-
*decompressPlugin=_bz2DecompressPlugin_unsz;
|
|
1003
|
-
decompressPlugin->decError=hpatch_dec_ok;
|
|
1004
|
-
memcpy(diffInfo->compressType,bsCompressType,strlen(bsCompressType)+1);
|
|
1005
|
-
diffInfo->compressedCount=out_diffInfos->bsdiffInfo.isEndsleyBsdiff?1:3;
|
|
1006
|
-
diffInfo->newDataSize=out_diffInfos->bsdiffInfo.newDataSize;
|
|
1007
|
-
diffInfo->oldDataSize=_kUnavailableSize; //not saved oldDataSize
|
|
1008
|
-
out_diffInfos->isBsDiff=hpatch_TRUE;
|
|
1009
|
-
}else
|
|
1010
|
-
#endif
|
|
1011
|
-
#if (_IS_NEED_VCDIFF)
|
|
1012
|
-
if (getVcDiffInfo(&out_diffInfos->vcdiffInfo,&diffData->base,hpatch_TRUE)){
|
|
1013
|
-
diffInfo->newDataSize=out_diffInfos->vcdiffInfo.sumTargetWindowsSize;
|
|
1014
|
-
diffInfo->oldDataSize=_kUnavailableSize; //not saved oldDataSize
|
|
1015
|
-
out_diffInfos->isVcDiff=hpatch_TRUE;
|
|
1016
|
-
if (getVcDiffDecompressPlugin(decompressPlugin,&out_diffInfos->vcdiffInfo,out_diffInfos->diffInfo.compressType)){
|
|
1017
|
-
if (decompressPlugin->open) out_diffInfos->diffInfo.compressedCount=3;
|
|
1018
|
-
else diffInfo->compressedCount=0;
|
|
1019
|
-
}else{
|
|
1020
|
-
LOG_ERR("can not decompress VCDIFF compressID \"%d\" data ERROR!\n",out_diffInfos->vcdiffInfo.compressorID);
|
|
1021
|
-
check_on_error(HPATCH_COMPRESSTYPE_ERROR);
|
|
1022
|
-
}
|
|
1023
|
-
}else
|
|
1024
|
-
#endif
|
|
1025
|
-
check(hpatch_FALSE,HPATCH_HDIFFINFO_ERROR,"is hdiff file? get diffInfo");
|
|
1026
|
-
}
|
|
1027
|
-
if (decompressPlugin->open==0){
|
|
1028
|
-
if (getDecompressPlugin(diffInfo,decompressPlugin)){
|
|
1029
|
-
}else{
|
|
1030
|
-
LOG_ERR("can not decompress \"%s\" data ERROR!\n",out_diffInfos->diffInfo.compressType);
|
|
1031
|
-
check_on_error(HPATCH_COMPRESSTYPE_ERROR);
|
|
1032
|
-
}
|
|
1033
|
-
}
|
|
1034
|
-
clear:
|
|
1035
|
-
_isInClear=hpatch_TRUE;
|
|
1036
|
-
check(!diffData->fileError,HPATCH_FILEREAD_ERROR,"read file");
|
|
1037
|
-
return result;
|
|
1038
|
-
}
|
|
1039
|
-
|
|
1040
|
-
static void _printHDiffInfos(const _THDiffInfos* diffInfos,hpatch_BOOL isInDirDiff){
|
|
1041
|
-
const hpatch_compressedDiffInfo* diffInfo=&diffInfos->diffInfo;
|
|
1042
|
-
{
|
|
1043
|
-
const char* typeTag="HDiff";
|
|
1044
|
-
#if (_IS_NEED_SINGLE_STREAM_DIFF)
|
|
1045
|
-
if (diffInfos->isSingleCompressedDiff) typeTag="SHDiff";
|
|
692
|
+
_trySetChecksum(out_checksumPlugin,checksumType,&fadler32ChecksumPlugin);
|
|
1046
693
|
#endif
|
|
1047
|
-
#
|
|
1048
|
-
|
|
1049
|
-
if (diffInfos->bsdiffInfo.isEndsleyBsdiff)
|
|
1050
|
-
typeTag="BSDiff (endsley/bsdiff)";
|
|
1051
|
-
else
|
|
1052
|
-
typeTag="BSDiff";
|
|
1053
|
-
}
|
|
1054
|
-
#endif
|
|
1055
|
-
#if (_IS_NEED_VCDIFF)
|
|
1056
|
-
if (diffInfos->isVcDiff){
|
|
1057
|
-
if (diffInfos->vcdiffInfo.isHDiffzAppHead_a)
|
|
1058
|
-
typeTag="VCDiff (with hdiffz tag)";
|
|
1059
|
-
else if (diffInfos->vcdiffInfo.isGoogleVersion)
|
|
1060
|
-
typeTag="VCDiff (with google tag)";
|
|
1061
|
-
else
|
|
1062
|
-
typeTag="VCDiff";
|
|
1063
|
-
}
|
|
694
|
+
#ifdef _ChecksumPlugin_fadler64
|
|
695
|
+
_trySetChecksum(out_checksumPlugin,checksumType,&fadler64ChecksumPlugin);
|
|
1064
696
|
#endif
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
if (diffInfo->oldDataSize==_kUnavailableSize)
|
|
1068
|
-
printf(" saved oldDataSize: unavailable\n");
|
|
1069
|
-
else
|
|
1070
|
-
printf(" saved oldDataSize: %" PRIu64 "\n",diffInfo->oldDataSize);
|
|
1071
|
-
printf(" saved newDataSize: %" PRIu64 "\n",diffInfo->newDataSize);
|
|
1072
|
-
printf(" compressType: \"%s\" (need decompress %d)\n",diffInfo->compressType,diffInfo->compressedCount);
|
|
1073
|
-
#if (_IS_NEED_SINGLE_STREAM_DIFF)
|
|
1074
|
-
if (diffInfos->isSingleCompressedDiff)
|
|
1075
|
-
printf(" stepMemSize: %" PRIu64 "\n",diffInfos->sdiffInfo.stepMemSize);
|
|
697
|
+
#ifdef _ChecksumPlugin_fadler128
|
|
698
|
+
_trySetChecksum(out_checksumPlugin,checksumType,&fadler128ChecksumPlugin);
|
|
1076
699
|
#endif
|
|
1077
|
-
#
|
|
1078
|
-
|
|
1079
|
-
printf(" maxSrcWindows: %" PRIu64 "\n",diffInfos->vcdiffInfo.maxSrcWindowsSize);
|
|
1080
|
-
printf(" maxTargetWindows: %" PRIu64 "\n",diffInfos->vcdiffInfo.maxTargetWindowsSize);
|
|
1081
|
-
}
|
|
700
|
+
#ifdef _ChecksumPlugin_md5
|
|
701
|
+
_trySetChecksum(out_checksumPlugin,checksumType,&md5ChecksumPlugin);
|
|
1082
702
|
#endif
|
|
703
|
+
return (0!=*out_checksumPlugin);
|
|
1083
704
|
}
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
#if (_IS_NEED_CMDLINE)
|
|
1087
|
-
#if (_IS_NEED_DIR_DIFF_PATCH)
|
|
1088
|
-
#include "dirDiffPatch/dir_patch/dir_patch_private.h"
|
|
1089
|
-
|
|
1090
|
-
static void _printDirDiffInfos(const TDirDiffInfo* dirDiffInfo,const _TDirDiffHead* head){
|
|
1091
|
-
if (!dirDiffInfo->isDirDiff) return;
|
|
1092
|
-
printf(" diffDataType: DirHDiff\n");
|
|
1093
|
-
printf(" checksumType: \"%s\"\n",dirDiffInfo->checksumType);
|
|
1094
|
-
printf(" oldPathIsDir: %s\n",dirDiffInfo->oldPathIsDir?"true":"false");
|
|
1095
|
-
printf(" newPathIsDir: %s\n",dirDiffInfo->newPathIsDir?"true":"false");
|
|
1096
|
-
printf(" new path count: %" PRIu64 " (fileCount:%" PRIu64 ")\n",
|
|
1097
|
-
(hpatch_StreamPos_t)head->newPathCount,(hpatch_StreamPos_t)(head->sameFilePairCount+head->newRefFileCount));
|
|
1098
|
-
printf(" copy from old count: %" PRIu64 " (copySize: %" PRIu64 ")\n",
|
|
1099
|
-
(hpatch_StreamPos_t)head->sameFilePairCount,head->sameFileSize);
|
|
1100
|
-
printf(" ref old file count: %" PRIu64 " (oldRefSize: %" PRIu64 ")\n",
|
|
1101
|
-
(hpatch_StreamPos_t)head->oldRefFileCount,dirDiffInfo->hdiffInfo.oldDataSize);
|
|
1102
|
-
printf(" ref new file count: %" PRIu64 " (newRefSize: %" PRIu64 ")\n",
|
|
1103
|
-
(hpatch_StreamPos_t)head->newRefFileCount,dirDiffInfo->hdiffInfo.newDataSize);
|
|
1104
|
-
printf(" oldSumSize: %" PRIu64 "\n",dirDiffInfo->hdiffInfo.oldDataSize+head->sameFileSize);
|
|
1105
|
-
printf(" newSumSize: %" PRIu64 "\n",dirDiffInfo->hdiffInfo.newDataSize+head->sameFileSize);
|
|
1106
|
-
|
|
1107
|
-
{//hdiffInfo
|
|
1108
|
-
_THDiffInfos diffInfos={0};
|
|
1109
|
-
diffInfos.diffInfo=dirDiffInfo->hdiffInfo;
|
|
1110
|
-
#if (_IS_NEED_SINGLE_STREAM_DIFF)
|
|
1111
|
-
if (dirDiffInfo->isSingleCompressedDiff){
|
|
1112
|
-
diffInfos.isSingleCompressedDiff=dirDiffInfo->isSingleCompressedDiff;
|
|
1113
|
-
diffInfos.sdiffInfo=dirDiffInfo->sdiffInfo;
|
|
1114
|
-
}
|
|
1115
|
-
#endif
|
|
1116
|
-
_printHDiffInfos(&diffInfos,hpatch_TRUE);
|
|
1117
|
-
}
|
|
1118
|
-
}
|
|
1119
|
-
|
|
1120
705
|
#endif
|
|
1121
706
|
|
|
1122
|
-
static int _printFileInfos(const char* fileName,const char* fileTag){
|
|
1123
|
-
int result=HPATCH_SUCCESS;
|
|
1124
|
-
int _isInClear=hpatch_FALSE;
|
|
1125
|
-
hpatch_BOOL isDirDiff=hpatch_FALSE;
|
|
1126
|
-
hpatch_TFileStreamInput diffData;
|
|
1127
|
-
hpatch_TFileStreamInput_init(&diffData);
|
|
1128
|
-
{//open
|
|
1129
|
-
printf("%sName: \"",fileTag); _log_info_utf8(fileName); printf("\"\n");
|
|
1130
|
-
check(hpatch_TFileStreamInput_open(&diffData,fileName),
|
|
1131
|
-
HPATCH_OPENREAD_ERROR,"open file for read");
|
|
1132
|
-
printf("%sSize: %" PRIu64 "\n",fileTag,diffData.base.streamSize);
|
|
1133
|
-
}
|
|
1134
|
-
#if (_IS_NEED_DIR_DIFF_PATCH)
|
|
1135
|
-
{
|
|
1136
|
-
TDirDiffInfo dirDiffInfo={0};
|
|
1137
|
-
_TDirDiffHead dirHead={0};
|
|
1138
|
-
if (read_dirdiff_head(&dirDiffInfo,&dirHead,&diffData.base))
|
|
1139
|
-
isDirDiff=dirDiffInfo.isDirDiff;
|
|
1140
|
-
check(!diffData.fileError,HPATCH_FILEREAD_ERROR,"read file");
|
|
1141
|
-
if (isDirDiff)
|
|
1142
|
-
_printDirDiffInfos(&dirDiffInfo,&dirHead);
|
|
1143
|
-
}
|
|
1144
|
-
#endif
|
|
1145
|
-
if (!isDirDiff){
|
|
1146
|
-
_THDiffInfos diffInfos={0};
|
|
1147
|
-
result=_getHDiffInfos(&diffInfos,&diffData);
|
|
1148
|
-
if ((result!=HPATCH_SUCCESS)&&(result!=HPATCH_COMPRESSTYPE_ERROR))
|
|
1149
|
-
check_on_error(result);
|
|
1150
|
-
_printHDiffInfos(&diffInfos,isDirDiff);
|
|
1151
|
-
}
|
|
1152
|
-
|
|
1153
|
-
clear:
|
|
1154
|
-
_isInClear=hpatch_TRUE;
|
|
1155
|
-
check(hpatch_TFileStreamInput_close(&diffData),HPATCH_FILECLOSE_ERROR,"file close");
|
|
1156
|
-
return result;
|
|
1157
|
-
}
|
|
1158
|
-
|
|
1159
|
-
int hpatch_printFilesInfos(int fileCount,const char* fileNames[]){
|
|
1160
|
-
int i;
|
|
1161
|
-
int result=0;
|
|
1162
|
-
for (i=0;i<fileCount;++i){
|
|
1163
|
-
if (i>0) printf("\n");
|
|
1164
|
-
int ret=_printFileInfos(fileNames[i],"file");
|
|
1165
|
-
if (result==0) result=ret;
|
|
1166
|
-
}
|
|
1167
|
-
if (fileCount==0)
|
|
1168
|
-
printf("please input diffFile for print it's infos\n");
|
|
1169
|
-
return result;
|
|
1170
|
-
}
|
|
1171
|
-
#endif //_IS_NEED_CMDLINE
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
707
|
#define _free_mem(p) { if (p) { free(p); p=0; } }
|
|
1175
708
|
|
|
1176
|
-
static TByte* getPatchMemCache(hpatch_BOOL isLoadOldAll,size_t patchCacheSize,
|
|
709
|
+
static TByte* getPatchMemCache(hpatch_BOOL isLoadOldAll,size_t patchCacheSize,
|
|
1177
710
|
hpatch_StreamPos_t oldDataSize,size_t* out_memCacheSize){
|
|
1178
711
|
TByte* temp_cache=0;
|
|
1179
712
|
size_t temp_cache_size;
|
|
1180
|
-
{
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
if (
|
|
1190
|
-
|
|
1191
|
-
temp_cache_size=
|
|
713
|
+
if (isLoadOldAll){
|
|
714
|
+
size_t addSize=kPatchCacheSize_bestmin;
|
|
715
|
+
if (addSize>oldDataSize+kPatchCacheSize_min)
|
|
716
|
+
addSize=(size_t)(oldDataSize+kPatchCacheSize_min);
|
|
717
|
+
assert(patchCacheSize==0);
|
|
718
|
+
temp_cache_size=(size_t)(oldDataSize+addSize);
|
|
719
|
+
if (temp_cache_size!=oldDataSize+addSize)
|
|
720
|
+
temp_cache_size=kPatchCacheSize_bestmax;//can not load all,load part
|
|
721
|
+
}else{
|
|
722
|
+
if (patchCacheSize<kPatchCacheSize_min)
|
|
723
|
+
patchCacheSize=kPatchCacheSize_min;
|
|
724
|
+
temp_cache_size=patchCacheSize;
|
|
725
|
+
if (temp_cache_size>oldDataSize+kPatchCacheSize_bestmin)
|
|
726
|
+
temp_cache_size=(size_t)(oldDataSize+kPatchCacheSize_bestmin);
|
|
1192
727
|
}
|
|
1193
|
-
while (
|
|
1194
|
-
temp_cache=(TByte*)malloc(
|
|
1195
|
-
if (temp_cache)
|
|
1196
|
-
|
|
728
|
+
while (!temp_cache) {
|
|
729
|
+
temp_cache=(TByte*)malloc(temp_cache_size);
|
|
730
|
+
if ((!temp_cache)&&(temp_cache_size>=kPatchCacheSize_min*2))
|
|
731
|
+
temp_cache_size>>=1;
|
|
1197
732
|
}
|
|
1198
|
-
*out_memCacheSize=(temp_cache)?
|
|
733
|
+
*out_memCacheSize=(temp_cache)?temp_cache_size:0;
|
|
1199
734
|
return temp_cache;
|
|
1200
735
|
}
|
|
1201
736
|
|
|
1202
|
-
#if (_IS_NEED_PRINT_PROGRESS)
|
|
1203
|
-
typedef struct hpatch_TProgressStreamOutput{
|
|
1204
|
-
hpatch_TStreamOutput base;
|
|
1205
|
-
const hpatch_TStreamOutput* streamOutput;
|
|
1206
|
-
double time0;
|
|
1207
|
-
double progressR;
|
|
1208
|
-
unsigned int progress;
|
|
1209
|
-
} hpatch_TProgressStreamOutput;
|
|
1210
|
-
static void _progressStreamOutput_updateProgress(hpatch_TProgressStreamOutput* self,hpatch_StreamPos_t curPos){
|
|
1211
|
-
unsigned int progress=(unsigned int)((curPos*self->progressR)*1000+0.5);
|
|
1212
|
-
progress=((progress<1000)&(((curPos<self->base.streamSize))))?progress:1000;
|
|
1213
|
-
if (progress!=self->progress){
|
|
1214
|
-
double time1=clock_s();
|
|
1215
|
-
hpatch_BOOL isEnd=(progress==1000);
|
|
1216
|
-
if ((time1>=self->time0+1.0/3)|isEnd){
|
|
1217
|
-
const char* progressStr="=============================="; //strlen==30
|
|
1218
|
-
self->progress=progress;
|
|
1219
|
-
self->time0=time1;
|
|
1220
|
-
printf("\r patch progress: [%-30s] %.1f%% %s",
|
|
1221
|
-
progressStr+((1000-progress)*30/1000),progress*0.1,isEnd?"\n":"");
|
|
1222
|
-
fflush(stdout);
|
|
1223
|
-
}
|
|
1224
|
-
}
|
|
1225
|
-
}
|
|
1226
|
-
static hpatch_BOOL _progressStreamOutput_read_writed(const struct hpatch_TStreamOutput* stream,hpatch_StreamPos_t readFromPos,
|
|
1227
|
-
unsigned char* out_data,unsigned char* out_data_end){
|
|
1228
|
-
hpatch_TProgressStreamOutput* self=(hpatch_TProgressStreamOutput*)stream->streamImport;
|
|
1229
|
-
return self->streamOutput->read_writed(self->streamOutput,readFromPos,out_data,out_data_end);
|
|
1230
|
-
}
|
|
1231
|
-
static hpatch_BOOL _progressStreamOutput_write(const struct hpatch_TStreamOutput* stream,hpatch_StreamPos_t writeToPos,
|
|
1232
|
-
const unsigned char* data,const unsigned char* data_end){
|
|
1233
|
-
hpatch_TProgressStreamOutput* self=(hpatch_TProgressStreamOutput*)stream->streamImport;
|
|
1234
|
-
hpatch_BOOL result=self->streamOutput->write(self->streamOutput,writeToPos,data,data_end);
|
|
1235
|
-
if (result) _progressStreamOutput_updateProgress(self,writeToPos+(hpatch_size_t)(data_end-data));
|
|
1236
|
-
return result;
|
|
1237
|
-
}
|
|
1238
|
-
|
|
1239
|
-
static const hpatch_TStreamOutput* _progressStreamInput_wrapper(hpatch_TProgressStreamOutput* self,const hpatch_TStreamOutput* streamOutput){
|
|
1240
|
-
memset(self,0,sizeof(*self));
|
|
1241
|
-
if (!hpatch_getIsAtty(stdout))
|
|
1242
|
-
return streamOutput; //when stdout redirected to a file, not show progress
|
|
1243
|
-
self->base.streamImport=self;
|
|
1244
|
-
self->base.streamSize=streamOutput->streamSize;
|
|
1245
|
-
self->base.write=_progressStreamOutput_write;
|
|
1246
|
-
self->base.read_writed=streamOutput->read_writed?_progressStreamOutput_read_writed:0;
|
|
1247
|
-
self->streamOutput=streamOutput;
|
|
1248
|
-
self->progress=-1;
|
|
1249
|
-
self->progressR=1.0/(streamOutput->streamSize?streamOutput->streamSize:1);
|
|
1250
|
-
_progressStreamOutput_updateProgress(self,0);
|
|
1251
|
-
return &self->base;
|
|
1252
|
-
}
|
|
1253
|
-
#endif //_IS_NEED_PRINT_PROGRESS
|
|
1254
737
|
|
|
1255
|
-
int hpatch(const char* oldFileName,const char* diffFileName,
|
|
1256
|
-
hpatch_BOOL isLoadOldAll,size_t patchCacheSize,
|
|
1257
|
-
hpatch_StreamPos_t
|
|
738
|
+
int hpatch(const char* oldFileName,const char* diffFileName,
|
|
739
|
+
const char* outNewFileName,hpatch_BOOL isLoadOldAll,size_t patchCacheSize,
|
|
740
|
+
hpatch_StreamPos_t diffDataOffert,hpatch_StreamPos_t diffDataSize){
|
|
1258
741
|
int result=HPATCH_SUCCESS;
|
|
1259
742
|
int _isInClear=hpatch_FALSE;
|
|
1260
743
|
double time0=clock_s();
|
|
1261
|
-
|
|
1262
|
-
|
|
744
|
+
#if (_IS_NEED_SINGLE_STREAM_DIFF)
|
|
745
|
+
hpatch_BOOL isSingleStreamDiff=hpatch_FALSE;
|
|
746
|
+
hpatch_singleCompressedDiffInfo sdiffInfo;
|
|
747
|
+
#endif
|
|
748
|
+
hpatch_TDecompress* decompressPlugin=0;
|
|
1263
749
|
hpatch_TFileStreamOutput newData;
|
|
1264
750
|
hpatch_TFileStreamInput diffData;
|
|
1265
751
|
hpatch_TFileStreamInput oldData;
|
|
1266
|
-
|
|
1267
|
-
const hpatch_TStreamOutput* pnewData=&newData.base;
|
|
752
|
+
hpatch_TStreamInput* poldData=&oldData.base;
|
|
1268
753
|
TByte* temp_cache=0;
|
|
1269
754
|
size_t temp_cache_size;
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
hpatch_TProgressStreamOutput _progressStreamOutput;
|
|
1273
|
-
#endif
|
|
755
|
+
hpatch_StreamPos_t savedNewSize=0;
|
|
756
|
+
hpatch_BOOL patch_result;
|
|
1274
757
|
hpatch_TFileStreamInput_init(&oldData);
|
|
1275
758
|
hpatch_TFileStreamInput_init(&diffData);
|
|
1276
759
|
hpatch_TFileStreamOutput_init(&newData);
|
|
1277
760
|
{//open
|
|
1278
|
-
printf( "old : \"");
|
|
1279
|
-
printf("\"\ndiff: \"");
|
|
1280
|
-
printf("\"\nout : \"");
|
|
761
|
+
printf( "old : \""); hpatch_printPath_utf8(oldFileName);
|
|
762
|
+
printf("\"\ndiff: \""); hpatch_printPath_utf8(diffFileName);
|
|
763
|
+
printf("\"\nout : \""); hpatch_printPath_utf8(outNewFileName);
|
|
1281
764
|
printf("\"\n");
|
|
1282
|
-
if (
|
|
765
|
+
if (0==strcmp(oldFileName,"")){ // isOldPathInputEmpty
|
|
1283
766
|
mem_as_hStreamInput(&oldData.base,0,0);
|
|
1284
767
|
}else{
|
|
1285
768
|
check(hpatch_TFileStreamInput_open(&oldData,oldFileName),
|
|
@@ -1297,94 +780,62 @@ int hpatch(const char* oldFileName,const char* diffFileName,const char* outNewFi
|
|
|
1297
780
|
}
|
|
1298
781
|
#endif
|
|
1299
782
|
}
|
|
1300
|
-
printf(" input oldDataSize: %" PRIu64 "\n",poldData->streamSize);
|
|
1301
|
-
printf(" diffDataSize: %" PRIu64 "\n",diffData.base.streamSize);
|
|
1302
783
|
|
|
1303
|
-
{//info
|
|
1304
|
-
int ret=_getHDiffInfos(&diffInfos,&diffData);
|
|
1305
|
-
#if (_IS_NEED_PRINT_LOG)
|
|
1306
|
-
if ((ret!=HPATCH_SUCCESS)&&(ret!=HPATCH_COMPRESSTYPE_ERROR))
|
|
1307
|
-
check_on_error(ret);
|
|
1308
|
-
_printHDiffInfos(&diffInfos,hpatch_FALSE);
|
|
1309
|
-
printf("\n");
|
|
1310
|
-
#endif
|
|
1311
|
-
if (ret!=HPATCH_SUCCESS)
|
|
1312
|
-
check_on_error(ret);
|
|
1313
|
-
}
|
|
1314
|
-
if (decompressPlugin->open==0) decompressPlugin=0;
|
|
1315
|
-
if ((poldData->streamSize!=diffInfos.diffInfo.oldDataSize)&&(diffInfos.diffInfo.oldDataSize!=_kUnavailableSize)){
|
|
1316
|
-
LOG_ERR("input oldFile oldDataSize %" PRIu64 " != diffFile saved oldDataSize %" PRIu64 " ERROR!\n",
|
|
1317
|
-
poldData->streamSize,diffInfos.diffInfo.oldDataSize);
|
|
1318
|
-
check_on_error(HPATCH_FILEDATA_ERROR);
|
|
1319
|
-
}
|
|
1320
|
-
|
|
1321
|
-
check(hpatch_TFileStreamOutput_open(&newData, outNewFileName,diffInfos.diffInfo.newDataSize),
|
|
1322
|
-
HPATCH_OPENWRITE_ERROR,"open out newFile for write");
|
|
1323
|
-
#if (_IS_NEED_VCDIFF)
|
|
1324
|
-
if (diffInfos.isVcDiff) hpatch_TFileStreamOutput_setRandomOut(&newData,hpatch_TRUE);
|
|
1325
|
-
#endif
|
|
1326
784
|
{
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
if (diffInfos.isVcDiff){
|
|
1331
|
-
hpatch_StreamPos_t maxSrcTargetSize=diffInfos.vcdiffInfo.maxSrcWindowsSize+diffInfos.vcdiffInfo.maxTargetWindowsSize;
|
|
1332
|
-
maxWindowSize=((!diffInfos.vcdiffInfo.isHDiffzAppHead_a)&&(maxSrcTargetSize<=maxWindowSize+64*(1<<20)))?
|
|
1333
|
-
maxSrcTargetSize:diffInfos.vcdiffInfo.maxSrcWindowsSize;
|
|
1334
|
-
if ((vcpatch_isInMem)&&(!diffInfos.vcdiffInfo.isHDiffzAppHead_a))
|
|
1335
|
-
isLoadOldAll=hpatch_TRUE;
|
|
1336
|
-
}
|
|
1337
|
-
#endif
|
|
785
|
+
hpatch_compressedDiffInfo diffInfo;
|
|
786
|
+
if (!getCompressedDiffInfo(&diffInfo,&diffData.base)){
|
|
787
|
+
check(!diffData.fileError,HPATCH_FILEREAD_ERROR,"read diffFile");
|
|
1338
788
|
#if (_IS_NEED_SINGLE_STREAM_DIFF)
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
789
|
+
if (getSingleCompressedDiffInfo(&sdiffInfo,&diffData.base,0)){
|
|
790
|
+
memcpy(diffInfo.compressType,sdiffInfo.compressType,strlen(sdiffInfo.compressType)+1);
|
|
791
|
+
diffInfo.compressedCount=(sdiffInfo.compressType[0]!='\0')?1:0;
|
|
792
|
+
diffInfo.newDataSize=sdiffInfo.newDataSize;
|
|
793
|
+
diffInfo.oldDataSize=sdiffInfo.oldDataSize;
|
|
794
|
+
patchCacheSize+=(size_t)sdiffInfo.stepMemSize;
|
|
795
|
+
if (patchCacheSize<sdiffInfo.stepMemSize+hpatch_kStreamCacheSize*3)
|
|
796
|
+
patchCacheSize=sdiffInfo.stepMemSize+hpatch_kStreamCacheSize*3;
|
|
797
|
+
isSingleStreamDiff=hpatch_TRUE;
|
|
798
|
+
printf("patch single compressed stream diffData!\n");
|
|
799
|
+
}else
|
|
1343
800
|
#endif
|
|
1344
|
-
|
|
801
|
+
check(hpatch_FALSE,HPATCH_HDIFFINFO_ERROR,"is hdiff file? getCompressedDiffInfo()");
|
|
802
|
+
}
|
|
803
|
+
if (poldData->streamSize!=diffInfo.oldDataSize){
|
|
804
|
+
fprintf(stderr,"oldFile dataSize %" PRIu64 " != diffFile saved oldDataSize %" PRIu64 " ERROR!\n",
|
|
805
|
+
poldData->streamSize,diffInfo.oldDataSize);
|
|
806
|
+
check_on_error(HPATCH_FILEDATA_ERROR);
|
|
807
|
+
}
|
|
808
|
+
if(!getDecompressPlugin(&diffInfo,&decompressPlugin)){
|
|
809
|
+
fprintf(stderr,"can not decompress \"%s\" data ERROR!\n",diffInfo.compressType);
|
|
810
|
+
check_on_error(HPATCH_COMPRESSTYPE_ERROR);
|
|
811
|
+
}
|
|
812
|
+
savedNewSize=diffInfo.newDataSize;
|
|
1345
813
|
}
|
|
814
|
+
check(hpatch_TFileStreamOutput_open(&newData, outNewFileName,savedNewSize),
|
|
815
|
+
HPATCH_OPENWRITE_ERROR,"open out newFile for write");
|
|
816
|
+
printf("oldDataSize : %" PRIu64 "\ndiffDataSize: %" PRIu64 "\nnewDataSize : %" PRIu64 "\n",
|
|
817
|
+
poldData->streamSize,diffData.base.streamSize,newData.base.streamSize);
|
|
818
|
+
|
|
819
|
+
temp_cache=getPatchMemCache(isLoadOldAll,patchCacheSize,poldData->streamSize, &temp_cache_size);
|
|
1346
820
|
check(temp_cache,HPATCH_MEM_ERROR,"alloc cache memory");
|
|
1347
|
-
#if (_IS_NEED_PRINT_PROGRESS)
|
|
1348
|
-
pnewData=_progressStreamInput_wrapper(&_progressStreamOutput,pnewData);
|
|
1349
|
-
#endif
|
|
1350
821
|
#if (_IS_NEED_SINGLE_STREAM_DIFF)
|
|
1351
|
-
if (
|
|
1352
|
-
check(temp_cache_size>=
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
temp_cache,temp_cache+temp_cache_size,0,threadNum))
|
|
1357
|
-
patch_result=HPATCH_SPATCH_ERROR;
|
|
1358
|
-
}else
|
|
1359
|
-
#endif
|
|
1360
|
-
#if (_IS_NEED_BSDIFF)
|
|
1361
|
-
if (diffInfos.isBsDiff){
|
|
1362
|
-
if (!bspatch_with_cache(pnewData,poldData,&diffData.base,decompressPlugin,
|
|
1363
|
-
temp_cache,temp_cache+temp_cache_size))
|
|
1364
|
-
patch_result=HPATCH_BSPATCH_ERROR;
|
|
1365
|
-
}else
|
|
1366
|
-
#endif
|
|
1367
|
-
#if (_IS_NEED_VCDIFF)
|
|
1368
|
-
if (diffInfos.isVcDiff){
|
|
1369
|
-
if (!vcpatch_with_cache(pnewData,poldData,&diffData.base,decompressPlugin,
|
|
1370
|
-
vcpatch_isChecksum,temp_cache,temp_cache+temp_cache_size))
|
|
1371
|
-
patch_result=HPATCH_VCPATCH_ERROR;
|
|
822
|
+
if (isSingleStreamDiff){
|
|
823
|
+
check(temp_cache_size>=sdiffInfo.stepMemSize+hpatch_kStreamCacheSize*3,HPATCH_MEM_ERROR,"alloc cache memory");
|
|
824
|
+
patch_result=patch_single_compressed_diff(&newData.base,poldData,&diffData.base,sdiffInfo.diffDataPos,
|
|
825
|
+
sdiffInfo.uncompressedSize,decompressPlugin,sdiffInfo.coverCount,
|
|
826
|
+
sdiffInfo.stepMemSize,temp_cache,temp_cache+temp_cache_size);
|
|
1372
827
|
}else
|
|
1373
828
|
#endif
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
patch_result=HPATCH_HPATCH_ERROR;
|
|
1378
|
-
}
|
|
1379
|
-
if (patch_result!=HPATCH_SUCCESS){
|
|
829
|
+
patch_result=patch_decompress_with_cache(&newData.base,poldData,&diffData.base,decompressPlugin,
|
|
830
|
+
temp_cache,temp_cache+temp_cache_size);
|
|
831
|
+
if (!patch_result){
|
|
1380
832
|
check(!oldData.fileError,HPATCH_FILEREAD_ERROR,"oldFile read");
|
|
1381
833
|
check(!diffData.fileError,HPATCH_FILEREAD_ERROR,"diffFile read");
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
check(hpatch_FALSE,patch_result,"patch run");
|
|
834
|
+
check(!newData.fileError,HPATCH_FILEWRITE_ERROR,"out newFile write");
|
|
835
|
+
check(hpatch_FALSE,HPATCH_PATCH_ERROR,"patch run");
|
|
1385
836
|
}
|
|
1386
837
|
if (newData.out_length!=newData.base.streamSize){
|
|
1387
|
-
|
|
838
|
+
fprintf(stderr,"out newFile dataSize %" PRIu64 " != diffFile saved newDataSize %" PRIu64 " ERROR!\n",
|
|
1388
839
|
newData.out_length,newData.base.streamSize);
|
|
1389
840
|
check_on_error(HPATCH_FILEDATA_ERROR);
|
|
1390
841
|
}
|
|
@@ -1404,7 +855,7 @@ clear:
|
|
|
1404
855
|
int hpatch_dir(const char* oldPath,const char* diffFileName,const char* outNewPath,
|
|
1405
856
|
hpatch_BOOL isLoadOldAll,size_t patchCacheSize,size_t kMaxOpenFileNumber,
|
|
1406
857
|
TDirPatchChecksumSet* checksumSet,IHPatchDirListener* hlistener,
|
|
1407
|
-
hpatch_StreamPos_t diffDataOffert,hpatch_StreamPos_t diffDataSize
|
|
858
|
+
hpatch_StreamPos_t diffDataOffert,hpatch_StreamPos_t diffDataSize){
|
|
1408
859
|
int result=HPATCH_SUCCESS;
|
|
1409
860
|
int _isInClear=hpatch_FALSE;
|
|
1410
861
|
double time0=clock_s();
|
|
@@ -1414,20 +865,15 @@ int hpatch_dir(const char* oldPath,const char* diffFileName,const char* outNewPa
|
|
|
1414
865
|
TByte* p_temp_mem=0;
|
|
1415
866
|
TByte* temp_cache=0;
|
|
1416
867
|
size_t temp_cache_size;
|
|
1417
|
-
size_t min_temp_cache_size=kPatchCacheSize_min;
|
|
1418
|
-
hpatch_TDecompress _decompressPlugin={0};
|
|
1419
868
|
const hpatch_TStreamInput* oldStream=0;
|
|
1420
869
|
const hpatch_TStreamOutput* newStream=0;
|
|
1421
|
-
#if (_IS_NEED_PRINT_PROGRESS)
|
|
1422
|
-
hpatch_TProgressStreamOutput _progressStreamOutput;
|
|
1423
|
-
#endif
|
|
1424
870
|
hpatch_TFileStreamInput_init(&diffData);
|
|
1425
871
|
TDirPatcher_init(&dirPatcher);
|
|
1426
|
-
|
|
872
|
+
assert(0!=strcmp(oldPath,outNewPath));
|
|
1427
873
|
{//dir diff info
|
|
1428
874
|
hpatch_BOOL rt;
|
|
1429
875
|
hpatch_TPathType oldType;
|
|
1430
|
-
if (
|
|
876
|
+
if (0==strcmp(oldPath,"")){ // isOldPathInputEmpty
|
|
1431
877
|
oldType=kPathType_file; //as empty file
|
|
1432
878
|
}else{
|
|
1433
879
|
check(hpatch_getPathStat(oldPath,&oldType,0),HPATCH_PATHTYPE_ERROR,"get oldPath type");
|
|
@@ -1454,50 +900,30 @@ int hpatch_dir(const char* oldPath,const char* diffFileName,const char* outNewPa
|
|
|
1454
900
|
check(kPathType_file==oldType,HPATCH_PATHTYPE_ERROR,"input old path need file");
|
|
1455
901
|
}
|
|
1456
902
|
printf( dirDiffInfo->oldPathIsDir?"old dir: \"":"old file: \"");
|
|
1457
|
-
|
|
1458
|
-
if (
|
|
1459
|
-
printf("%c",kPatch_dirSeparator);
|
|
903
|
+
hpatch_printPath_utf8(oldPath);
|
|
904
|
+
if (dirDiffInfo->oldPathIsDir&&(!hpatch_getIsDirName(oldPath))) printf("%c",kPatch_dirSeparator);
|
|
1460
905
|
printf( "\"\ndiffFile: \"");
|
|
1461
|
-
|
|
906
|
+
hpatch_printPath_utf8(diffFileName);
|
|
1462
907
|
printf(dirDiffInfo->newPathIsDir?"\"\nout dir: \"":"\"\nout file: \"");
|
|
1463
|
-
|
|
908
|
+
hpatch_printPath_utf8(outNewPath);
|
|
1464
909
|
if (dirDiffInfo->newPathIsDir&&(!hpatch_getIsDirName(outNewPath))) printf("%c",kPatch_dirSeparator);
|
|
1465
910
|
printf("\"\n");
|
|
1466
|
-
printf(" diffDataSize: %" PRIu64 "\n",diffData.base.streamSize);
|
|
1467
|
-
#if (_IS_NEED_PRINT_LOG)
|
|
1468
|
-
_printDirDiffInfos(dirDiffInfo,&dirPatcher.dirDiffHead);
|
|
1469
|
-
printf("\n");
|
|
1470
|
-
#endif
|
|
1471
911
|
}
|
|
1472
912
|
{//decompressPlugin
|
|
1473
|
-
hpatch_TDecompress*
|
|
913
|
+
hpatch_TDecompress* decompressPlugin=0;
|
|
1474
914
|
hpatch_compressedDiffInfo hdiffInfo;
|
|
1475
915
|
hdiffInfo=dirDiffInfo->hdiffInfo;
|
|
1476
916
|
hdiffInfo.compressedCount+=(dirDiffInfo->dirDataIsCompressed)?1:0;
|
|
1477
|
-
if(!getDecompressPlugin(&hdiffInfo
|
|
1478
|
-
|
|
917
|
+
if(!getDecompressPlugin(&hdiffInfo,&decompressPlugin)){
|
|
918
|
+
fprintf(stderr,"can not decompress \"%s\" data ERROR!\n",hdiffInfo.compressType);
|
|
1479
919
|
check_on_error(HPATCH_COMPRESSTYPE_ERROR);
|
|
1480
920
|
}
|
|
1481
|
-
if (decompressPlugin->open==0) decompressPlugin=0;
|
|
1482
921
|
//load dir data
|
|
1483
922
|
check(TDirPatcher_loadDirData(&dirPatcher,decompressPlugin,oldPath,outNewPath),
|
|
1484
923
|
DIRPATCH_LAOD_DIRDIFFDATA_ERROR,"load dir data in diffFile");
|
|
1485
924
|
}
|
|
1486
925
|
check(hlistener->patchBegin(hlistener,&dirPatcher),
|
|
1487
926
|
DIRPATCH_PATCHBEGIN_ERROR,"dir patch begin");
|
|
1488
|
-
{//mem cache
|
|
1489
|
-
size_t mustAppendMemSize=0;
|
|
1490
|
-
#if (_IS_NEED_SINGLE_STREAM_DIFF)
|
|
1491
|
-
if (dirDiffInfo->isSingleCompressedDiff){
|
|
1492
|
-
mustAppendMemSize+=(size_t)dirDiffInfo->sdiffInfo.stepMemSize;
|
|
1493
|
-
min_temp_cache_size+=(size_t)dirDiffInfo->sdiffInfo.stepMemSize;
|
|
1494
|
-
}
|
|
1495
|
-
#endif
|
|
1496
|
-
p_temp_mem=getPatchMemCache(isLoadOldAll,patchCacheSize,mustAppendMemSize,
|
|
1497
|
-
dirDiffInfo->hdiffInfo.oldDataSize, &temp_cache_size);
|
|
1498
|
-
check(p_temp_mem,HPATCH_MEM_ERROR,"alloc cache memory");
|
|
1499
|
-
temp_cache=p_temp_mem;
|
|
1500
|
-
}
|
|
1501
927
|
{// checksumPlugin
|
|
1502
928
|
int wantChecksumCount = checksumSet->isCheck_dirDiffData+checksumSet->isCheck_oldRefData+
|
|
1503
929
|
checksumSet->isCheck_newRefData+checksumSet->isCheck_copyFileData;
|
|
@@ -1505,16 +931,15 @@ int hpatch_dir(const char* oldPath,const char* diffFileName,const char* outNewPa
|
|
|
1505
931
|
if (wantChecksumCount>0){
|
|
1506
932
|
if (strlen(dirDiffInfo->checksumType)==0){
|
|
1507
933
|
memset(checksumSet,0,sizeof(*checksumSet));
|
|
1508
|
-
printf("
|
|
934
|
+
printf(" NOTE: no checksum saved in diffFile,can not do checksum\n");
|
|
1509
935
|
}else{
|
|
1510
936
|
if (!findChecksum(&checksumSet->checksumPlugin,dirDiffInfo->checksumType)){
|
|
1511
|
-
|
|
937
|
+
fprintf(stderr,"not found checksumType \"%s\" ERROR!\n",dirDiffInfo->checksumType);
|
|
1512
938
|
check_on_error(DIRPATCH_CHECKSUMTYPE_ERROR);
|
|
1513
939
|
}
|
|
1514
|
-
printf("hpatchz run with checksum plugin: \"%s\" (
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
if (!TDirPatcher_checksum(&dirPatcher,checksumSet,temp_cache,temp_cache+temp_cache_size)){
|
|
940
|
+
printf("hpatchz run with checksum plugin: \"%s\" (need checksum %d)\n",
|
|
941
|
+
dirDiffInfo->checksumType,wantChecksumCount);
|
|
942
|
+
if (!TDirPatcher_checksum(&dirPatcher,checksumSet)){
|
|
1518
943
|
check(!TDirPatcher_isDiffDataChecksumError(&dirPatcher),
|
|
1519
944
|
DIRPATCH_CHECKSUM_DIFFDATA_ERROR,"diffFile checksum");
|
|
1520
945
|
check(hpatch_FALSE,DIRPATCH_CHECKSUMSET_ERROR,"diffFile set checksum");
|
|
@@ -1522,9 +947,25 @@ int hpatch_dir(const char* oldPath,const char* diffFileName,const char* outNewPa
|
|
|
1522
947
|
}
|
|
1523
948
|
}
|
|
1524
949
|
}
|
|
1525
|
-
|
|
950
|
+
{//info
|
|
951
|
+
const _TDirDiffHead* head=&dirPatcher.dirDiffHead;
|
|
952
|
+
printf("DirPatch new path count: %" PRIu64 " (fileCount:%" PRIu64 ")\n",(hpatch_StreamPos_t)head->newPathCount,
|
|
953
|
+
(hpatch_StreamPos_t)(head->sameFilePairCount+head->newRefFileCount));
|
|
954
|
+
printf(" copy from old count: %" PRIu64 " (dataSize: %" PRIu64 ")\n",
|
|
955
|
+
(hpatch_StreamPos_t)head->sameFilePairCount,head->sameFileSize);
|
|
956
|
+
printf(" ref old file count: %" PRIu64 "\n",(hpatch_StreamPos_t)head->oldRefFileCount);
|
|
957
|
+
printf(" ref new file count: %" PRIu64 "\n",(hpatch_StreamPos_t)head->newRefFileCount);
|
|
958
|
+
printf("oldRefSize : %" PRIu64 "\ndiffDataSize: %" PRIu64 "\nnewRefSize : %" PRIu64 " (all newSize: %" PRIu64 ")\n",
|
|
959
|
+
dirDiffInfo->hdiffInfo.oldDataSize,diffData.base.streamSize,dirDiffInfo->hdiffInfo.newDataSize,
|
|
960
|
+
dirDiffInfo->hdiffInfo.newDataSize+head->sameFileSize);
|
|
961
|
+
}
|
|
962
|
+
{//mem cache
|
|
963
|
+
p_temp_mem=getPatchMemCache(isLoadOldAll,patchCacheSize,dirDiffInfo->hdiffInfo.oldDataSize, &temp_cache_size);
|
|
964
|
+
check(p_temp_mem,HPATCH_MEM_ERROR,"alloc cache memory");
|
|
965
|
+
temp_cache=p_temp_mem;
|
|
966
|
+
}
|
|
1526
967
|
{//old data
|
|
1527
|
-
if (temp_cache_size>=dirDiffInfo->hdiffInfo.oldDataSize+
|
|
968
|
+
if (temp_cache_size>=dirDiffInfo->hdiffInfo.oldDataSize+kPatchCacheSize_min){
|
|
1528
969
|
// all old while auto cache by patch; not need open old files at same time
|
|
1529
970
|
kMaxOpenFileNumber=kMaxOpenFileNumber_limit_min;
|
|
1530
971
|
}
|
|
@@ -1535,12 +976,8 @@ int hpatch_dir(const char* oldPath,const char* diffFileName,const char* outNewPa
|
|
|
1535
976
|
check(TDirPatcher_openNewDirAsStream(&dirPatcher,&hlistener->base,&newStream),
|
|
1536
977
|
DIRPATCH_OPEN_NEWPATH_ERROR,"open newFile");
|
|
1537
978
|
}
|
|
1538
|
-
#if (_IS_NEED_PRINT_PROGRESS)
|
|
1539
|
-
newStream=_progressStreamInput_wrapper(&_progressStreamOutput,newStream);
|
|
1540
|
-
#endif
|
|
1541
979
|
//patch
|
|
1542
|
-
if(!TDirPatcher_patch(&dirPatcher,newStream,oldStream,temp_cache,temp_cache+temp_cache_size
|
|
1543
|
-
check_dec(_decompressPlugin.decError);
|
|
980
|
+
if(!TDirPatcher_patch(&dirPatcher,newStream,oldStream,temp_cache,temp_cache+temp_cache_size)){
|
|
1544
981
|
check(!TDirPatcher_isOldRefDataChecksumError(&dirPatcher),
|
|
1545
982
|
DIRPATCH_CHECKSUM_OLDDATA_ERROR,"oldFile checksum");
|
|
1546
983
|
check(!TDirPatcher_isCopyDataChecksumError(&dirPatcher),
|
|
@@ -1549,15 +986,13 @@ int hpatch_dir(const char* oldPath,const char* diffFileName,const char* outNewPa
|
|
|
1549
986
|
DIRPATCH_CHECKSUM_NEWDATA_ERROR,"newFile checksum");
|
|
1550
987
|
check(hpatch_FALSE,DIRPATCH_PATCH_ERROR,"dir patch run");
|
|
1551
988
|
}
|
|
1552
|
-
printf(" patch ok!\n");
|
|
1553
989
|
clear:
|
|
1554
990
|
_isInClear=hpatch_TRUE;
|
|
1555
|
-
check(hlistener->patchFinish(hlistener,result==HPATCH_SUCCESS),
|
|
991
|
+
check(hlistener->patchFinish(hlistener,result==HPATCH_SUCCESS),
|
|
992
|
+
DIRPATCH_PATCHFINISH_ERROR,"dir patch finish");
|
|
1556
993
|
check(TDirPatcher_closeNewDirStream(&dirPatcher),DIRPATCH_CLOSE_NEWPATH_ERROR,"newPath close");
|
|
1557
994
|
check(TDirPatcher_closeOldRefStream(&dirPatcher),DIRPATCH_CLOSE_OLDPATH_ERROR,"oldPath close");
|
|
1558
995
|
TDirPatcher_close(&dirPatcher);
|
|
1559
|
-
check_ferr(dirPatcher.fileError,DIRPATCH_PATCH_FILE_ERROR,"dir patch file");
|
|
1560
|
-
check_ferr(hlistener->fileError,DIRPATCH_PATCH_FILE_ERROR,"dir patch file");
|
|
1561
996
|
check(hpatch_TFileStreamInput_close(&diffData),HPATCH_FILECLOSE_ERROR,"diffFile close");
|
|
1562
997
|
_free_mem(p_temp_mem);
|
|
1563
998
|
printf("\nhpatchz dir patch time: %.3f s\n",(clock_s()-time0));
|
|
@@ -1697,9 +1132,9 @@ int createSfx_notCheckDiffFile(const char* selfExecuteFileName,const char* diffF
|
|
|
1697
1132
|
hpatch_TFileStreamInput_init(&exeData);
|
|
1698
1133
|
hpatch_TFileStreamInput_init(&diffData);
|
|
1699
1134
|
hpatch_TFileStreamOutput_init(&out_sfxData);
|
|
1700
|
-
printf( "selfExecute: \"");
|
|
1701
|
-
printf("\"\ndiffFile : \"");
|
|
1702
|
-
printf("\"\nout sfxFile: \"");
|
|
1135
|
+
printf( "selfExecute: \""); hpatch_printPath_utf8(selfExecuteFileName);
|
|
1136
|
+
printf("\"\ndiffFile : \""); hpatch_printPath_utf8(diffFileName);
|
|
1137
|
+
printf("\"\nout sfxFile: \""); hpatch_printPath_utf8(out_sfxFileName);
|
|
1703
1138
|
printf("\"\n\n");
|
|
1704
1139
|
{//open
|
|
1705
1140
|
hpatch_StreamPos_t sfxFileLength=0;
|
|
@@ -1778,8 +1213,8 @@ hpatch_BOOL getDiffDataOffertInSfx(hpatch_StreamPos_t* out_diffDataOffert,hpatch
|
|
|
1778
1213
|
}
|
|
1779
1214
|
if (diffSize==(~(hpatch_uint64_t)0)) return hpatch_FALSE;
|
|
1780
1215
|
|
|
1781
|
-
|
|
1782
|
-
|
|
1216
|
+
*out_diffDataOffert=diffOff;
|
|
1217
|
+
*out_diffDataSize=diffSize;
|
|
1783
1218
|
return hpatch_TRUE;
|
|
1784
1219
|
}
|
|
1785
1220
|
|