react-native-update 10.34.3 → 10.34.5
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/react-native-update.podspec +0 -1
- package/react-native.config.js +1 -0
- package/src/client.ts +1 -2
- package/src/type.ts +1 -0
- 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
- package/ios/ImportReact.h +0 -2
|
@@ -14,7 +14,6 @@
|
|
|
14
14
|
#include "../../../Common/IntToString.h"
|
|
15
15
|
#include "../../../Common/StringConvert.h"
|
|
16
16
|
#include "../../../Common/StringToInt.h"
|
|
17
|
-
#include "../../../Common/UTFConvert.h"
|
|
18
17
|
#include "../../../Common/Wildcard.h"
|
|
19
18
|
|
|
20
19
|
#include "../../../Windows/FileDir.h"
|
|
@@ -29,17 +28,15 @@
|
|
|
29
28
|
#include "DefaultName.h"
|
|
30
29
|
#include "OpenArchive.h"
|
|
31
30
|
|
|
32
|
-
#ifndef
|
|
31
|
+
#ifndef _SFX
|
|
33
32
|
#include "SetProperties.h"
|
|
34
33
|
#endif
|
|
35
34
|
|
|
36
|
-
#ifndef Z7_SFX
|
|
37
35
|
#ifdef SHOW_DEBUG_INFO
|
|
38
36
|
#define PRF(x) x
|
|
39
37
|
#else
|
|
40
38
|
#define PRF(x)
|
|
41
39
|
#endif
|
|
42
|
-
#endif
|
|
43
40
|
|
|
44
41
|
// increase it, if you need to support larger SFX stubs
|
|
45
42
|
static const UInt64 kMaxCheckStartPosition = 1 << 23;
|
|
@@ -67,7 +64,7 @@ Open:
|
|
|
67
64
|
- open FAIL:
|
|
68
65
|
Try to open with all other types from offset 0 only.
|
|
69
66
|
If some open type is OK and physical archive size is uequal or larger
|
|
70
|
-
than file size, then return that archive with warning that
|
|
67
|
+
than file size, then return that archive with warning that can not be open as [extension type].
|
|
71
68
|
If extension was EXE, it will try to open as unknown_extension case
|
|
72
69
|
- file has unknown extension (like a.hhh)
|
|
73
70
|
It tries to open via parser code.
|
|
@@ -95,7 +92,7 @@ Open:
|
|
|
95
92
|
using namespace NWindows;
|
|
96
93
|
|
|
97
94
|
/*
|
|
98
|
-
#ifdef
|
|
95
|
+
#ifdef _SFX
|
|
99
96
|
#define OPEN_PROPS_PARAM
|
|
100
97
|
#else
|
|
101
98
|
#define OPEN_PROPS_PARAM , props
|
|
@@ -111,7 +108,7 @@ CArc::~CArc()
|
|
|
111
108
|
}
|
|
112
109
|
*/
|
|
113
110
|
|
|
114
|
-
#ifndef
|
|
111
|
+
#ifndef _SFX
|
|
115
112
|
|
|
116
113
|
namespace NArchive {
|
|
117
114
|
namespace NParser {
|
|
@@ -144,14 +141,14 @@ struct CParseItem
|
|
|
144
141
|
bool LenIsUnknown;
|
|
145
142
|
|
|
146
143
|
CParseItem():
|
|
147
|
-
|
|
144
|
+
LenIsUnknown(false),
|
|
148
145
|
FileTime_Defined(false),
|
|
149
146
|
UnpackSize_Defined(false),
|
|
150
|
-
NumSubDirs_Defined(false),
|
|
151
147
|
NumSubFiles_Defined(false),
|
|
148
|
+
NumSubDirs_Defined(false),
|
|
152
149
|
IsSelfExe(false),
|
|
153
|
-
IsNotArcType(false)
|
|
154
|
-
|
|
150
|
+
IsNotArcType(false)
|
|
151
|
+
// OkSize(0)
|
|
155
152
|
{}
|
|
156
153
|
|
|
157
154
|
/*
|
|
@@ -172,14 +169,23 @@ struct CParseItem
|
|
|
172
169
|
}
|
|
173
170
|
};
|
|
174
171
|
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
172
|
+
class CHandler:
|
|
173
|
+
public IInArchive,
|
|
174
|
+
public IInArchiveGetStream,
|
|
175
|
+
public CMyUnknownImp
|
|
176
|
+
{
|
|
178
177
|
public:
|
|
179
178
|
CObjectVector<CParseItem> _items;
|
|
180
179
|
UInt64 _maxEndOffset;
|
|
181
180
|
CMyComPtr<IInStream> _stream;
|
|
182
181
|
|
|
182
|
+
MY_UNKNOWN_IMP2(
|
|
183
|
+
IInArchive,
|
|
184
|
+
IInArchiveGetStream)
|
|
185
|
+
|
|
186
|
+
INTERFACE_IInArchive(;)
|
|
187
|
+
STDMETHOD(GetStream)(UInt32 index, ISequentialInStream **stream);
|
|
188
|
+
|
|
183
189
|
UInt64 GetLastEnd() const
|
|
184
190
|
{
|
|
185
191
|
if (_items.IsEmpty())
|
|
@@ -200,25 +206,23 @@ int CHandler::FindInsertPos(const CParseItem &item) const
|
|
|
200
206
|
unsigned left = 0, right = _items.Size();
|
|
201
207
|
while (left != right)
|
|
202
208
|
{
|
|
203
|
-
|
|
204
|
-
const CParseItem &midItem = _items[mid];
|
|
209
|
+
unsigned mid = (left + right) / 2;
|
|
210
|
+
const CParseItem & midItem = _items[mid];
|
|
205
211
|
if (item.Offset < midItem.Offset)
|
|
206
212
|
right = mid;
|
|
207
213
|
else if (item.Offset > midItem.Offset)
|
|
208
214
|
left = mid + 1;
|
|
209
215
|
else if (item.Size < midItem.Size)
|
|
210
216
|
right = mid;
|
|
211
|
-
/*
|
|
212
217
|
else if (item.Size > midItem.Size)
|
|
213
218
|
left = mid + 1;
|
|
214
|
-
*/
|
|
215
219
|
else
|
|
216
220
|
{
|
|
217
221
|
left = mid + 1;
|
|
218
222
|
// return -1;
|
|
219
223
|
}
|
|
220
224
|
}
|
|
221
|
-
return
|
|
225
|
+
return left;
|
|
222
226
|
}
|
|
223
227
|
|
|
224
228
|
void CHandler::AddUnknownItem(UInt64 next)
|
|
@@ -253,10 +257,10 @@ void CHandler::AddUnknownItem(UInt64 next)
|
|
|
253
257
|
void CHandler::AddItem(const CParseItem &item)
|
|
254
258
|
{
|
|
255
259
|
AddUnknownItem(item.Offset);
|
|
256
|
-
|
|
257
|
-
if (pos
|
|
260
|
+
int pos = FindInsertPos(item);
|
|
261
|
+
if (pos >= 0)
|
|
258
262
|
{
|
|
259
|
-
_items.Insert(
|
|
263
|
+
_items.Insert(pos, item);
|
|
260
264
|
UInt64 next = item.Offset + item.Size;
|
|
261
265
|
if (_maxEndOffset < next)
|
|
262
266
|
_maxEndOffset = next;
|
|
@@ -291,7 +295,7 @@ static const Byte kProps[] =
|
|
|
291
295
|
IMP_IInArchive_Props
|
|
292
296
|
IMP_IInArchive_ArcProps_NO
|
|
293
297
|
|
|
294
|
-
|
|
298
|
+
STDMETHODIMP CHandler::Open(IInStream *stream, const UInt64 *, IArchiveOpenCallback * /* openArchiveCallback */)
|
|
295
299
|
{
|
|
296
300
|
COM_TRY_BEGIN
|
|
297
301
|
{
|
|
@@ -302,20 +306,20 @@ Z7_COM7F_IMF(CHandler::Open(IInStream *stream, const UInt64 *, IArchiveOpenCallb
|
|
|
302
306
|
COM_TRY_END
|
|
303
307
|
}
|
|
304
308
|
|
|
305
|
-
|
|
309
|
+
STDMETHODIMP CHandler::Close()
|
|
306
310
|
{
|
|
307
311
|
_items.Clear();
|
|
308
312
|
_stream.Release();
|
|
309
313
|
return S_OK;
|
|
310
314
|
}
|
|
311
315
|
|
|
312
|
-
|
|
316
|
+
STDMETHODIMP CHandler::GetNumberOfItems(UInt32 *numItems)
|
|
313
317
|
{
|
|
314
318
|
*numItems = _items.Size();
|
|
315
319
|
return S_OK;
|
|
316
320
|
}
|
|
317
321
|
|
|
318
|
-
|
|
322
|
+
STDMETHODIMP CHandler::GetProperty(UInt32 index, PROPID propID, PROPVARIANT *value)
|
|
319
323
|
{
|
|
320
324
|
COM_TRY_BEGIN
|
|
321
325
|
NCOM::CPropVariant prop;
|
|
@@ -331,12 +335,12 @@ Z7_COM7F_IMF(CHandler::GetProperty(UInt32 index, PROPID propID, PROPVARIANT *val
|
|
|
331
335
|
UString s(sz);
|
|
332
336
|
if (!item.Name.IsEmpty())
|
|
333
337
|
{
|
|
334
|
-
s.
|
|
338
|
+
s += '.';
|
|
335
339
|
s += item.Name;
|
|
336
340
|
}
|
|
337
341
|
if (!item.Extension.IsEmpty())
|
|
338
342
|
{
|
|
339
|
-
s.
|
|
343
|
+
s += '.';
|
|
340
344
|
s += item.Extension;
|
|
341
345
|
}
|
|
342
346
|
prop = s; break;
|
|
@@ -350,19 +354,18 @@ Z7_COM7F_IMF(CHandler::GetProperty(UInt32 index, PROPID propID, PROPVARIANT *val
|
|
|
350
354
|
case kpidMTime: if (item.FileTime_Defined) prop = item.FileTime; break;
|
|
351
355
|
case kpidComment: if (!item.Comment.IsEmpty()) prop = item.Comment; break;
|
|
352
356
|
case kpidType: if (!item.ArcType.IsEmpty()) prop = item.ArcType; break;
|
|
353
|
-
default: break;
|
|
354
357
|
}
|
|
355
358
|
prop.Detach(value);
|
|
356
359
|
return S_OK;
|
|
357
360
|
COM_TRY_END
|
|
358
361
|
}
|
|
359
362
|
|
|
360
|
-
|
|
361
|
-
Int32 testMode, IArchiveExtractCallback *extractCallback)
|
|
363
|
+
HRESULT CHandler::Extract(const UInt32 *indices, UInt32 numItems,
|
|
364
|
+
Int32 testMode, IArchiveExtractCallback *extractCallback)
|
|
362
365
|
{
|
|
363
366
|
COM_TRY_BEGIN
|
|
364
367
|
|
|
365
|
-
|
|
368
|
+
bool allFilesMode = (numItems == (UInt32)(Int32)-1);
|
|
366
369
|
if (allFilesMode)
|
|
367
370
|
numItems = _items.Size();
|
|
368
371
|
if (_stream && numItems == 0)
|
|
@@ -393,35 +396,35 @@ Z7_COM7F_IMF(CHandler::Extract(const UInt32 *indices, UInt32 numItems,
|
|
|
393
396
|
{
|
|
394
397
|
lps->InSize = totalSize;
|
|
395
398
|
lps->OutSize = totalSize;
|
|
396
|
-
RINOK(lps->SetCur())
|
|
399
|
+
RINOK(lps->SetCur());
|
|
397
400
|
CMyComPtr<ISequentialOutStream> realOutStream;
|
|
398
|
-
|
|
401
|
+
Int32 askMode = testMode ?
|
|
399
402
|
NExtract::NAskMode::kTest :
|
|
400
403
|
NExtract::NAskMode::kExtract;
|
|
401
|
-
|
|
404
|
+
Int32 index = allFilesMode ? i : indices[i];
|
|
402
405
|
const CParseItem &item = _items[index];
|
|
403
406
|
|
|
404
|
-
RINOK(extractCallback->GetStream(index, &realOutStream, askMode))
|
|
407
|
+
RINOK(extractCallback->GetStream(index, &realOutStream, askMode));
|
|
405
408
|
UInt64 unpackSize = item.Size;
|
|
406
409
|
totalSize += unpackSize;
|
|
407
410
|
bool skipMode = false;
|
|
408
411
|
if (!testMode && !realOutStream)
|
|
409
412
|
continue;
|
|
410
|
-
RINOK(extractCallback->PrepareOperation(askMode))
|
|
413
|
+
RINOK(extractCallback->PrepareOperation(askMode));
|
|
411
414
|
|
|
412
415
|
outStreamSpec->SetStream(realOutStream);
|
|
413
416
|
realOutStream.Release();
|
|
414
417
|
outStreamSpec->Init(skipMode ? 0 : unpackSize, true);
|
|
415
418
|
|
|
416
419
|
Int32 opRes = NExtract::NOperationResult::kOK;
|
|
417
|
-
RINOK(
|
|
420
|
+
RINOK(_stream->Seek(item.Offset, STREAM_SEEK_SET, NULL));
|
|
418
421
|
streamSpec->Init(unpackSize);
|
|
419
|
-
RINOK(copyCoder->Code(inStream, outStream, NULL, NULL, progress))
|
|
422
|
+
RINOK(copyCoder->Code(inStream, outStream, NULL, NULL, progress));
|
|
420
423
|
|
|
421
424
|
if (outStreamSpec->GetRem() != 0)
|
|
422
425
|
opRes = NExtract::NOperationResult::kDataError;
|
|
423
426
|
outStreamSpec->ReleaseStream();
|
|
424
|
-
RINOK(extractCallback->SetOperationResult(opRes))
|
|
427
|
+
RINOK(extractCallback->SetOperationResult(opRes));
|
|
425
428
|
}
|
|
426
429
|
|
|
427
430
|
return S_OK;
|
|
@@ -430,7 +433,7 @@ Z7_COM7F_IMF(CHandler::Extract(const UInt32 *indices, UInt32 numItems,
|
|
|
430
433
|
}
|
|
431
434
|
|
|
432
435
|
|
|
433
|
-
|
|
436
|
+
STDMETHODIMP CHandler::GetStream(UInt32 index, ISequentialInStream **stream)
|
|
434
437
|
{
|
|
435
438
|
COM_TRY_BEGIN
|
|
436
439
|
const CParseItem &item = _items[index];
|
|
@@ -446,7 +449,7 @@ HRESULT Archive_GetItemBoolProp(IInArchive *arc, UInt32 index, PROPID propID, bo
|
|
|
446
449
|
{
|
|
447
450
|
NCOM::CPropVariant prop;
|
|
448
451
|
result = false;
|
|
449
|
-
RINOK(arc->GetProperty(index, propID, &prop))
|
|
452
|
+
RINOK(arc->GetProperty(index, propID, &prop));
|
|
450
453
|
if (prop.vt == VT_BOOL)
|
|
451
454
|
result = VARIANT_BOOLToBool(prop.boolVal);
|
|
452
455
|
else if (prop.vt != VT_EMPTY)
|
|
@@ -474,11 +477,11 @@ HRESULT Archive_IsItem_Deleted(IInArchive *arc, UInt32 index, bool &result) thro
|
|
|
474
477
|
return Archive_GetItemBoolProp(arc, index, kpidIsDeleted, result);
|
|
475
478
|
}
|
|
476
479
|
|
|
477
|
-
static HRESULT
|
|
480
|
+
static HRESULT Archive_GetArcBoolProp(IInArchive *arc, PROPID propid, bool &result) throw()
|
|
478
481
|
{
|
|
479
482
|
NCOM::CPropVariant prop;
|
|
480
483
|
result = false;
|
|
481
|
-
RINOK(arc->GetArchiveProperty(propid, &prop))
|
|
484
|
+
RINOK(arc->GetArchiveProperty(propid, &prop));
|
|
482
485
|
if (prop.vt == VT_BOOL)
|
|
483
486
|
result = VARIANT_BOOLToBool(prop.boolVal);
|
|
484
487
|
else if (prop.vt != VT_EMPTY)
|
|
@@ -490,17 +493,16 @@ static HRESULT Archive_GetArcProp_UInt(IInArchive *arc, PROPID propid, UInt64 &r
|
|
|
490
493
|
{
|
|
491
494
|
defined = false;
|
|
492
495
|
NCOM::CPropVariant prop;
|
|
493
|
-
RINOK(arc->GetArchiveProperty(propid, &prop))
|
|
496
|
+
RINOK(arc->GetArchiveProperty(propid, &prop));
|
|
494
497
|
switch (prop.vt)
|
|
495
498
|
{
|
|
496
|
-
case VT_UI4: result = prop.ulVal; break;
|
|
497
|
-
case VT_I4:
|
|
498
|
-
case VT_UI8: result = (UInt64)prop.uhVal.QuadPart; break;
|
|
499
|
-
case VT_I8:
|
|
500
|
-
case VT_EMPTY:
|
|
499
|
+
case VT_UI4: result = prop.ulVal; defined = true; break;
|
|
500
|
+
case VT_I4: result = (Int64)prop.lVal; defined = true; break;
|
|
501
|
+
case VT_UI8: result = (UInt64)prop.uhVal.QuadPart; defined = true; break;
|
|
502
|
+
case VT_I8: result = (UInt64)prop.hVal.QuadPart; defined = true; break;
|
|
503
|
+
case VT_EMPTY: break;
|
|
501
504
|
default: return E_FAIL;
|
|
502
505
|
}
|
|
503
|
-
defined = true;
|
|
504
506
|
return S_OK;
|
|
505
507
|
}
|
|
506
508
|
|
|
@@ -508,23 +510,22 @@ static HRESULT Archive_GetArcProp_Int(IInArchive *arc, PROPID propid, Int64 &res
|
|
|
508
510
|
{
|
|
509
511
|
defined = false;
|
|
510
512
|
NCOM::CPropVariant prop;
|
|
511
|
-
RINOK(arc->GetArchiveProperty(propid, &prop))
|
|
513
|
+
RINOK(arc->GetArchiveProperty(propid, &prop));
|
|
512
514
|
switch (prop.vt)
|
|
513
515
|
{
|
|
514
|
-
case VT_UI4: result = prop.ulVal; break;
|
|
515
|
-
case VT_I4:
|
|
516
|
-
case VT_UI8: result = (Int64)prop.uhVal.QuadPart; break;
|
|
517
|
-
case VT_I8:
|
|
518
|
-
case VT_EMPTY:
|
|
516
|
+
case VT_UI4: result = prop.ulVal; defined = true; break;
|
|
517
|
+
case VT_I4: result = prop.lVal; defined = true; break;
|
|
518
|
+
case VT_UI8: result = (Int64)prop.uhVal.QuadPart; defined = true; break;
|
|
519
|
+
case VT_I8: result = (Int64)prop.hVal.QuadPart; defined = true; break;
|
|
520
|
+
case VT_EMPTY: break;
|
|
519
521
|
default: return E_FAIL;
|
|
520
522
|
}
|
|
521
|
-
defined = true;
|
|
522
523
|
return S_OK;
|
|
523
524
|
}
|
|
524
525
|
|
|
525
|
-
#ifndef
|
|
526
|
+
#ifndef _SFX
|
|
526
527
|
|
|
527
|
-
HRESULT CArc::
|
|
528
|
+
HRESULT CArc::GetItemPathToParent(UInt32 index, UInt32 parent, UStringVector &parts) const
|
|
528
529
|
{
|
|
529
530
|
if (!GetRawProps)
|
|
530
531
|
return E_FAIL;
|
|
@@ -542,14 +543,14 @@ HRESULT CArc::GetItem_PathToParent(UInt32 index, UInt32 parent, UStringVector &p
|
|
|
542
543
|
const void *p;
|
|
543
544
|
UInt32 size;
|
|
544
545
|
UInt32 propType;
|
|
545
|
-
RINOK(GetRawProps->GetRawProp(curIndex, kpidName, &p, &size, &propType))
|
|
546
|
+
RINOK(GetRawProps->GetRawProp(curIndex, kpidName, &p, &size, &propType));
|
|
546
547
|
if (p && propType == PROP_DATA_TYPE_wchar_t_PTR_Z_LE)
|
|
547
548
|
s = (const wchar_t *)p;
|
|
548
549
|
else
|
|
549
550
|
#endif
|
|
550
551
|
{
|
|
551
552
|
NCOM::CPropVariant prop;
|
|
552
|
-
RINOK(Archive->GetProperty(curIndex, kpidName, &prop))
|
|
553
|
+
RINOK(Archive->GetProperty(curIndex, kpidName, &prop));
|
|
553
554
|
if (prop.vt == VT_BSTR && prop.bstrVal)
|
|
554
555
|
s.SetFromBstr(prop.bstrVal);
|
|
555
556
|
else if (prop.vt == VT_EMPTY)
|
|
@@ -560,7 +561,7 @@ HRESULT CArc::GetItem_PathToParent(UInt32 index, UInt32 parent, UStringVector &p
|
|
|
560
561
|
|
|
561
562
|
UInt32 curParent = (UInt32)(Int32)-1;
|
|
562
563
|
UInt32 parentType = 0;
|
|
563
|
-
RINOK(GetRawProps->GetParent(curIndex, &curParent, &parentType))
|
|
564
|
+
RINOK(GetRawProps->GetParent(curIndex, &curParent, &parentType));
|
|
564
565
|
|
|
565
566
|
// 18.06: fixed : we don't want to split name to parts
|
|
566
567
|
/*
|
|
@@ -585,7 +586,7 @@ HRESULT CArc::GetItem_PathToParent(UInt32 index, UInt32 parent, UStringVector &p
|
|
|
585
586
|
{
|
|
586
587
|
{
|
|
587
588
|
UString &s2 = parts[parts.Size() - 2];
|
|
588
|
-
s2
|
|
589
|
+
s2 += ':';
|
|
589
590
|
s2 += parts.Back();
|
|
590
591
|
}
|
|
591
592
|
parts.DeleteBack();
|
|
@@ -606,9 +607,7 @@ HRESULT CArc::GetItem_PathToParent(UInt32 index, UInt32 parent, UStringVector &p
|
|
|
606
607
|
|
|
607
608
|
#endif
|
|
608
609
|
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
HRESULT CArc::GetItem_Path(UInt32 index, UString &result) const
|
|
610
|
+
HRESULT CArc::GetItemPath(UInt32 index, UString &result) const
|
|
612
611
|
{
|
|
613
612
|
#ifdef MY_CPU_LE
|
|
614
613
|
if (GetRawProps)
|
|
@@ -622,42 +621,19 @@ HRESULT CArc::GetItem_Path(UInt32 index, UString &result) const
|
|
|
622
621
|
propType == NPropDataType::kUtf16z)
|
|
623
622
|
{
|
|
624
623
|
unsigned len = size / 2 - 1;
|
|
625
|
-
// (len) doesn't include null terminator
|
|
626
|
-
|
|
627
|
-
/*
|
|
628
|
-
#if WCHAR_MAX > 0xffff
|
|
629
|
-
len = (unsigned)Utf16LE__Get_Num_WCHARs(p, len);
|
|
630
|
-
|
|
631
|
-
wchar_t *s = result.GetBuf(len);
|
|
632
|
-
wchar_t *sEnd = Utf16LE__To_WCHARs_Sep(p, len, s);
|
|
633
|
-
if (s + len != sEnd) return E_FAIL;
|
|
634
|
-
*sEnd = 0;
|
|
635
|
-
|
|
636
|
-
#else
|
|
637
|
-
*/
|
|
638
|
-
|
|
639
624
|
wchar_t *s = result.GetBuf(len);
|
|
640
625
|
for (unsigned i = 0; i < len; i++)
|
|
641
626
|
{
|
|
642
627
|
wchar_t c = GetUi16(p);
|
|
643
628
|
p = (const void *)((const Byte *)p + 2);
|
|
644
|
-
|
|
645
629
|
#if WCHAR_PATH_SEPARATOR != L'/'
|
|
646
630
|
if (c == L'/')
|
|
647
631
|
c = WCHAR_PATH_SEPARATOR;
|
|
648
|
-
else if (c == L'\\')
|
|
649
|
-
c = WCHAR_IN_FILE_NAME_BACKSLASH_REPLACEMENT; // WSL scheme
|
|
650
632
|
#endif
|
|
651
|
-
|
|
652
633
|
*s++ = c;
|
|
653
634
|
}
|
|
654
635
|
*s = 0;
|
|
655
|
-
|
|
656
|
-
// #endif
|
|
657
|
-
|
|
658
636
|
result.ReleaseBuf_SetLen(len);
|
|
659
|
-
|
|
660
|
-
Convert_UnicodeEsc16_To_UnicodeEscHigh(result);
|
|
661
637
|
if (len != 0)
|
|
662
638
|
return S_OK;
|
|
663
639
|
}
|
|
@@ -734,7 +710,7 @@ HRESULT CArc::GetItem_Path(UInt32 index, UString &result) const
|
|
|
734
710
|
|
|
735
711
|
{
|
|
736
712
|
NCOM::CPropVariant prop;
|
|
737
|
-
RINOK(Archive->GetProperty(index, kpidPath, &prop))
|
|
713
|
+
RINOK(Archive->GetProperty(index, kpidPath, &prop));
|
|
738
714
|
if (prop.vt == VT_BSTR && prop.bstrVal)
|
|
739
715
|
result.SetFromBstr(prop.bstrVal);
|
|
740
716
|
else if (prop.vt == VT_EMPTY)
|
|
@@ -744,25 +720,23 @@ HRESULT CArc::GetItem_Path(UInt32 index, UString &result) const
|
|
|
744
720
|
}
|
|
745
721
|
|
|
746
722
|
if (result.IsEmpty())
|
|
747
|
-
return
|
|
748
|
-
|
|
749
|
-
Convert_UnicodeEsc16_To_UnicodeEscHigh(result);
|
|
723
|
+
return GetDefaultItemPath(index, result);
|
|
750
724
|
return S_OK;
|
|
751
725
|
}
|
|
752
726
|
|
|
753
|
-
HRESULT CArc::
|
|
727
|
+
HRESULT CArc::GetDefaultItemPath(UInt32 index, UString &result) const
|
|
754
728
|
{
|
|
755
729
|
result.Empty();
|
|
756
730
|
bool isDir;
|
|
757
|
-
RINOK(Archive_IsItem_Dir(Archive, index, isDir))
|
|
731
|
+
RINOK(Archive_IsItem_Dir(Archive, index, isDir));
|
|
758
732
|
if (!isDir)
|
|
759
733
|
{
|
|
760
734
|
result = DefaultName;
|
|
761
735
|
NCOM::CPropVariant prop;
|
|
762
|
-
RINOK(Archive->GetProperty(index, kpidExtension, &prop))
|
|
736
|
+
RINOK(Archive->GetProperty(index, kpidExtension, &prop));
|
|
763
737
|
if (prop.vt == VT_BSTR)
|
|
764
738
|
{
|
|
765
|
-
result.
|
|
739
|
+
result += '.';
|
|
766
740
|
result += prop.bstrVal;
|
|
767
741
|
}
|
|
768
742
|
else if (prop.vt != VT_EMPTY)
|
|
@@ -771,13 +745,13 @@ HRESULT CArc::GetItem_DefaultPath(UInt32 index, UString &result) const
|
|
|
771
745
|
return S_OK;
|
|
772
746
|
}
|
|
773
747
|
|
|
774
|
-
HRESULT CArc::
|
|
748
|
+
HRESULT CArc::GetItemPath2(UInt32 index, UString &result) const
|
|
775
749
|
{
|
|
776
|
-
RINOK(
|
|
750
|
+
RINOK(GetItemPath(index, result));
|
|
777
751
|
if (Ask_Deleted)
|
|
778
752
|
{
|
|
779
753
|
bool isDeleted = false;
|
|
780
|
-
RINOK(Archive_IsItem_Deleted(Archive, index, isDeleted))
|
|
754
|
+
RINOK(Archive_IsItem_Deleted(Archive, index, isDeleted));
|
|
781
755
|
if (isDeleted)
|
|
782
756
|
result.Insert(0, L"[DELETED]" WSTRING_PATH_SEPARATOR);
|
|
783
757
|
}
|
|
@@ -798,7 +772,7 @@ int FindAltStreamColon_in_Path(const wchar_t *path)
|
|
|
798
772
|
if (c == ':')
|
|
799
773
|
{
|
|
800
774
|
if (colonPos < 0)
|
|
801
|
-
colonPos =
|
|
775
|
+
colonPos = i;
|
|
802
776
|
continue;
|
|
803
777
|
}
|
|
804
778
|
if (c == WCHAR_PATH_SEPARATOR)
|
|
@@ -822,12 +796,12 @@ HRESULT CArc::GetItem(UInt32 index, CReadArcItem &item) const
|
|
|
822
796
|
|
|
823
797
|
item.PathParts.Clear();
|
|
824
798
|
|
|
825
|
-
RINOK(Archive_IsItem_Dir(Archive, index, item.IsDir))
|
|
799
|
+
RINOK(Archive_IsItem_Dir(Archive, index, item.IsDir));
|
|
826
800
|
item.MainIsDir = item.IsDir;
|
|
827
801
|
|
|
828
|
-
RINOK(
|
|
802
|
+
RINOK(GetItemPath2(index, item.Path));
|
|
829
803
|
|
|
830
|
-
#ifndef
|
|
804
|
+
#ifndef _SFX
|
|
831
805
|
UInt32 mainIndex = index;
|
|
832
806
|
#endif
|
|
833
807
|
|
|
@@ -836,7 +810,7 @@ HRESULT CArc::GetItem(UInt32 index, CReadArcItem &item) const
|
|
|
836
810
|
item.MainPath = item.Path;
|
|
837
811
|
if (Ask_AltStream)
|
|
838
812
|
{
|
|
839
|
-
RINOK(Archive_IsItem_AltStream(Archive, index, item.IsAltStream))
|
|
813
|
+
RINOK(Archive_IsItem_AltStream(Archive, index, item.IsAltStream));
|
|
840
814
|
}
|
|
841
815
|
|
|
842
816
|
bool needFindAltStream = false;
|
|
@@ -848,11 +822,11 @@ HRESULT CArc::GetItem(UInt32 index, CReadArcItem &item) const
|
|
|
848
822
|
{
|
|
849
823
|
UInt32 parentType = 0;
|
|
850
824
|
UInt32 parentIndex;
|
|
851
|
-
RINOK(GetRawProps->GetParent(index, &parentIndex, &parentType))
|
|
825
|
+
RINOK(GetRawProps->GetParent(index, &parentIndex, &parentType));
|
|
852
826
|
if (parentType == NParentType::kAltStream)
|
|
853
827
|
{
|
|
854
828
|
NCOM::CPropVariant prop;
|
|
855
|
-
RINOK(Archive->GetProperty(index, kpidName, &prop))
|
|
829
|
+
RINOK(Archive->GetProperty(index, kpidName, &prop));
|
|
856
830
|
if (prop.vt == VT_BSTR && prop.bstrVal)
|
|
857
831
|
item.AltStreamName.SetFromBstr(prop.bstrVal);
|
|
858
832
|
else if (prop.vt != VT_EMPTY)
|
|
@@ -877,8 +851,8 @@ HRESULT CArc::GetItem(UInt32 index, CReadArcItem &item) const
|
|
|
877
851
|
}
|
|
878
852
|
else
|
|
879
853
|
{
|
|
880
|
-
RINOK(
|
|
881
|
-
RINOK(Archive_IsItem_Dir(Archive, parentIndex, item.MainIsDir))
|
|
854
|
+
RINOK(GetItemPath2(parentIndex, item.MainPath));
|
|
855
|
+
RINOK(Archive_IsItem_Dir(Archive, parentIndex, item.MainIsDir));
|
|
882
856
|
}
|
|
883
857
|
}
|
|
884
858
|
}
|
|
@@ -891,8 +865,8 @@ HRESULT CArc::GetItem(UInt32 index, CReadArcItem &item) const
|
|
|
891
865
|
int colon = FindAltStreamColon_in_Path(item.Path);
|
|
892
866
|
if (colon >= 0)
|
|
893
867
|
{
|
|
894
|
-
item.MainPath.DeleteFrom(
|
|
895
|
-
item.AltStreamName = item.Path.Ptr(
|
|
868
|
+
item.MainPath.DeleteFrom(colon);
|
|
869
|
+
item.AltStreamName = item.Path.Ptr(colon + 1);
|
|
896
870
|
item.MainIsDir = (colon == 0 || IsPathSepar(item.Path[(unsigned)colon - 1]));
|
|
897
871
|
item.IsAltStream = true;
|
|
898
872
|
}
|
|
@@ -900,10 +874,10 @@ HRESULT CArc::GetItem(UInt32 index, CReadArcItem &item) const
|
|
|
900
874
|
|
|
901
875
|
#endif
|
|
902
876
|
|
|
903
|
-
#ifndef
|
|
877
|
+
#ifndef _SFX
|
|
904
878
|
if (item._use_baseParentFolder_mode)
|
|
905
879
|
{
|
|
906
|
-
RINOK(
|
|
880
|
+
RINOK(GetItemPathToParent(mainIndex, item._baseParentFolder, item.PathParts));
|
|
907
881
|
|
|
908
882
|
#ifdef SUPPORT_ALT_STREAMS
|
|
909
883
|
if ((item.WriteToAltStreamIfColon || needFindAltStream) && !item.PathParts.IsEmpty())
|
|
@@ -914,10 +888,10 @@ HRESULT CArc::GetItem(UInt32 index, CReadArcItem &item) const
|
|
|
914
888
|
colon = FindAltStreamColon_in_Path(s);
|
|
915
889
|
if (colon >= 0)
|
|
916
890
|
{
|
|
917
|
-
item.AltStreamName = s.Ptr(
|
|
891
|
+
item.AltStreamName = s.Ptr(colon + 1);
|
|
918
892
|
item.MainIsDir = (colon == 0 || IsPathSepar(s[(unsigned)colon - 1]));
|
|
919
893
|
item.IsAltStream = true;
|
|
920
|
-
s.DeleteFrom(
|
|
894
|
+
s.DeleteFrom(colon);
|
|
921
895
|
}
|
|
922
896
|
}
|
|
923
897
|
if (colon == 0)
|
|
@@ -939,14 +913,14 @@ HRESULT CArc::GetItem(UInt32 index, CReadArcItem &item) const
|
|
|
939
913
|
return S_OK;
|
|
940
914
|
}
|
|
941
915
|
|
|
942
|
-
#ifndef
|
|
916
|
+
#ifndef _SFX
|
|
943
917
|
|
|
944
918
|
static HRESULT Archive_GetItem_Size(IInArchive *archive, UInt32 index, UInt64 &size, bool &defined)
|
|
945
919
|
{
|
|
946
920
|
NCOM::CPropVariant prop;
|
|
947
921
|
defined = false;
|
|
948
922
|
size = 0;
|
|
949
|
-
RINOK(archive->GetProperty(index, kpidSize, &prop))
|
|
923
|
+
RINOK(archive->GetProperty(index, kpidSize, &prop));
|
|
950
924
|
switch (prop.vt)
|
|
951
925
|
{
|
|
952
926
|
case VT_UI1: size = prop.bVal; break;
|
|
@@ -962,12 +936,12 @@ static HRESULT Archive_GetItem_Size(IInArchive *archive, UInt32 index, UInt64 &s
|
|
|
962
936
|
|
|
963
937
|
#endif
|
|
964
938
|
|
|
965
|
-
HRESULT CArc::
|
|
939
|
+
HRESULT CArc::GetItemSize(UInt32 index, UInt64 &size, bool &defined) const
|
|
966
940
|
{
|
|
967
941
|
NCOM::CPropVariant prop;
|
|
968
942
|
defined = false;
|
|
969
943
|
size = 0;
|
|
970
|
-
RINOK(Archive->GetProperty(index, kpidSize, &prop))
|
|
944
|
+
RINOK(Archive->GetProperty(index, kpidSize, &prop));
|
|
971
945
|
switch (prop.vt)
|
|
972
946
|
{
|
|
973
947
|
case VT_UI1: size = prop.bVal; break;
|
|
@@ -981,56 +955,28 @@ HRESULT CArc::GetItem_Size(UInt32 index, UInt64 &size, bool &defined) const
|
|
|
981
955
|
return S_OK;
|
|
982
956
|
}
|
|
983
957
|
|
|
984
|
-
HRESULT CArc::
|
|
958
|
+
HRESULT CArc::GetItemMTime(UInt32 index, FILETIME &ft, bool &defined) const
|
|
985
959
|
{
|
|
986
|
-
at.Clear();
|
|
987
960
|
NCOM::CPropVariant prop;
|
|
988
|
-
|
|
989
|
-
|
|
961
|
+
defined = false;
|
|
962
|
+
ft.dwHighDateTime = ft.dwLowDateTime = 0;
|
|
963
|
+
RINOK(Archive->GetProperty(index, kpidMTime, &prop));
|
|
990
964
|
if (prop.vt == VT_FILETIME)
|
|
991
965
|
{
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
if (FILETIME_IsZero(prop.at) && MTime.Def)
|
|
995
|
-
{
|
|
996
|
-
at = MTime;
|
|
997
|
-
return S_OK;
|
|
998
|
-
}
|
|
999
|
-
*/
|
|
1000
|
-
at.Set_From_Prop(prop);
|
|
1001
|
-
if (at.Prec == 0)
|
|
1002
|
-
{
|
|
1003
|
-
// (at.Prec == 0) before version 22.
|
|
1004
|
-
// so kpidTimeType is required for that code
|
|
1005
|
-
prop.Clear();
|
|
1006
|
-
RINOK(Archive->GetProperty(index, kpidTimeType, &prop))
|
|
1007
|
-
if (prop.vt == VT_UI4)
|
|
1008
|
-
{
|
|
1009
|
-
UInt32 val = prop.ulVal;
|
|
1010
|
-
if (val == NFileTimeType::kWindows)
|
|
1011
|
-
val = k_PropVar_TimePrec_100ns;
|
|
1012
|
-
/*
|
|
1013
|
-
else if (val > k_PropVar_TimePrec_1ns)
|
|
1014
|
-
{
|
|
1015
|
-
val = k_PropVar_TimePrec_100ns;
|
|
1016
|
-
// val = k_PropVar_TimePrec_1ns;
|
|
1017
|
-
// return E_FAIL; // for debug
|
|
1018
|
-
}
|
|
1019
|
-
*/
|
|
1020
|
-
at.Prec = (UInt16)val;
|
|
1021
|
-
}
|
|
1022
|
-
}
|
|
1023
|
-
return S_OK;
|
|
966
|
+
ft = prop.filetime;
|
|
967
|
+
defined = true;
|
|
1024
968
|
}
|
|
1025
|
-
|
|
1026
|
-
if (prop.vt != VT_EMPTY)
|
|
969
|
+
else if (prop.vt != VT_EMPTY)
|
|
1027
970
|
return E_FAIL;
|
|
1028
|
-
if (
|
|
1029
|
-
|
|
971
|
+
else if (MTimeDefined)
|
|
972
|
+
{
|
|
973
|
+
ft = MTime;
|
|
974
|
+
defined = true;
|
|
975
|
+
}
|
|
1030
976
|
return S_OK;
|
|
1031
977
|
}
|
|
1032
978
|
|
|
1033
|
-
#ifndef
|
|
979
|
+
#ifndef _SFX
|
|
1034
980
|
|
|
1035
981
|
static inline bool TestSignature(const Byte *p1, const Byte *p2, size_t size)
|
|
1036
982
|
{
|
|
@@ -1040,43 +986,41 @@ static inline bool TestSignature(const Byte *p1, const Byte *p2, size_t size)
|
|
|
1040
986
|
return true;
|
|
1041
987
|
}
|
|
1042
988
|
|
|
1043
|
-
|
|
1044
989
|
static void MakeCheckOrder(CCodecs *codecs,
|
|
1045
990
|
CIntVector &orderIndices, unsigned numTypes, CIntVector &orderIndices2,
|
|
1046
991
|
const Byte *data, size_t dataSize)
|
|
1047
992
|
{
|
|
1048
993
|
for (unsigned i = 0; i < numTypes; i++)
|
|
1049
994
|
{
|
|
1050
|
-
|
|
995
|
+
int index = orderIndices[i];
|
|
1051
996
|
if (index < 0)
|
|
1052
997
|
continue;
|
|
1053
998
|
const CArcInfoEx &ai = codecs->Formats[(unsigned)index];
|
|
1054
|
-
if (ai.SignatureOffset
|
|
999
|
+
if (ai.SignatureOffset != 0)
|
|
1055
1000
|
{
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1001
|
+
orderIndices2.Add(index);
|
|
1002
|
+
orderIndices[i] = -1;
|
|
1003
|
+
continue;
|
|
1004
|
+
}
|
|
1005
|
+
|
|
1006
|
+
const CObjectVector<CByteBuffer> &sigs = ai.Signatures;
|
|
1007
|
+
FOR_VECTOR (k, sigs)
|
|
1008
|
+
{
|
|
1009
|
+
const CByteBuffer &sig = sigs[k];
|
|
1010
|
+
if (sig.Size() == 0 && dataSize == 0 ||
|
|
1011
|
+
sig.Size() != 0 && sig.Size() <= dataSize &&
|
|
1012
|
+
TestSignature(data, sig, sig.Size()))
|
|
1062
1013
|
{
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
{
|
|
1067
|
-
const CByteBuffer &sig = sigs[k];
|
|
1068
|
-
if (sig.Size() <= dataSize && TestSignature(data, sig, sig.Size()))
|
|
1069
|
-
break;
|
|
1070
|
-
}
|
|
1071
|
-
if (k == sigs.Size())
|
|
1072
|
-
continue;
|
|
1014
|
+
orderIndices2.Add(index);
|
|
1015
|
+
orderIndices[i] = -1;
|
|
1016
|
+
break;
|
|
1073
1017
|
}
|
|
1074
1018
|
}
|
|
1075
|
-
orderIndices2.Add(index);
|
|
1076
|
-
orderIndices[i] = -1;
|
|
1077
1019
|
}
|
|
1078
1020
|
}
|
|
1079
1021
|
|
|
1022
|
+
#endif
|
|
1023
|
+
|
|
1080
1024
|
#ifdef UNDER_CE
|
|
1081
1025
|
static const unsigned kNumHashBytes = 1;
|
|
1082
1026
|
#define HASH_VAL(buf) ((buf)[0])
|
|
@@ -1086,6 +1030,9 @@ static void MakeCheckOrder(CCodecs *codecs,
|
|
|
1086
1030
|
#define HASH_VAL(buf) GetUi16(buf)
|
|
1087
1031
|
#endif
|
|
1088
1032
|
|
|
1033
|
+
|
|
1034
|
+
#ifndef _SFX
|
|
1035
|
+
|
|
1089
1036
|
static bool IsExeExt(const UString &ext)
|
|
1090
1037
|
{
|
|
1091
1038
|
return ext.IsEqualTo_Ascii_NoCase("exe");
|
|
@@ -1113,7 +1060,7 @@ static bool IsPreArcFormat(const CArcInfoEx &ai)
|
|
|
1113
1060
|
{
|
|
1114
1061
|
if (ai.Flags_PreArc())
|
|
1115
1062
|
return true;
|
|
1116
|
-
return IsNameFromList(ai.Name, k_PreArcFormats,
|
|
1063
|
+
return IsNameFromList(ai.Name, k_PreArcFormats, ARRAY_SIZE(k_PreArcFormats));
|
|
1117
1064
|
}
|
|
1118
1065
|
|
|
1119
1066
|
static const char * const k_Formats_with_simple_signuature[] =
|
|
@@ -1135,46 +1082,44 @@ static bool IsNewStyleSignature(const CArcInfoEx &ai)
|
|
|
1135
1082
|
// if (ai.Version >= 0x91F)
|
|
1136
1083
|
if (ai.NewInterface)
|
|
1137
1084
|
return true;
|
|
1138
|
-
return IsNameFromList(ai.Name, k_Formats_with_simple_signuature,
|
|
1085
|
+
return IsNameFromList(ai.Name, k_Formats_with_simple_signuature, ARRAY_SIZE(k_Formats_with_simple_signuature));
|
|
1139
1086
|
}
|
|
1140
1087
|
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
class CArchiveOpenCallback_Offset Z7_final:
|
|
1088
|
+
class CArchiveOpenCallback_Offset:
|
|
1144
1089
|
public IArchiveOpenCallback,
|
|
1145
1090
|
public IArchiveOpenVolumeCallback,
|
|
1146
|
-
|
|
1091
|
+
#ifndef _NO_CRYPTO
|
|
1147
1092
|
public ICryptoGetTextPassword,
|
|
1148
|
-
|
|
1093
|
+
#endif
|
|
1149
1094
|
public CMyUnknownImp
|
|
1150
1095
|
{
|
|
1151
|
-
Z7_COM_QI_BEGIN2(IArchiveOpenCallback)
|
|
1152
|
-
Z7_COM_QI_ENTRY(IArchiveOpenVolumeCallback)
|
|
1153
|
-
#ifndef Z7_NO_CRYPTO
|
|
1154
|
-
Z7_COM_QI_ENTRY(ICryptoGetTextPassword)
|
|
1155
|
-
#endif
|
|
1156
|
-
Z7_COM_QI_END
|
|
1157
|
-
Z7_COM_ADDREF_RELEASE
|
|
1158
|
-
|
|
1159
|
-
Z7_IFACE_COM7_IMP(IArchiveOpenCallback)
|
|
1160
|
-
Z7_IFACE_COM7_IMP(IArchiveOpenVolumeCallback)
|
|
1161
|
-
#ifndef Z7_NO_CRYPTO
|
|
1162
|
-
Z7_IFACE_COM7_IMP(ICryptoGetTextPassword)
|
|
1163
|
-
#endif
|
|
1164
|
-
|
|
1165
1096
|
public:
|
|
1166
1097
|
CMyComPtr<IArchiveOpenCallback> Callback;
|
|
1167
1098
|
CMyComPtr<IArchiveOpenVolumeCallback> OpenVolumeCallback;
|
|
1168
1099
|
UInt64 Files;
|
|
1169
1100
|
UInt64 Offset;
|
|
1170
1101
|
|
|
1171
|
-
#ifndef
|
|
1102
|
+
#ifndef _NO_CRYPTO
|
|
1172
1103
|
CMyComPtr<ICryptoGetTextPassword> GetTextPassword;
|
|
1173
1104
|
#endif
|
|
1105
|
+
|
|
1106
|
+
MY_QUERYINTERFACE_BEGIN2(IArchiveOpenCallback)
|
|
1107
|
+
MY_QUERYINTERFACE_ENTRY(IArchiveOpenVolumeCallback)
|
|
1108
|
+
#ifndef _NO_CRYPTO
|
|
1109
|
+
MY_QUERYINTERFACE_ENTRY(ICryptoGetTextPassword)
|
|
1110
|
+
#endif
|
|
1111
|
+
MY_QUERYINTERFACE_END
|
|
1112
|
+
MY_ADDREF_RELEASE
|
|
1113
|
+
|
|
1114
|
+
INTERFACE_IArchiveOpenCallback(;)
|
|
1115
|
+
INTERFACE_IArchiveOpenVolumeCallback(;)
|
|
1116
|
+
#ifndef _NO_CRYPTO
|
|
1117
|
+
STDMETHOD(CryptoGetTextPassword)(BSTR *password);
|
|
1118
|
+
#endif
|
|
1174
1119
|
};
|
|
1175
1120
|
|
|
1176
|
-
#ifndef
|
|
1177
|
-
|
|
1121
|
+
#ifndef _NO_CRYPTO
|
|
1122
|
+
STDMETHODIMP CArchiveOpenCallback_Offset::CryptoGetTextPassword(BSTR *password)
|
|
1178
1123
|
{
|
|
1179
1124
|
COM_TRY_BEGIN
|
|
1180
1125
|
if (GetTextPassword)
|
|
@@ -1184,12 +1129,12 @@ Z7_COM7F_IMF(CArchiveOpenCallback_Offset::CryptoGetTextPassword(BSTR *password))
|
|
|
1184
1129
|
}
|
|
1185
1130
|
#endif
|
|
1186
1131
|
|
|
1187
|
-
|
|
1132
|
+
STDMETHODIMP CArchiveOpenCallback_Offset::SetTotal(const UInt64 *, const UInt64 *)
|
|
1188
1133
|
{
|
|
1189
1134
|
return S_OK;
|
|
1190
1135
|
}
|
|
1191
1136
|
|
|
1192
|
-
|
|
1137
|
+
STDMETHODIMP CArchiveOpenCallback_Offset::SetCompleted(const UInt64 *, const UInt64 *bytes)
|
|
1193
1138
|
{
|
|
1194
1139
|
if (!Callback)
|
|
1195
1140
|
return S_OK;
|
|
@@ -1199,7 +1144,7 @@ Z7_COM7F_IMF(CArchiveOpenCallback_Offset::SetCompleted(const UInt64 *, const UIn
|
|
|
1199
1144
|
return Callback->SetCompleted(&Files, &value);
|
|
1200
1145
|
}
|
|
1201
1146
|
|
|
1202
|
-
|
|
1147
|
+
STDMETHODIMP CArchiveOpenCallback_Offset::GetProperty(PROPID propID, PROPVARIANT *value)
|
|
1203
1148
|
{
|
|
1204
1149
|
if (OpenVolumeCallback)
|
|
1205
1150
|
return OpenVolumeCallback->GetProperty(propID, value);
|
|
@@ -1208,7 +1153,7 @@ Z7_COM7F_IMF(CArchiveOpenCallback_Offset::GetProperty(PROPID propID, PROPVARIANT
|
|
|
1208
1153
|
// return E_NOTIMPL;
|
|
1209
1154
|
}
|
|
1210
1155
|
|
|
1211
|
-
|
|
1156
|
+
STDMETHODIMP CArchiveOpenCallback_Offset::GetStream(const wchar_t *name, IInStream **inStream)
|
|
1212
1157
|
{
|
|
1213
1158
|
if (OpenVolumeCallback)
|
|
1214
1159
|
return OpenVolumeCallback->GetStream(name, inStream);
|
|
@@ -1252,7 +1197,7 @@ void CArcErrorInfo::ClearErrors()
|
|
|
1252
1197
|
HRESULT CArc::ReadBasicProps(IInArchive *archive, UInt64 startPos, HRESULT openRes)
|
|
1253
1198
|
{
|
|
1254
1199
|
// OkPhySize_Defined = false;
|
|
1255
|
-
|
|
1200
|
+
PhySizeDefined = false;
|
|
1256
1201
|
PhySize = 0;
|
|
1257
1202
|
Offset = 0;
|
|
1258
1203
|
AvailPhySize = FileSize - startPos;
|
|
@@ -1260,49 +1205,49 @@ HRESULT CArc::ReadBasicProps(IInArchive *archive, UInt64 startPos, HRESULT openR
|
|
|
1260
1205
|
ErrorInfo.ClearErrors();
|
|
1261
1206
|
{
|
|
1262
1207
|
NCOM::CPropVariant prop;
|
|
1263
|
-
RINOK(archive->GetArchiveProperty(kpidErrorFlags, &prop))
|
|
1208
|
+
RINOK(archive->GetArchiveProperty(kpidErrorFlags, &prop));
|
|
1264
1209
|
ErrorInfo.ErrorFlags = GetOpenArcErrorFlags(prop, &ErrorInfo.ErrorFlags_Defined);
|
|
1265
1210
|
}
|
|
1266
1211
|
{
|
|
1267
1212
|
NCOM::CPropVariant prop;
|
|
1268
|
-
RINOK(archive->GetArchiveProperty(kpidWarningFlags, &prop))
|
|
1213
|
+
RINOK(archive->GetArchiveProperty(kpidWarningFlags, &prop));
|
|
1269
1214
|
ErrorInfo.WarningFlags = GetOpenArcErrorFlags(prop);
|
|
1270
1215
|
}
|
|
1271
1216
|
|
|
1272
1217
|
{
|
|
1273
1218
|
NCOM::CPropVariant prop;
|
|
1274
|
-
RINOK(archive->GetArchiveProperty(kpidError, &prop))
|
|
1219
|
+
RINOK(archive->GetArchiveProperty(kpidError, &prop));
|
|
1275
1220
|
if (prop.vt != VT_EMPTY)
|
|
1276
1221
|
ErrorInfo.ErrorMessage = (prop.vt == VT_BSTR ? prop.bstrVal : L"Unknown error");
|
|
1277
1222
|
}
|
|
1278
1223
|
|
|
1279
1224
|
{
|
|
1280
1225
|
NCOM::CPropVariant prop;
|
|
1281
|
-
RINOK(archive->GetArchiveProperty(kpidWarning, &prop))
|
|
1226
|
+
RINOK(archive->GetArchiveProperty(kpidWarning, &prop));
|
|
1282
1227
|
if (prop.vt != VT_EMPTY)
|
|
1283
1228
|
ErrorInfo.WarningMessage = (prop.vt == VT_BSTR ? prop.bstrVal : L"Unknown warning");
|
|
1284
1229
|
}
|
|
1285
1230
|
|
|
1286
1231
|
if (openRes == S_OK || ErrorInfo.IsArc_After_NonOpen())
|
|
1287
1232
|
{
|
|
1288
|
-
RINOK(Archive_GetArcProp_UInt(archive, kpidPhySize, PhySize,
|
|
1233
|
+
RINOK(Archive_GetArcProp_UInt(archive, kpidPhySize, PhySize, PhySizeDefined));
|
|
1289
1234
|
/*
|
|
1290
1235
|
RINOK(Archive_GetArcProp_UInt(archive, kpidOkPhySize, OkPhySize, OkPhySize_Defined));
|
|
1291
1236
|
if (!OkPhySize_Defined)
|
|
1292
1237
|
{
|
|
1293
|
-
OkPhySize_Defined =
|
|
1238
|
+
OkPhySize_Defined = PhySizeDefined;
|
|
1294
1239
|
OkPhySize = PhySize;
|
|
1295
1240
|
}
|
|
1296
1241
|
*/
|
|
1297
1242
|
|
|
1298
1243
|
bool offsetDefined;
|
|
1299
|
-
RINOK(Archive_GetArcProp_Int(archive, kpidOffset, Offset, offsetDefined))
|
|
1244
|
+
RINOK(Archive_GetArcProp_Int(archive, kpidOffset, Offset, offsetDefined));
|
|
1300
1245
|
|
|
1301
|
-
Int64 globalOffset =
|
|
1302
|
-
AvailPhySize =
|
|
1303
|
-
if (
|
|
1246
|
+
Int64 globalOffset = startPos + Offset;
|
|
1247
|
+
AvailPhySize = FileSize - globalOffset;
|
|
1248
|
+
if (PhySizeDefined)
|
|
1304
1249
|
{
|
|
1305
|
-
UInt64 endPos =
|
|
1250
|
+
UInt64 endPos = globalOffset + PhySize;
|
|
1306
1251
|
if (endPos < FileSize)
|
|
1307
1252
|
{
|
|
1308
1253
|
AvailPhySize = PhySize;
|
|
@@ -1318,12 +1263,11 @@ HRESULT CArc::ReadBasicProps(IInArchive *archive, UInt64 startPos, HRESULT openR
|
|
|
1318
1263
|
}
|
|
1319
1264
|
|
|
1320
1265
|
/*
|
|
1321
|
-
static
|
|
1266
|
+
static PrintNumber(const char *s, int n)
|
|
1322
1267
|
{
|
|
1323
1268
|
char temp[100];
|
|
1324
1269
|
sprintf(temp, "%s %d", s, n);
|
|
1325
|
-
|
|
1326
|
-
printf(temp);
|
|
1270
|
+
OutputDebugStringA(temp);
|
|
1327
1271
|
}
|
|
1328
1272
|
*/
|
|
1329
1273
|
|
|
@@ -1332,31 +1276,31 @@ HRESULT CArc::PrepareToOpen(const COpenOptions &op, unsigned formatIndex, CMyCom
|
|
|
1332
1276
|
// OutputDebugStringA("a1");
|
|
1333
1277
|
// PrintNumber("formatIndex", formatIndex);
|
|
1334
1278
|
|
|
1335
|
-
RINOK(op.codecs->CreateInArchive(formatIndex, archive))
|
|
1279
|
+
RINOK(op.codecs->CreateInArchive(formatIndex, archive));
|
|
1336
1280
|
// OutputDebugStringA("a2");
|
|
1337
1281
|
if (!archive)
|
|
1338
1282
|
return S_OK;
|
|
1339
1283
|
|
|
1340
|
-
#ifdef
|
|
1284
|
+
#ifdef EXTERNAL_CODECS
|
|
1341
1285
|
if (op.codecs->NeedSetLibCodecs)
|
|
1342
1286
|
{
|
|
1343
1287
|
const CArcInfoEx &ai = op.codecs->Formats[formatIndex];
|
|
1344
1288
|
if (ai.LibIndex >= 0 ?
|
|
1345
|
-
!op.codecs->Libs[
|
|
1289
|
+
!op.codecs->Libs[ai.LibIndex].SetCodecs :
|
|
1346
1290
|
!op.codecs->Libs.IsEmpty())
|
|
1347
1291
|
{
|
|
1348
1292
|
CMyComPtr<ISetCompressCodecsInfo> setCompressCodecsInfo;
|
|
1349
1293
|
archive.QueryInterface(IID_ISetCompressCodecsInfo, (void **)&setCompressCodecsInfo);
|
|
1350
1294
|
if (setCompressCodecsInfo)
|
|
1351
1295
|
{
|
|
1352
|
-
RINOK(setCompressCodecsInfo->SetCompressCodecsInfo(op.codecs))
|
|
1296
|
+
RINOK(setCompressCodecsInfo->SetCompressCodecsInfo(op.codecs));
|
|
1353
1297
|
}
|
|
1354
1298
|
}
|
|
1355
1299
|
}
|
|
1356
1300
|
#endif
|
|
1357
1301
|
|
|
1358
1302
|
|
|
1359
|
-
#ifndef
|
|
1303
|
+
#ifndef _SFX
|
|
1360
1304
|
|
|
1361
1305
|
const CArcInfoEx &ai = op.codecs->Formats[formatIndex];
|
|
1362
1306
|
|
|
@@ -1386,14 +1330,14 @@ HRESULT CArc::PrepareToOpen(const COpenOptions &op, unsigned formatIndex, CMyCom
|
|
|
1386
1330
|
}
|
|
1387
1331
|
}
|
|
1388
1332
|
*/
|
|
1389
|
-
RINOK(SetProperties(archive, *op.props))
|
|
1333
|
+
RINOK(SetProperties(archive, *op.props));
|
|
1390
1334
|
}
|
|
1391
1335
|
|
|
1392
1336
|
#endif
|
|
1393
1337
|
return S_OK;
|
|
1394
1338
|
}
|
|
1395
1339
|
|
|
1396
|
-
#ifndef
|
|
1340
|
+
#ifndef _SFX
|
|
1397
1341
|
|
|
1398
1342
|
static HRESULT ReadParseItemProps(IInArchive *archive, const CArcInfoEx &ai, NArchive::NParser::CParseItem &pi)
|
|
1399
1343
|
{
|
|
@@ -1401,14 +1345,14 @@ static HRESULT ReadParseItemProps(IInArchive *archive, const CArcInfoEx &ai, NAr
|
|
|
1401
1345
|
pi.FileTime_Defined = false;
|
|
1402
1346
|
pi.ArcType = ai.Name;
|
|
1403
1347
|
|
|
1404
|
-
RINOK(
|
|
1348
|
+
RINOK(Archive_GetArcBoolProp(archive, kpidIsNotArcType, pi.IsNotArcType));
|
|
1405
1349
|
|
|
1406
|
-
// RINOK(
|
|
1350
|
+
// RINOK(Archive_GetArcBoolProp(archive, kpidIsSelfExe, pi.IsSelfExe));
|
|
1407
1351
|
pi.IsSelfExe = ai.Flags_PreArc();
|
|
1408
1352
|
|
|
1409
1353
|
{
|
|
1410
1354
|
NCOM::CPropVariant prop;
|
|
1411
|
-
RINOK(archive->GetArchiveProperty(kpidMTime, &prop))
|
|
1355
|
+
RINOK(archive->GetArchiveProperty(kpidMTime, &prop));
|
|
1412
1356
|
if (prop.vt == VT_FILETIME)
|
|
1413
1357
|
{
|
|
1414
1358
|
pi.FileTime_Defined = true;
|
|
@@ -1419,7 +1363,7 @@ static HRESULT ReadParseItemProps(IInArchive *archive, const CArcInfoEx &ai, NAr
|
|
|
1419
1363
|
if (!pi.FileTime_Defined)
|
|
1420
1364
|
{
|
|
1421
1365
|
NCOM::CPropVariant prop;
|
|
1422
|
-
RINOK(archive->GetArchiveProperty(kpidCTime, &prop))
|
|
1366
|
+
RINOK(archive->GetArchiveProperty(kpidCTime, &prop));
|
|
1423
1367
|
if (prop.vt == VT_FILETIME)
|
|
1424
1368
|
{
|
|
1425
1369
|
pi.FileTime_Defined = true;
|
|
@@ -1429,7 +1373,7 @@ static HRESULT ReadParseItemProps(IInArchive *archive, const CArcInfoEx &ai, NAr
|
|
|
1429
1373
|
|
|
1430
1374
|
{
|
|
1431
1375
|
NCOM::CPropVariant prop;
|
|
1432
|
-
RINOK(archive->GetArchiveProperty(kpidName, &prop))
|
|
1376
|
+
RINOK(archive->GetArchiveProperty(kpidName, &prop));
|
|
1433
1377
|
if (prop.vt == VT_BSTR)
|
|
1434
1378
|
{
|
|
1435
1379
|
pi.Name.SetFromBstr(prop.bstrVal);
|
|
@@ -1437,7 +1381,7 @@ static HRESULT ReadParseItemProps(IInArchive *archive, const CArcInfoEx &ai, NAr
|
|
|
1437
1381
|
}
|
|
1438
1382
|
else
|
|
1439
1383
|
{
|
|
1440
|
-
RINOK(archive->GetArchiveProperty(kpidExtension, &prop))
|
|
1384
|
+
RINOK(archive->GetArchiveProperty(kpidExtension, &prop));
|
|
1441
1385
|
if (prop.vt == VT_BSTR)
|
|
1442
1386
|
pi.Extension.SetFromBstr(prop.bstrVal);
|
|
1443
1387
|
}
|
|
@@ -1445,14 +1389,14 @@ static HRESULT ReadParseItemProps(IInArchive *archive, const CArcInfoEx &ai, NAr
|
|
|
1445
1389
|
|
|
1446
1390
|
{
|
|
1447
1391
|
NCOM::CPropVariant prop;
|
|
1448
|
-
RINOK(archive->GetArchiveProperty(kpidShortComment, &prop))
|
|
1392
|
+
RINOK(archive->GetArchiveProperty(kpidShortComment, &prop));
|
|
1449
1393
|
if (prop.vt == VT_BSTR)
|
|
1450
1394
|
pi.Comment.SetFromBstr(prop.bstrVal);
|
|
1451
1395
|
}
|
|
1452
1396
|
|
|
1453
1397
|
|
|
1454
1398
|
UInt32 numItems;
|
|
1455
|
-
RINOK(archive->GetNumberOfItems(&numItems))
|
|
1399
|
+
RINOK(archive->GetNumberOfItems(&numItems));
|
|
1456
1400
|
|
|
1457
1401
|
// pi.NumSubFiles = numItems;
|
|
1458
1402
|
// RINOK(Archive_GetArcProp_UInt(archive, kpidUnpackSize, pi.UnpackSize, pi.UnpackSize_Defined));
|
|
@@ -1493,14 +1437,14 @@ HRESULT CArc::CheckZerosTail(const COpenOptions &op, UInt64 offset)
|
|
|
1493
1437
|
{
|
|
1494
1438
|
if (!op.stream)
|
|
1495
1439
|
return S_OK;
|
|
1496
|
-
RINOK(
|
|
1440
|
+
RINOK(op.stream->Seek(offset, STREAM_SEEK_SET, NULL));
|
|
1497
1441
|
const UInt32 kBufSize = 1 << 11;
|
|
1498
1442
|
Byte buf[kBufSize];
|
|
1499
1443
|
|
|
1500
1444
|
for (;;)
|
|
1501
1445
|
{
|
|
1502
1446
|
UInt32 processed = 0;
|
|
1503
|
-
RINOK(op.stream->Read(buf, kBufSize, &processed))
|
|
1447
|
+
RINOK(op.stream->Read(buf, kBufSize, &processed));
|
|
1504
1448
|
if (processed == 0)
|
|
1505
1449
|
{
|
|
1506
1450
|
// ErrorInfo.NonZerosTail = false;
|
|
@@ -1519,21 +1463,21 @@ HRESULT CArc::CheckZerosTail(const COpenOptions &op, UInt64 offset)
|
|
|
1519
1463
|
}
|
|
1520
1464
|
}
|
|
1521
1465
|
|
|
1466
|
+
#ifndef _SFX
|
|
1522
1467
|
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
, IArchiveExtractCallback
|
|
1529
|
-
, ICompressProgressInfo
|
|
1530
|
-
)
|
|
1531
|
-
Z7_IFACE_COM7_IMP(IProgress)
|
|
1468
|
+
class CExtractCallback_To_OpenCallback:
|
|
1469
|
+
public IArchiveExtractCallback,
|
|
1470
|
+
public ICompressProgressInfo,
|
|
1471
|
+
public CMyUnknownImp
|
|
1472
|
+
{
|
|
1532
1473
|
public:
|
|
1533
1474
|
CMyComPtr<IArchiveOpenCallback> Callback;
|
|
1534
1475
|
UInt64 Files;
|
|
1535
1476
|
UInt64 Offset;
|
|
1536
1477
|
|
|
1478
|
+
MY_UNKNOWN_IMP2(IArchiveExtractCallback, ICompressProgressInfo)
|
|
1479
|
+
INTERFACE_IArchiveExtractCallback(;)
|
|
1480
|
+
STDMETHOD(SetRatioInfo)(const UInt64 *inSize, const UInt64 *outSize);
|
|
1537
1481
|
void Init(IArchiveOpenCallback *callback)
|
|
1538
1482
|
{
|
|
1539
1483
|
Callback = callback;
|
|
@@ -1542,17 +1486,17 @@ public:
|
|
|
1542
1486
|
}
|
|
1543
1487
|
};
|
|
1544
1488
|
|
|
1545
|
-
|
|
1489
|
+
STDMETHODIMP CExtractCallback_To_OpenCallback::SetTotal(UInt64 /* size */)
|
|
1546
1490
|
{
|
|
1547
1491
|
return S_OK;
|
|
1548
1492
|
}
|
|
1549
1493
|
|
|
1550
|
-
|
|
1494
|
+
STDMETHODIMP CExtractCallback_To_OpenCallback::SetCompleted(const UInt64 * /* completeValue */)
|
|
1551
1495
|
{
|
|
1552
1496
|
return S_OK;
|
|
1553
1497
|
}
|
|
1554
1498
|
|
|
1555
|
-
|
|
1499
|
+
STDMETHODIMP CExtractCallback_To_OpenCallback::SetRatioInfo(const UInt64 *inSize, const UInt64 * /* outSize */)
|
|
1556
1500
|
{
|
|
1557
1501
|
if (Callback)
|
|
1558
1502
|
{
|
|
@@ -1564,23 +1508,22 @@ Z7_COM7F_IMF(CExtractCallback_To_OpenCallback::SetRatioInfo(const UInt64 *inSize
|
|
|
1564
1508
|
return S_OK;
|
|
1565
1509
|
}
|
|
1566
1510
|
|
|
1567
|
-
|
|
1511
|
+
STDMETHODIMP CExtractCallback_To_OpenCallback::GetStream(UInt32 /* index */, ISequentialOutStream **outStream, Int32 /* askExtractMode */)
|
|
1568
1512
|
{
|
|
1569
|
-
*outStream =
|
|
1513
|
+
*outStream = 0;
|
|
1570
1514
|
return S_OK;
|
|
1571
1515
|
}
|
|
1572
1516
|
|
|
1573
|
-
|
|
1517
|
+
STDMETHODIMP CExtractCallback_To_OpenCallback::PrepareOperation(Int32 /* askExtractMode */)
|
|
1574
1518
|
{
|
|
1575
1519
|
return S_OK;
|
|
1576
1520
|
}
|
|
1577
1521
|
|
|
1578
|
-
|
|
1522
|
+
STDMETHODIMP CExtractCallback_To_OpenCallback::SetOperationResult(Int32 /* operationResult */)
|
|
1579
1523
|
{
|
|
1580
1524
|
return S_OK;
|
|
1581
1525
|
}
|
|
1582
1526
|
|
|
1583
|
-
|
|
1584
1527
|
static HRESULT OpenArchiveSpec(IInArchive *archive, bool needPhySize,
|
|
1585
1528
|
IInStream *stream, const UInt64 *maxCheckStartPosition,
|
|
1586
1529
|
IArchiveOpenCallback *openCallback,
|
|
@@ -1589,48 +1532,37 @@ static HRESULT OpenArchiveSpec(IInArchive *archive, bool needPhySize,
|
|
|
1589
1532
|
/*
|
|
1590
1533
|
if (needPhySize)
|
|
1591
1534
|
{
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
open2, archive)
|
|
1535
|
+
CMyComPtr<IArchiveOpen2> open2;
|
|
1536
|
+
archive->QueryInterface(IID_IArchiveOpen2, (void **)&open2);
|
|
1595
1537
|
if (open2)
|
|
1596
1538
|
return open2->ArcOpen2(stream, kOpenFlags_RealPhySize, openCallback);
|
|
1597
1539
|
}
|
|
1598
1540
|
*/
|
|
1599
|
-
RINOK(archive->Open(stream, maxCheckStartPosition, openCallback))
|
|
1541
|
+
RINOK(archive->Open(stream, maxCheckStartPosition, openCallback));
|
|
1600
1542
|
if (needPhySize)
|
|
1601
1543
|
{
|
|
1602
1544
|
bool phySize_Defined = false;
|
|
1603
1545
|
UInt64 phySize = 0;
|
|
1604
|
-
RINOK(Archive_GetArcProp_UInt(archive, kpidPhySize, phySize, phySize_Defined))
|
|
1546
|
+
RINOK(Archive_GetArcProp_UInt(archive, kpidPhySize, phySize, phySize_Defined));
|
|
1605
1547
|
if (phySize_Defined)
|
|
1606
1548
|
return S_OK;
|
|
1607
1549
|
|
|
1608
|
-
bool phySizeCantBeDetected = false
|
|
1609
|
-
RINOK(
|
|
1550
|
+
bool phySizeCantBeDetected = false;;
|
|
1551
|
+
RINOK(Archive_GetArcBoolProp(archive, kpidPhySizeCantBeDetected, phySizeCantBeDetected));
|
|
1610
1552
|
|
|
1611
1553
|
if (!phySizeCantBeDetected)
|
|
1612
1554
|
{
|
|
1613
|
-
|
|
1614
|
-
// It's for bzip2/gz and some xz archives, where Open operation doesn't know phySize.
|
|
1615
|
-
// But the Handler will know phySize after full archive testing.
|
|
1616
|
-
RINOK(archive->Extract(NULL, (UInt32)(Int32)-1, BoolToInt(true), extractCallback))
|
|
1617
|
-
PRF(printf("\n-- OK"));
|
|
1555
|
+
RINOK(archive->Extract(0, (UInt32)(Int32)-1, BoolToInt(true), extractCallback));
|
|
1618
1556
|
}
|
|
1619
1557
|
}
|
|
1620
1558
|
return S_OK;
|
|
1621
1559
|
}
|
|
1622
1560
|
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
1561
|
static int FindFormatForArchiveType(CCodecs *codecs, CIntVector orderIndices, const char *name)
|
|
1626
1562
|
{
|
|
1627
1563
|
FOR_VECTOR (i, orderIndices)
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
if (oi >= 0)
|
|
1631
|
-
if (StringsAreEqualNoCase_Ascii(codecs->Formats[(unsigned)oi].Name, name))
|
|
1632
|
-
return (int)i;
|
|
1633
|
-
}
|
|
1564
|
+
if (StringsAreEqualNoCase_Ascii(codecs->Formats[orderIndices[i]].Name, name))
|
|
1565
|
+
return i;
|
|
1634
1566
|
return -1;
|
|
1635
1567
|
}
|
|
1636
1568
|
|
|
@@ -1656,15 +1588,15 @@ HRESULT CArc::OpenStream2(const COpenOptions &op)
|
|
|
1656
1588
|
const UString fileName = ExtractFileNameFromPath(Path);
|
|
1657
1589
|
UString extension;
|
|
1658
1590
|
{
|
|
1659
|
-
|
|
1591
|
+
int dotPos = fileName.ReverseFind_Dot();
|
|
1660
1592
|
if (dotPos >= 0)
|
|
1661
|
-
extension = fileName.Ptr(
|
|
1593
|
+
extension = fileName.Ptr(dotPos + 1);
|
|
1662
1594
|
}
|
|
1663
1595
|
|
|
1664
1596
|
CIntVector orderIndices;
|
|
1665
1597
|
|
|
1666
1598
|
bool searchMarkerInHandler = false;
|
|
1667
|
-
#ifdef
|
|
1599
|
+
#ifdef _SFX
|
|
1668
1600
|
searchMarkerInHandler = true;
|
|
1669
1601
|
#endif
|
|
1670
1602
|
|
|
@@ -1674,27 +1606,22 @@ HRESULT CArc::OpenStream2(const COpenOptions &op)
|
|
|
1674
1606
|
isMainFormatArr[i] = false;
|
|
1675
1607
|
}
|
|
1676
1608
|
|
|
1677
|
-
|
|
1609
|
+
UInt64 maxStartOffset =
|
|
1678
1610
|
op.openType.MaxStartOffset_Defined ?
|
|
1679
1611
|
op.openType.MaxStartOffset :
|
|
1680
1612
|
kMaxCheckStartPosition;
|
|
1681
1613
|
|
|
1682
|
-
#ifndef
|
|
1614
|
+
#ifndef _SFX
|
|
1683
1615
|
bool isUnknownExt = false;
|
|
1684
1616
|
#endif
|
|
1685
1617
|
|
|
1686
|
-
#ifndef Z7_SFX
|
|
1687
1618
|
bool isForced = false;
|
|
1688
|
-
#endif
|
|
1689
|
-
|
|
1690
1619
|
unsigned numMainTypes = 0;
|
|
1691
|
-
|
|
1620
|
+
int formatIndex = op.openType.FormatIndex;
|
|
1692
1621
|
|
|
1693
1622
|
if (formatIndex >= 0)
|
|
1694
1623
|
{
|
|
1695
|
-
#ifndef Z7_SFX
|
|
1696
1624
|
isForced = true;
|
|
1697
|
-
#endif
|
|
1698
1625
|
orderIndices.Add(formatIndex);
|
|
1699
1626
|
numMainTypes = 1;
|
|
1700
1627
|
isMainFormatArr[(unsigned)formatIndex] = true;
|
|
@@ -1704,12 +1631,12 @@ HRESULT CArc::OpenStream2(const COpenOptions &op)
|
|
|
1704
1631
|
else
|
|
1705
1632
|
{
|
|
1706
1633
|
unsigned numFinded = 0;
|
|
1707
|
-
#ifndef
|
|
1634
|
+
#ifndef _SFX
|
|
1708
1635
|
bool isPrearcExt = false;
|
|
1709
1636
|
#endif
|
|
1710
1637
|
|
|
1711
1638
|
{
|
|
1712
|
-
#ifndef
|
|
1639
|
+
#ifndef _SFX
|
|
1713
1640
|
|
|
1714
1641
|
bool isZip = false;
|
|
1715
1642
|
bool isRar = false;
|
|
@@ -1731,12 +1658,10 @@ HRESULT CArc::OpenStream2(const COpenOptions &op)
|
|
|
1731
1658
|
isNumber = true;
|
|
1732
1659
|
}
|
|
1733
1660
|
if (isNumber)
|
|
1734
|
-
{
|
|
1735
1661
|
if (c == 'z' || c == 'Z')
|
|
1736
1662
|
isZip = true;
|
|
1737
1663
|
else
|
|
1738
1664
|
isRar = true;
|
|
1739
|
-
}
|
|
1740
1665
|
}
|
|
1741
1666
|
|
|
1742
1667
|
#endif
|
|
@@ -1746,29 +1671,29 @@ HRESULT CArc::OpenStream2(const COpenOptions &op)
|
|
|
1746
1671
|
const CArcInfoEx &ai = op.codecs->Formats[i];
|
|
1747
1672
|
|
|
1748
1673
|
if (IgnoreSplit || !op.openType.CanReturnArc)
|
|
1749
|
-
if (ai.
|
|
1674
|
+
if (ai.IsSplit())
|
|
1750
1675
|
continue;
|
|
1751
|
-
if (op.excludedFormats->FindInSorted(
|
|
1676
|
+
if (op.excludedFormats->FindInSorted(i) >= 0)
|
|
1752
1677
|
continue;
|
|
1753
1678
|
|
|
1754
|
-
#ifndef
|
|
1679
|
+
#ifndef _SFX
|
|
1755
1680
|
if (IsPreArcFormat(ai))
|
|
1756
1681
|
isPrearcExt = true;
|
|
1757
1682
|
#endif
|
|
1758
1683
|
|
|
1759
1684
|
if (ai.FindExtension(extension) >= 0
|
|
1760
|
-
#ifndef
|
|
1761
|
-
||
|
|
1762
|
-
||
|
|
1685
|
+
#ifndef _SFX
|
|
1686
|
+
|| isZip && StringsAreEqualNoCase_Ascii(ai.Name, "zip")
|
|
1687
|
+
|| isRar && StringsAreEqualNoCase_Ascii(ai.Name, "rar")
|
|
1763
1688
|
#endif
|
|
1764
1689
|
)
|
|
1765
1690
|
{
|
|
1766
1691
|
// PrintNumber("orderIndices.Insert", i);
|
|
1767
|
-
orderIndices.Insert(numFinded++,
|
|
1692
|
+
orderIndices.Insert(numFinded++, i);
|
|
1768
1693
|
isMainFormatArr[i] = true;
|
|
1769
1694
|
}
|
|
1770
1695
|
else
|
|
1771
|
-
orderIndices.Add(
|
|
1696
|
+
orderIndices.Add(i);
|
|
1772
1697
|
}
|
|
1773
1698
|
}
|
|
1774
1699
|
|
|
@@ -1788,11 +1713,11 @@ HRESULT CArc::OpenStream2(const COpenOptions &op)
|
|
|
1788
1713
|
}
|
|
1789
1714
|
*/
|
|
1790
1715
|
|
|
1791
|
-
#ifndef
|
|
1716
|
+
#ifndef _SFX
|
|
1792
1717
|
|
|
1793
1718
|
if (op.stream && orderIndices.Size() >= 2)
|
|
1794
1719
|
{
|
|
1795
|
-
RINOK(
|
|
1720
|
+
RINOK(op.stream->Seek(0, STREAM_SEEK_SET, NULL));
|
|
1796
1721
|
CByteBuffer byteBuffer;
|
|
1797
1722
|
CIntVector orderIndices2;
|
|
1798
1723
|
if (numFinded == 0 || IsExeExt(extension))
|
|
@@ -1801,21 +1726,21 @@ HRESULT CArc::OpenStream2(const COpenOptions &op)
|
|
|
1801
1726
|
}
|
|
1802
1727
|
else if (extension.IsEqualTo("000") || extension.IsEqualTo("001"))
|
|
1803
1728
|
{
|
|
1804
|
-
|
|
1729
|
+
int i = FindFormatForArchiveType(op.codecs, orderIndices, "rar");
|
|
1805
1730
|
if (i >= 0)
|
|
1806
1731
|
{
|
|
1807
1732
|
const size_t kBufSize = (1 << 10);
|
|
1808
1733
|
byteBuffer.Alloc(kBufSize);
|
|
1809
1734
|
size_t processedSize = kBufSize;
|
|
1810
|
-
RINOK(ReadStream(op.stream, byteBuffer, &processedSize))
|
|
1735
|
+
RINOK(ReadStream(op.stream, byteBuffer, &processedSize));
|
|
1811
1736
|
if (processedSize >= 16)
|
|
1812
1737
|
{
|
|
1813
1738
|
const Byte *buf = byteBuffer;
|
|
1814
1739
|
const Byte kRarHeader[] = { 0x52 , 0x61, 0x72, 0x21, 0x1a, 0x07, 0x00 };
|
|
1815
1740
|
if (TestSignature(buf, kRarHeader, 7) && buf[9] == 0x73 && (buf[10] & 1) != 0)
|
|
1816
1741
|
{
|
|
1817
|
-
orderIndices2.Add(orderIndices[
|
|
1818
|
-
orderIndices[
|
|
1742
|
+
orderIndices2.Add(orderIndices[i]);
|
|
1743
|
+
orderIndices[i] = -1;
|
|
1819
1744
|
if (i >= (int)numFinded)
|
|
1820
1745
|
numFinded++;
|
|
1821
1746
|
}
|
|
@@ -1827,33 +1752,17 @@ HRESULT CArc::OpenStream2(const COpenOptions &op)
|
|
|
1827
1752
|
const size_t kBufSize = (1 << 10);
|
|
1828
1753
|
byteBuffer.Alloc(kBufSize);
|
|
1829
1754
|
size_t processedSize = kBufSize;
|
|
1830
|
-
RINOK(ReadStream(op.stream, byteBuffer, &processedSize))
|
|
1755
|
+
RINOK(ReadStream(op.stream, byteBuffer, &processedSize));
|
|
1831
1756
|
if (processedSize == 0)
|
|
1832
1757
|
return S_FALSE;
|
|
1833
1758
|
|
|
1834
1759
|
/*
|
|
1835
1760
|
check type order:
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
2) matched_extension && (matched_signature)
|
|
1761
|
+
1) matched extension, no signuature
|
|
1762
|
+
2) matched extension, matched signuature
|
|
1839
1763
|
// 3) no signuature
|
|
1840
1764
|
// 4) matched signuature
|
|
1841
1765
|
*/
|
|
1842
|
-
// we move index from orderIndices to orderIndices2 for priority handlers.
|
|
1843
|
-
|
|
1844
|
-
for (unsigned i = 0; i < numFinded; i++)
|
|
1845
|
-
{
|
|
1846
|
-
const int index = orderIndices[i];
|
|
1847
|
-
if (index < 0)
|
|
1848
|
-
continue;
|
|
1849
|
-
const CArcInfoEx &ai = op.codecs->Formats[(unsigned)index];
|
|
1850
|
-
if (ai.Flags_BackwardOpen())
|
|
1851
|
-
{
|
|
1852
|
-
// backward doesn't need start signatures
|
|
1853
|
-
orderIndices2.Add(index);
|
|
1854
|
-
orderIndices[i] = -1;
|
|
1855
|
-
}
|
|
1856
|
-
}
|
|
1857
1766
|
|
|
1858
1767
|
MakeCheckOrder(op.codecs, orderIndices, numFinded, orderIndices2, NULL, 0);
|
|
1859
1768
|
MakeCheckOrder(op.codecs, orderIndices, numFinded, orderIndices2, byteBuffer, processedSize);
|
|
@@ -1863,7 +1772,7 @@ HRESULT CArc::OpenStream2(const COpenOptions &op)
|
|
|
1863
1772
|
|
|
1864
1773
|
FOR_VECTOR (i, orderIndices)
|
|
1865
1774
|
{
|
|
1866
|
-
|
|
1775
|
+
int val = orderIndices[i];
|
|
1867
1776
|
if (val != -1)
|
|
1868
1777
|
orderIndices2.Add(val);
|
|
1869
1778
|
}
|
|
@@ -1872,21 +1781,21 @@ HRESULT CArc::OpenStream2(const COpenOptions &op)
|
|
|
1872
1781
|
|
|
1873
1782
|
if (orderIndices.Size() >= 2)
|
|
1874
1783
|
{
|
|
1875
|
-
|
|
1876
|
-
|
|
1784
|
+
int iIso = FindFormatForArchiveType(op.codecs, orderIndices, "iso");
|
|
1785
|
+
int iUdf = FindFormatForArchiveType(op.codecs, orderIndices, "udf");
|
|
1877
1786
|
if (iUdf > iIso && iIso >= 0)
|
|
1878
1787
|
{
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
orderIndices[
|
|
1882
|
-
orderIndices[
|
|
1788
|
+
int isoIndex = orderIndices[iIso];
|
|
1789
|
+
int udfIndex = orderIndices[iUdf];
|
|
1790
|
+
orderIndices[iUdf] = isoIndex;
|
|
1791
|
+
orderIndices[iIso] = udfIndex;
|
|
1883
1792
|
}
|
|
1884
1793
|
}
|
|
1885
1794
|
|
|
1886
1795
|
numMainTypes = numFinded;
|
|
1887
1796
|
isUnknownExt = (numMainTypes == 0) || isPrearcExt;
|
|
1888
1797
|
|
|
1889
|
-
#else //
|
|
1798
|
+
#else // _SFX
|
|
1890
1799
|
|
|
1891
1800
|
numMainTypes = orderIndices.Size();
|
|
1892
1801
|
|
|
@@ -1900,12 +1809,13 @@ HRESULT CArc::OpenStream2(const COpenOptions &op)
|
|
|
1900
1809
|
UInt64 fileSize = 0;
|
|
1901
1810
|
if (op.stream)
|
|
1902
1811
|
{
|
|
1903
|
-
RINOK(
|
|
1812
|
+
RINOK(op.stream->Seek(0, STREAM_SEEK_END, &fileSize));
|
|
1813
|
+
RINOK(op.stream->Seek(0, STREAM_SEEK_SET, NULL));
|
|
1904
1814
|
}
|
|
1905
1815
|
FileSize = fileSize;
|
|
1906
1816
|
|
|
1907
1817
|
|
|
1908
|
-
#ifndef
|
|
1818
|
+
#ifndef _SFX
|
|
1909
1819
|
|
|
1910
1820
|
CBoolArr skipFrontalFormat(op.codecs->Formats.Size());
|
|
1911
1821
|
{
|
|
@@ -1932,18 +1842,15 @@ HRESULT CArc::OpenStream2(const COpenOptions &op)
|
|
|
1932
1842
|
for (unsigned i = 0; i < numCheckTypes; i++)
|
|
1933
1843
|
{
|
|
1934
1844
|
FormatIndex = orderIndices[i];
|
|
1935
|
-
|
|
1936
|
-
// orderIndices[] item cannot be negative here
|
|
1937
1845
|
|
|
1938
1846
|
bool exactOnly = false;
|
|
1939
1847
|
|
|
1940
|
-
#ifndef
|
|
1848
|
+
#ifndef _SFX
|
|
1941
1849
|
|
|
1942
|
-
const CArcInfoEx &ai = op.codecs->Formats[
|
|
1850
|
+
const CArcInfoEx &ai = op.codecs->Formats[FormatIndex];
|
|
1943
1851
|
// OutputDebugStringW(ai.Name);
|
|
1944
1852
|
if (i >= numMainTypes)
|
|
1945
1853
|
{
|
|
1946
|
-
// here we allow mismatched extension only for backward handlers
|
|
1947
1854
|
if (!ai.Flags_BackwardOpen()
|
|
1948
1855
|
// && !ai.Flags_PureStartOpen()
|
|
1949
1856
|
)
|
|
@@ -1955,16 +1862,16 @@ HRESULT CArc::OpenStream2(const COpenOptions &op)
|
|
|
1955
1862
|
|
|
1956
1863
|
// Some handlers do not set total bytes. So we set it here
|
|
1957
1864
|
if (op.callback)
|
|
1958
|
-
RINOK(op.callback->SetTotal(NULL, &fileSize))
|
|
1865
|
+
RINOK(op.callback->SetTotal(NULL, &fileSize));
|
|
1959
1866
|
|
|
1960
1867
|
if (op.stream)
|
|
1961
1868
|
{
|
|
1962
|
-
RINOK(
|
|
1869
|
+
RINOK(op.stream->Seek(0, STREAM_SEEK_SET, NULL));
|
|
1963
1870
|
}
|
|
1964
1871
|
|
|
1965
1872
|
CMyComPtr<IInArchive> archive;
|
|
1966
1873
|
|
|
1967
|
-
RINOK(PrepareToOpen(op,
|
|
1874
|
+
RINOK(PrepareToOpen(op, FormatIndex, archive));
|
|
1968
1875
|
if (!archive)
|
|
1969
1876
|
continue;
|
|
1970
1877
|
|
|
@@ -1983,13 +1890,13 @@ HRESULT CArc::OpenStream2(const COpenOptions &op)
|
|
|
1983
1890
|
result = openSeq->OpenSeq(op.seqStream);
|
|
1984
1891
|
}
|
|
1985
1892
|
|
|
1986
|
-
RINOK(ReadBasicProps(archive, 0, result))
|
|
1893
|
+
RINOK(ReadBasicProps(archive, 0, result));
|
|
1987
1894
|
|
|
1988
1895
|
if (result == S_FALSE)
|
|
1989
1896
|
{
|
|
1990
1897
|
bool isArc = ErrorInfo.IsArc_After_NonOpen();
|
|
1991
1898
|
|
|
1992
|
-
#ifndef
|
|
1899
|
+
#ifndef _SFX
|
|
1993
1900
|
// if it's archive, we allow another open attempt for parser
|
|
1994
1901
|
if (!mode.CanReturnParser || !isArc)
|
|
1995
1902
|
skipFrontalFormat[(unsigned)FormatIndex] = true;
|
|
@@ -2009,7 +1916,7 @@ HRESULT CArc::OpenStream2(const COpenOptions &op)
|
|
|
2009
1916
|
// if (formatIndex < 0 && !searchMarkerInHandler)
|
|
2010
1917
|
{
|
|
2011
1918
|
// if bad archive was detected, we don't need additional open attempts
|
|
2012
|
-
#ifndef
|
|
1919
|
+
#ifndef _SFX
|
|
2013
1920
|
if (!IsPreArcFormat(ai) /* || !mode.SkipSfxStub */)
|
|
2014
1921
|
#endif
|
|
2015
1922
|
return S_FALSE;
|
|
@@ -2018,7 +1925,7 @@ HRESULT CArc::OpenStream2(const COpenOptions &op)
|
|
|
2018
1925
|
}
|
|
2019
1926
|
|
|
2020
1927
|
/*
|
|
2021
|
-
#ifndef
|
|
1928
|
+
#ifndef _SFX
|
|
2022
1929
|
if (IsExeExt(extension) || ai.Flags_PreArc())
|
|
2023
1930
|
{
|
|
2024
1931
|
// openOnlyFullArc = false;
|
|
@@ -2031,9 +1938,9 @@ HRESULT CArc::OpenStream2(const COpenOptions &op)
|
|
|
2031
1938
|
continue;
|
|
2032
1939
|
}
|
|
2033
1940
|
|
|
2034
|
-
RINOK(result)
|
|
1941
|
+
RINOK(result);
|
|
2035
1942
|
|
|
2036
|
-
#ifndef
|
|
1943
|
+
#ifndef _SFX
|
|
2037
1944
|
|
|
2038
1945
|
bool isMainFormat = isMainFormatArr[(unsigned)FormatIndex];
|
|
2039
1946
|
const COpenSpecFlags &specFlags = mode.GetSpec(isForced, isMainFormat, isUnknownExt);
|
|
@@ -2041,7 +1948,7 @@ HRESULT CArc::OpenStream2(const COpenOptions &op)
|
|
|
2041
1948
|
bool thereIsTail = ErrorInfo.ThereIsTail;
|
|
2042
1949
|
if (thereIsTail && mode.ZerosTailIsAllowed)
|
|
2043
1950
|
{
|
|
2044
|
-
RINOK(CheckZerosTail(op,
|
|
1951
|
+
RINOK(CheckZerosTail(op, Offset + PhySize));
|
|
2045
1952
|
if (ErrorInfo.IgnoreTail)
|
|
2046
1953
|
thereIsTail = false;
|
|
2047
1954
|
}
|
|
@@ -2095,7 +2002,7 @@ HRESULT CArc::OpenStream2(const COpenOptions &op)
|
|
|
2095
2002
|
|
|
2096
2003
|
|
|
2097
2004
|
|
|
2098
|
-
#ifndef
|
|
2005
|
+
#ifndef _SFX
|
|
2099
2006
|
|
|
2100
2007
|
if (!op.stream)
|
|
2101
2008
|
return S_FALSE;
|
|
@@ -2140,9 +2047,9 @@ HRESULT CArc::OpenStream2(const COpenOptions &op)
|
|
|
2140
2047
|
endOfFile = true;
|
|
2141
2048
|
}
|
|
2142
2049
|
byteBuffer.Alloc(bufSize);
|
|
2143
|
-
RINOK(
|
|
2050
|
+
RINOK(op.stream->Seek(0, STREAM_SEEK_SET, NULL));
|
|
2144
2051
|
processedSize = bufSize;
|
|
2145
|
-
RINOK(ReadStream(op.stream, byteBuffer, &processedSize))
|
|
2052
|
+
RINOK(ReadStream(op.stream, byteBuffer, &processedSize));
|
|
2146
2053
|
if (processedSize == 0)
|
|
2147
2054
|
return S_FALSE;
|
|
2148
2055
|
if (processedSize < bufSize)
|
|
@@ -2156,22 +2063,16 @@ HRESULT CArc::OpenStream2(const COpenOptions &op)
|
|
|
2156
2063
|
|
|
2157
2064
|
for (i = 0; i < orderIndices.Size(); i++)
|
|
2158
2065
|
{
|
|
2159
|
-
|
|
2160
|
-
unsigned form = (unsigned)orderIndices[i];
|
|
2066
|
+
unsigned form = orderIndices[i];
|
|
2161
2067
|
if (skipFrontalFormat[form])
|
|
2162
2068
|
continue;
|
|
2163
|
-
|
|
2164
2069
|
const CArcInfoEx &ai = op.codecs->Formats[form];
|
|
2165
|
-
|
|
2166
|
-
if (ai.Is_Split())
|
|
2070
|
+
if (ai.IsSplit())
|
|
2167
2071
|
{
|
|
2168
|
-
splitIndex =
|
|
2072
|
+
splitIndex = form;
|
|
2169
2073
|
continue;
|
|
2170
2074
|
}
|
|
2171
2075
|
|
|
2172
|
-
if (ai.Flags_ByExtOnlyOpen())
|
|
2173
|
-
continue;
|
|
2174
|
-
|
|
2175
2076
|
if (ai.IsArcFunc)
|
|
2176
2077
|
{
|
|
2177
2078
|
UInt32 isArcRes = ai.IsArcFunc(byteBuffer, processedSize);
|
|
@@ -2184,7 +2085,7 @@ HRESULT CArc::OpenStream2(const COpenOptions &op)
|
|
|
2184
2085
|
continue;
|
|
2185
2086
|
}
|
|
2186
2087
|
|
|
2187
|
-
|
|
2088
|
+
bool isNewStyleSignature = IsNewStyleSignature(ai);
|
|
2188
2089
|
bool needCheck = !isNewStyleSignature
|
|
2189
2090
|
|| ai.Signatures.IsEmpty()
|
|
2190
2091
|
|| ai.Flags_PureStartOpen()
|
|
@@ -2197,12 +2098,13 @@ HRESULT CArc::OpenStream2(const COpenOptions &op)
|
|
|
2197
2098
|
for (k = 0; k < ai.Signatures.Size(); k++)
|
|
2198
2099
|
{
|
|
2199
2100
|
const CByteBuffer &sig = ai.Signatures[k];
|
|
2200
|
-
|
|
2101
|
+
UInt32 signatureEnd = ai.SignatureOffset + (UInt32)sig.Size();
|
|
2102
|
+
if (processedSize < signatureEnd)
|
|
2201
2103
|
{
|
|
2202
2104
|
if (!endOfFile)
|
|
2203
2105
|
needCheck = true;
|
|
2204
2106
|
}
|
|
2205
|
-
else if (
|
|
2107
|
+
else if (memcmp(sig, byteBuffer + ai.SignatureOffset, sig.Size()) == 0)
|
|
2206
2108
|
break;
|
|
2207
2109
|
}
|
|
2208
2110
|
if (k != ai.Signatures.Size())
|
|
@@ -2216,20 +2118,20 @@ HRESULT CArc::OpenStream2(const COpenOptions &op)
|
|
|
2216
2118
|
}
|
|
2217
2119
|
|
|
2218
2120
|
if (splitIndex >= 0)
|
|
2219
|
-
sortedFormats.Insert(0,
|
|
2121
|
+
sortedFormats.Insert(0, splitIndex);
|
|
2220
2122
|
|
|
2221
2123
|
for (i = 0; i < sortedFormats.Size(); i++)
|
|
2222
2124
|
{
|
|
2223
|
-
FormatIndex =
|
|
2224
|
-
const CArcInfoEx &ai = op.codecs->Formats[
|
|
2125
|
+
FormatIndex = sortedFormats[i];
|
|
2126
|
+
const CArcInfoEx &ai = op.codecs->Formats[FormatIndex];
|
|
2225
2127
|
|
|
2226
2128
|
if (op.callback)
|
|
2227
|
-
RINOK(op.callback->SetTotal(NULL, &fileSize))
|
|
2129
|
+
RINOK(op.callback->SetTotal(NULL, &fileSize));
|
|
2228
2130
|
|
|
2229
|
-
RINOK(
|
|
2131
|
+
RINOK(op.stream->Seek(0, STREAM_SEEK_SET, NULL));
|
|
2230
2132
|
|
|
2231
2133
|
CMyComPtr<IInArchive> archive;
|
|
2232
|
-
RINOK(PrepareToOpen(op,
|
|
2134
|
+
RINOK(PrepareToOpen(op, FormatIndex, archive));
|
|
2233
2135
|
if (!archive)
|
|
2234
2136
|
continue;
|
|
2235
2137
|
|
|
@@ -2242,10 +2144,7 @@ HRESULT CArc::OpenStream2(const COpenOptions &op)
|
|
|
2242
2144
|
result = archive->Open(op.stream, &searchLimit, op.callback);
|
|
2243
2145
|
else
|
|
2244
2146
|
*/
|
|
2245
|
-
|
|
2246
|
-
result = OpenArchiveSpec(archive,
|
|
2247
|
-
!mode.CanReturnArc, // needPhySize
|
|
2248
|
-
op.stream, &searchLimit, op.callback, extractCallback_To_OpenCallback);
|
|
2147
|
+
result = OpenArchiveSpec(archive, !mode.CanReturnArc, op.stream, &searchLimit, op.callback, extractCallback_To_OpenCallback);
|
|
2249
2148
|
}
|
|
2250
2149
|
|
|
2251
2150
|
if (result == S_FALSE)
|
|
@@ -2255,9 +2154,9 @@ HRESULT CArc::OpenStream2(const COpenOptions &op)
|
|
|
2255
2154
|
// printf(" OpenForSize Error");
|
|
2256
2155
|
continue;
|
|
2257
2156
|
}
|
|
2258
|
-
RINOK(result)
|
|
2157
|
+
RINOK(result);
|
|
2259
2158
|
|
|
2260
|
-
RINOK(ReadBasicProps(archive, 0, result))
|
|
2159
|
+
RINOK(ReadBasicProps(archive, 0, result));
|
|
2261
2160
|
|
|
2262
2161
|
if (Offset > 0)
|
|
2263
2162
|
{
|
|
@@ -2267,12 +2166,12 @@ HRESULT CArc::OpenStream2(const COpenOptions &op)
|
|
|
2267
2166
|
}
|
|
2268
2167
|
|
|
2269
2168
|
NArchive::NParser::CParseItem pi;
|
|
2270
|
-
pi.Offset =
|
|
2169
|
+
pi.Offset = Offset;
|
|
2271
2170
|
pi.Size = AvailPhySize;
|
|
2272
2171
|
|
|
2273
2172
|
// bool needScan = false;
|
|
2274
2173
|
|
|
2275
|
-
if (!
|
|
2174
|
+
if (!PhySizeDefined)
|
|
2276
2175
|
{
|
|
2277
2176
|
// it's for Z format
|
|
2278
2177
|
pi.LenIsUnknown = true;
|
|
@@ -2294,7 +2193,7 @@ HRESULT CArc::OpenStream2(const COpenOptions &op)
|
|
|
2294
2193
|
|
|
2295
2194
|
if (mode.CanReturnArc)
|
|
2296
2195
|
{
|
|
2297
|
-
|
|
2196
|
+
bool isMainFormat = isMainFormatArr[(unsigned)FormatIndex];
|
|
2298
2197
|
const COpenSpecFlags &specFlags = mode.GetSpec(isForced, isMainFormat, isUnknownExt);
|
|
2299
2198
|
bool openCur = false;
|
|
2300
2199
|
|
|
@@ -2304,7 +2203,7 @@ HRESULT CArc::OpenStream2(const COpenOptions &op)
|
|
|
2304
2203
|
{
|
|
2305
2204
|
if (mode.ZerosTailIsAllowed)
|
|
2306
2205
|
{
|
|
2307
|
-
RINOK(CheckZerosTail(op,
|
|
2206
|
+
RINOK(CheckZerosTail(op, Offset + PhySize));
|
|
2308
2207
|
if (ErrorInfo.IgnoreTail)
|
|
2309
2208
|
openCur = true;
|
|
2310
2209
|
}
|
|
@@ -2344,7 +2243,7 @@ HRESULT CArc::OpenStream2(const COpenOptions &op)
|
|
|
2344
2243
|
continue;
|
|
2345
2244
|
|
|
2346
2245
|
// printf("\nAdd offset = %d", (int)pi.Offset);
|
|
2347
|
-
RINOK(ReadParseItemProps(archive, ai, pi))
|
|
2246
|
+
RINOK(ReadParseItemProps(archive, ai, pi));
|
|
2348
2247
|
handlerSpec->AddItem(pi);
|
|
2349
2248
|
}
|
|
2350
2249
|
}
|
|
@@ -2400,8 +2299,6 @@ HRESULT CArc::OpenStream2(const COpenOptions &op)
|
|
|
2400
2299
|
if (index < 0)
|
|
2401
2300
|
continue;
|
|
2402
2301
|
const CArcInfoEx &ai = op.codecs->Formats[(unsigned)index];
|
|
2403
|
-
if (ai.Flags_ByExtOnlyOpen())
|
|
2404
|
-
continue;
|
|
2405
2302
|
bool isDifficult = false;
|
|
2406
2303
|
// if (ai.Version < 0x91F) // we don't use parser with old DLL (before 9.31)
|
|
2407
2304
|
if (!ai.NewInterface)
|
|
@@ -2432,7 +2329,7 @@ HRESULT CArc::OpenStream2(const COpenOptions &op)
|
|
|
2432
2329
|
}
|
|
2433
2330
|
if (isDifficult)
|
|
2434
2331
|
{
|
|
2435
|
-
difficultFormats.Add(
|
|
2332
|
+
difficultFormats.Add(index);
|
|
2436
2333
|
difficultBools[(unsigned)index] = true;
|
|
2437
2334
|
}
|
|
2438
2335
|
}
|
|
@@ -2443,7 +2340,7 @@ HRESULT CArc::OpenStream2(const COpenOptions &op)
|
|
|
2443
2340
|
// canReturnTailArc = true;
|
|
2444
2341
|
}
|
|
2445
2342
|
|
|
2446
|
-
RINOK(
|
|
2343
|
+
RINOK(op.stream->Seek(0, STREAM_SEEK_SET, NULL));
|
|
2447
2344
|
|
|
2448
2345
|
CLimitedCachedInStream *limitedStreamSpec = new CLimitedCachedInStream;
|
|
2449
2346
|
CMyComPtr<IInStream> limitedStream = limitedStreamSpec;
|
|
@@ -2457,13 +2354,13 @@ HRESULT CArc::OpenStream2(const COpenOptions &op)
|
|
|
2457
2354
|
openCallback_Offset = openCallback_Offset_Spec;
|
|
2458
2355
|
openCallback_Offset_Spec->Callback = op.callback;
|
|
2459
2356
|
openCallback_Offset_Spec->Callback.QueryInterface(IID_IArchiveOpenVolumeCallback, &openCallback_Offset_Spec->OpenVolumeCallback);
|
|
2460
|
-
#ifndef
|
|
2357
|
+
#ifndef _NO_CRYPTO
|
|
2461
2358
|
openCallback_Offset_Spec->Callback.QueryInterface(IID_ICryptoGetTextPassword, &openCallback_Offset_Spec->GetTextPassword);
|
|
2462
2359
|
#endif
|
|
2463
2360
|
}
|
|
2464
2361
|
|
|
2465
2362
|
if (op.callback)
|
|
2466
|
-
RINOK(op.callback->SetTotal(NULL, &fileSize))
|
|
2363
|
+
RINOK(op.callback->SetTotal(NULL, &fileSize));
|
|
2467
2364
|
|
|
2468
2365
|
CByteBuffer &byteBuffer = limitedStreamSpec->Buffer;
|
|
2469
2366
|
byteBuffer.Alloc(kBufSize);
|
|
@@ -2501,8 +2398,8 @@ HRESULT CArc::OpenStream2(const COpenOptions &op)
|
|
|
2501
2398
|
size_t processedSize = kBufSize - bytesInBuf;
|
|
2502
2399
|
// printf("\nRead ask = %d", (unsigned)processedSize);
|
|
2503
2400
|
UInt64 seekPos = bufPhyPos + bytesInBuf;
|
|
2504
|
-
RINOK(
|
|
2505
|
-
RINOK(ReadStream(op.stream, byteBuffer
|
|
2401
|
+
RINOK(op.stream->Seek(bufPhyPos + bytesInBuf, STREAM_SEEK_SET, NULL));
|
|
2402
|
+
RINOK(ReadStream(op.stream, byteBuffer + bytesInBuf, &processedSize));
|
|
2506
2403
|
// printf(" processed = %d", (unsigned)processedSize);
|
|
2507
2404
|
if (processedSize == 0)
|
|
2508
2405
|
{
|
|
@@ -2524,7 +2421,7 @@ HRESULT CArc::OpenStream2(const COpenOptions &op)
|
|
|
2524
2421
|
{
|
|
2525
2422
|
size_t keepSize = (size_t)(kBeforeSize - skipSize);
|
|
2526
2423
|
// printf("\nmemmove skip = %d", (int)keepSize);
|
|
2527
|
-
memmove(byteBuffer, byteBuffer
|
|
2424
|
+
memmove(byteBuffer, byteBuffer + bytesInBuf - keepSize, keepSize);
|
|
2528
2425
|
bytesInBuf = keepSize;
|
|
2529
2426
|
bufPhyPos = pos - keepSize;
|
|
2530
2427
|
continue;
|
|
@@ -2540,7 +2437,7 @@ HRESULT CArc::OpenStream2(const COpenOptions &op)
|
|
|
2540
2437
|
{
|
|
2541
2438
|
size_t beg = (size_t)posInBuf - kBeforeSize;
|
|
2542
2439
|
// printf("\nmemmove for after beg = %d", (int)beg);
|
|
2543
|
-
memmove(byteBuffer, byteBuffer
|
|
2440
|
+
memmove(byteBuffer, byteBuffer + beg, bytesInBuf - beg);
|
|
2544
2441
|
bufPhyPos += beg;
|
|
2545
2442
|
bytesInBuf -= beg;
|
|
2546
2443
|
continue;
|
|
@@ -2560,7 +2457,7 @@ HRESULT CArc::OpenStream2(const COpenOptions &op)
|
|
|
2560
2457
|
|
|
2561
2458
|
if (pos >= callbackPrev + (1 << 23))
|
|
2562
2459
|
{
|
|
2563
|
-
RINOK(
|
|
2460
|
+
RINOK(openCallback_Offset_Spec->SetCompleted(NULL, NULL));
|
|
2564
2461
|
callbackPrev = pos;
|
|
2565
2462
|
}
|
|
2566
2463
|
}
|
|
@@ -2574,7 +2471,7 @@ HRESULT CArc::OpenStream2(const COpenOptions &op)
|
|
|
2574
2471
|
}
|
|
2575
2472
|
}
|
|
2576
2473
|
|
|
2577
|
-
|
|
2474
|
+
size_t availSize = bytesInBuf - (size_t)posInBuf;
|
|
2578
2475
|
if (availSize < kNumHashBytes)
|
|
2579
2476
|
break;
|
|
2580
2477
|
size_t scanSize = availSize -
|
|
@@ -2598,14 +2495,14 @@ HRESULT CArc::OpenStream2(const COpenOptions &op)
|
|
|
2598
2495
|
|
|
2599
2496
|
scanSize++;
|
|
2600
2497
|
|
|
2601
|
-
const Byte *buf = byteBuffer
|
|
2498
|
+
const Byte *buf = byteBuffer + (size_t)posInBuf;
|
|
2602
2499
|
const Byte *bufLimit = buf + scanSize;
|
|
2603
2500
|
size_t ppp = 0;
|
|
2604
2501
|
|
|
2605
2502
|
if (!needCheckStartOpen)
|
|
2606
2503
|
{
|
|
2607
2504
|
for (; buf < bufLimit && hash[HASH_VAL(buf)] == 0xFF; buf++);
|
|
2608
|
-
ppp =
|
|
2505
|
+
ppp = buf - (byteBuffer + (size_t)posInBuf);
|
|
2609
2506
|
pos += ppp;
|
|
2610
2507
|
if (buf == bufLimit)
|
|
2611
2508
|
continue;
|
|
@@ -2683,10 +2580,10 @@ HRESULT CArc::OpenStream2(const COpenOptions &op)
|
|
|
2683
2580
|
|
|
2684
2581
|
if (ai.IsArcFunc && startArcPos >= bufPhyPos)
|
|
2685
2582
|
{
|
|
2686
|
-
|
|
2583
|
+
size_t offsetInBuf = (size_t)(startArcPos - bufPhyPos);
|
|
2687
2584
|
if (offsetInBuf < bytesInBuf)
|
|
2688
2585
|
{
|
|
2689
|
-
|
|
2586
|
+
UInt32 isArcRes = ai.IsArcFunc(byteBuffer + offsetInBuf, bytesInBuf - offsetInBuf);
|
|
2690
2587
|
if (isArcRes == k_IsArc_Res_NO)
|
|
2691
2588
|
continue;
|
|
2692
2589
|
if (isArcRes == k_IsArc_Res_NEED_MORE && endOfFile)
|
|
@@ -2702,30 +2599,34 @@ HRESULT CArc::OpenStream2(const COpenOptions &op)
|
|
|
2702
2599
|
// printf("\nIsArc OK: %S", (const wchar_t *)ai.Name);
|
|
2703
2600
|
}
|
|
2704
2601
|
|
|
2602
|
+
/*
|
|
2603
|
+
if (pos == 67109888)
|
|
2604
|
+
pos = pos;
|
|
2605
|
+
*/
|
|
2705
2606
|
PRF(printf("\npos = %9I64d : %S", pos, (const wchar_t *)ai.Name));
|
|
2706
2607
|
|
|
2707
|
-
|
|
2608
|
+
bool isMainFormat = isMainFormatArr[index];
|
|
2708
2609
|
const COpenSpecFlags &specFlags = mode.GetSpec(isForced, isMainFormat, isUnknownExt);
|
|
2709
2610
|
|
|
2710
2611
|
CMyComPtr<IInArchive> archive;
|
|
2711
|
-
RINOK(PrepareToOpen(op, index, archive))
|
|
2612
|
+
RINOK(PrepareToOpen(op, index, archive));
|
|
2712
2613
|
if (!archive)
|
|
2713
2614
|
return E_FAIL;
|
|
2714
2615
|
|
|
2715
2616
|
// OutputDebugStringW(ai.Name);
|
|
2716
2617
|
|
|
2717
|
-
|
|
2618
|
+
UInt64 rem = fileSize - startArcPos;
|
|
2718
2619
|
|
|
2719
2620
|
UInt64 arcStreamOffset = 0;
|
|
2720
2621
|
|
|
2721
2622
|
if (ai.Flags_UseGlobalOffset())
|
|
2722
2623
|
{
|
|
2723
|
-
|
|
2724
|
-
|
|
2624
|
+
limitedStreamSpec->InitAndSeek(0, fileSize);
|
|
2625
|
+
limitedStream->Seek(startArcPos, STREAM_SEEK_SET, NULL);
|
|
2725
2626
|
}
|
|
2726
2627
|
else
|
|
2727
2628
|
{
|
|
2728
|
-
|
|
2629
|
+
limitedStreamSpec->InitAndSeek(startArcPos, rem);
|
|
2729
2630
|
arcStreamOffset = startArcPos;
|
|
2730
2631
|
}
|
|
2731
2632
|
|
|
@@ -2741,42 +2642,33 @@ HRESULT CArc::OpenStream2(const COpenOptions &op)
|
|
|
2741
2642
|
extractCallback_To_OpenCallback_Spec->Files = 0;
|
|
2742
2643
|
extractCallback_To_OpenCallback_Spec->Offset = startArcPos;
|
|
2743
2644
|
|
|
2744
|
-
HRESULT result = OpenArchiveSpec(archive,
|
|
2745
|
-
true, // needPhySize
|
|
2746
|
-
limitedStream, &maxCheckStartPosition,
|
|
2645
|
+
HRESULT result = OpenArchiveSpec(archive, true, limitedStream, &maxCheckStartPosition,
|
|
2747
2646
|
useOffsetCallback ? (IArchiveOpenCallback *)openCallback_Offset : (IArchiveOpenCallback *)op.callback,
|
|
2748
2647
|
extractCallback_To_OpenCallback);
|
|
2749
2648
|
|
|
2750
|
-
RINOK(ReadBasicProps(archive, ai.Flags_UseGlobalOffset() ? 0 : startArcPos, result))
|
|
2649
|
+
RINOK(ReadBasicProps(archive, ai.Flags_UseGlobalOffset() ? 0 : startArcPos, result));
|
|
2751
2650
|
|
|
2752
2651
|
bool isOpen = false;
|
|
2753
|
-
|
|
2754
2652
|
if (result == S_FALSE)
|
|
2755
2653
|
{
|
|
2756
2654
|
if (!mode.CanReturnParser)
|
|
2757
2655
|
{
|
|
2758
2656
|
if (formatIndex < 0 && ErrorInfo.IsArc_After_NonOpen())
|
|
2759
2657
|
{
|
|
2760
|
-
ErrorInfo.ErrorFormatIndex =
|
|
2658
|
+
ErrorInfo.ErrorFormatIndex = index;
|
|
2761
2659
|
NonOpen_ErrorInfo = ErrorInfo;
|
|
2762
2660
|
// if archive was detected, we don't need additional open attempts
|
|
2763
2661
|
return S_FALSE;
|
|
2764
2662
|
}
|
|
2765
2663
|
continue;
|
|
2766
2664
|
}
|
|
2767
|
-
if (!ErrorInfo.IsArc_After_NonOpen() || !
|
|
2665
|
+
if (!ErrorInfo.IsArc_After_NonOpen() || !PhySizeDefined || PhySize == 0)
|
|
2768
2666
|
continue;
|
|
2769
2667
|
}
|
|
2770
2668
|
else
|
|
2771
2669
|
{
|
|
2772
|
-
if (PhySize_Defined && PhySize == 0)
|
|
2773
|
-
{
|
|
2774
|
-
PRF(printf(" phySize_Defined && PhySize == 0 "));
|
|
2775
|
-
// we skip that epmty archive case with unusual unexpected (PhySize == 0) from Code function.
|
|
2776
|
-
continue;
|
|
2777
|
-
}
|
|
2778
2670
|
isOpen = true;
|
|
2779
|
-
RINOK(result)
|
|
2671
|
+
RINOK(result);
|
|
2780
2672
|
PRF(printf(" OK "));
|
|
2781
2673
|
}
|
|
2782
2674
|
|
|
@@ -2788,14 +2680,13 @@ HRESULT CArc::OpenStream2(const COpenOptions &op)
|
|
|
2788
2680
|
pi.Offset = startArcPos;
|
|
2789
2681
|
|
|
2790
2682
|
if (ai.Flags_UseGlobalOffset())
|
|
2791
|
-
pi.Offset =
|
|
2683
|
+
pi.Offset = Offset;
|
|
2792
2684
|
else if (Offset != 0)
|
|
2793
2685
|
return E_FAIL;
|
|
2794
|
-
|
|
2795
|
-
const UInt64 arcRem = FileSize - pi.Offset;
|
|
2686
|
+
UInt64 arcRem = FileSize - pi.Offset;
|
|
2796
2687
|
UInt64 phySize = arcRem;
|
|
2797
|
-
|
|
2798
|
-
if (
|
|
2688
|
+
bool phySizeDefined = PhySizeDefined;
|
|
2689
|
+
if (phySizeDefined)
|
|
2799
2690
|
{
|
|
2800
2691
|
if (pi.Offset + PhySize > FileSize)
|
|
2801
2692
|
{
|
|
@@ -2821,9 +2712,9 @@ HRESULT CArc::OpenStream2(const COpenOptions &op)
|
|
|
2821
2712
|
bool needScan = false;
|
|
2822
2713
|
|
|
2823
2714
|
|
|
2824
|
-
if (isOpen && !
|
|
2715
|
+
if (isOpen && !phySizeDefined)
|
|
2825
2716
|
{
|
|
2826
|
-
// it's for Z format
|
|
2717
|
+
// it's for Z format
|
|
2827
2718
|
pi.LenIsUnknown = true;
|
|
2828
2719
|
needScan = true;
|
|
2829
2720
|
phySize = arcRem;
|
|
@@ -2840,7 +2731,7 @@ HRESULT CArc::OpenStream2(const COpenOptions &op)
|
|
|
2840
2731
|
|
|
2841
2732
|
/*
|
|
2842
2733
|
if (needSkipFullArc)
|
|
2843
|
-
if (pi.Offset == 0 &&
|
|
2734
|
+
if (pi.Offset == 0 && phySizeDefined && pi.Size >= fileSize)
|
|
2844
2735
|
continue;
|
|
2845
2736
|
*/
|
|
2846
2737
|
if (pi.Offset == 0 && !pi.LenIsUnknown && pi.Size >= FileSize)
|
|
@@ -2866,9 +2757,9 @@ HRESULT CArc::OpenStream2(const COpenOptions &op)
|
|
|
2866
2757
|
pos = pi.Offset + pi.Size;
|
|
2867
2758
|
|
|
2868
2759
|
|
|
2869
|
-
RINOK(ReadParseItemProps(archive, ai, pi))
|
|
2760
|
+
RINOK(ReadParseItemProps(archive, ai, pi));
|
|
2870
2761
|
|
|
2871
|
-
if (pi.Offset < startArcPos && !mode.EachPos /* &&
|
|
2762
|
+
if (pi.Offset < startArcPos && !mode.EachPos /* && phySizeDefined */)
|
|
2872
2763
|
{
|
|
2873
2764
|
/* It's for DMG format.
|
|
2874
2765
|
This code deletes all previous items that are included to current item */
|
|
@@ -2887,7 +2778,7 @@ HRESULT CArc::OpenStream2(const COpenOptions &op)
|
|
|
2887
2778
|
}
|
|
2888
2779
|
|
|
2889
2780
|
|
|
2890
|
-
if (isOpen && mode.CanReturnArc &&
|
|
2781
|
+
if (isOpen && mode.CanReturnArc && phySizeDefined)
|
|
2891
2782
|
{
|
|
2892
2783
|
// if (pi.Offset + pi.Size >= fileSize)
|
|
2893
2784
|
bool openCur = false;
|
|
@@ -2895,7 +2786,7 @@ HRESULT CArc::OpenStream2(const COpenOptions &op)
|
|
|
2895
2786
|
bool thereIsTail = ErrorInfo.ThereIsTail;
|
|
2896
2787
|
if (thereIsTail && mode.ZerosTailIsAllowed)
|
|
2897
2788
|
{
|
|
2898
|
-
RINOK(CheckZerosTail(op,
|
|
2789
|
+
RINOK(CheckZerosTail(op, arcStreamOffset + Offset + PhySize));
|
|
2899
2790
|
if (ErrorInfo.IgnoreTail)
|
|
2900
2791
|
thereIsTail = false;
|
|
2901
2792
|
}
|
|
@@ -2903,12 +2794,10 @@ HRESULT CArc::OpenStream2(const COpenOptions &op)
|
|
|
2903
2794
|
if (pi.Offset != 0)
|
|
2904
2795
|
{
|
|
2905
2796
|
if (!pi.IsNotArcType)
|
|
2906
|
-
{
|
|
2907
2797
|
if (thereIsTail)
|
|
2908
2798
|
openCur = specFlags.CanReturnMid;
|
|
2909
2799
|
else
|
|
2910
2800
|
openCur = specFlags.CanReturnTail;
|
|
2911
|
-
}
|
|
2912
2801
|
}
|
|
2913
2802
|
else
|
|
2914
2803
|
{
|
|
@@ -2916,11 +2805,11 @@ HRESULT CArc::OpenStream2(const COpenOptions &op)
|
|
|
2916
2805
|
openCur = true;
|
|
2917
2806
|
else
|
|
2918
2807
|
openCur = specFlags.CanReturnFrontal;
|
|
2808
|
+
|
|
2919
2809
|
|
|
2920
2810
|
if (formatIndex >= -2)
|
|
2921
2811
|
openCur = true;
|
|
2922
2812
|
}
|
|
2923
|
-
|
|
2924
2813
|
if (formatIndex < 0 && pi.IsSelfExe /* && mode.SkipSfxStub */)
|
|
2925
2814
|
openCur = false;
|
|
2926
2815
|
|
|
@@ -2947,7 +2836,7 @@ HRESULT CArc::OpenStream2(const COpenOptions &op)
|
|
|
2947
2836
|
{
|
|
2948
2837
|
InStream = op.stream;
|
|
2949
2838
|
Archive = archive;
|
|
2950
|
-
FormatIndex =
|
|
2839
|
+
FormatIndex = index;
|
|
2951
2840
|
ArcStreamOffset = arcStreamOffset;
|
|
2952
2841
|
return S_OK;
|
|
2953
2842
|
}
|
|
@@ -2961,7 +2850,7 @@ HRESULT CArc::OpenStream2(const COpenOptions &op)
|
|
|
2961
2850
|
}
|
|
2962
2851
|
*/
|
|
2963
2852
|
|
|
2964
|
-
pi.FormatIndex =
|
|
2853
|
+
pi.FormatIndex = index;
|
|
2965
2854
|
|
|
2966
2855
|
// printf("\nAdd offset = %d", (int)pi.Offset);
|
|
2967
2856
|
handlerSpec->AddItem(pi);
|
|
@@ -3016,12 +2905,9 @@ HRESULT CArc::OpenStream2(const COpenOptions &op)
|
|
|
3016
2905
|
return S_OK;
|
|
3017
2906
|
}
|
|
3018
2907
|
|
|
3019
|
-
|
|
3020
|
-
|
|
3021
|
-
|
|
3022
2908
|
HRESULT CArc::OpenStream(const COpenOptions &op)
|
|
3023
2909
|
{
|
|
3024
|
-
RINOK(OpenStream2(op))
|
|
2910
|
+
RINOK(OpenStream2(op));
|
|
3025
2911
|
// PrintNumber("op.formatIndex 3", op.formatIndex);
|
|
3026
2912
|
|
|
3027
2913
|
if (Archive)
|
|
@@ -3031,25 +2917,25 @@ HRESULT CArc::OpenStream(const COpenOptions &op)
|
|
|
3031
2917
|
Archive->QueryInterface(IID_IArchiveGetRawProps, (void **)&GetRawProps);
|
|
3032
2918
|
Archive->QueryInterface(IID_IArchiveGetRootProps, (void **)&GetRootProps);
|
|
3033
2919
|
|
|
3034
|
-
RINOK(
|
|
3035
|
-
RINOK(
|
|
3036
|
-
RINOK(
|
|
3037
|
-
RINOK(
|
|
3038
|
-
RINOK(
|
|
3039
|
-
RINOK(
|
|
2920
|
+
RINOK(Archive_GetArcBoolProp(Archive, kpidIsTree, IsTree));
|
|
2921
|
+
RINOK(Archive_GetArcBoolProp(Archive, kpidIsDeleted, Ask_Deleted));
|
|
2922
|
+
RINOK(Archive_GetArcBoolProp(Archive, kpidIsAltStream, Ask_AltStream));
|
|
2923
|
+
RINOK(Archive_GetArcBoolProp(Archive, kpidIsAux, Ask_Aux));
|
|
2924
|
+
RINOK(Archive_GetArcBoolProp(Archive, kpidINode, Ask_INode));
|
|
2925
|
+
RINOK(Archive_GetArcBoolProp(Archive, kpidReadOnly, IsReadOnly));
|
|
3040
2926
|
|
|
3041
2927
|
const UString fileName = ExtractFileNameFromPath(Path);
|
|
3042
2928
|
UString extension;
|
|
3043
2929
|
{
|
|
3044
2930
|
int dotPos = fileName.ReverseFind_Dot();
|
|
3045
2931
|
if (dotPos >= 0)
|
|
3046
|
-
extension = fileName.Ptr(
|
|
2932
|
+
extension = fileName.Ptr(dotPos + 1);
|
|
3047
2933
|
}
|
|
3048
2934
|
|
|
3049
2935
|
DefaultName.Empty();
|
|
3050
2936
|
if (FormatIndex >= 0)
|
|
3051
2937
|
{
|
|
3052
|
-
const CArcInfoEx &ai = op.codecs->Formats[
|
|
2938
|
+
const CArcInfoEx &ai = op.codecs->Formats[FormatIndex];
|
|
3053
2939
|
if (ai.Exts.Size() == 0)
|
|
3054
2940
|
DefaultName = GetDefaultName2(fileName, UString(), UString());
|
|
3055
2941
|
else
|
|
@@ -3057,7 +2943,7 @@ HRESULT CArc::OpenStream(const COpenOptions &op)
|
|
|
3057
2943
|
int subExtIndex = ai.FindExtension(extension);
|
|
3058
2944
|
if (subExtIndex < 0)
|
|
3059
2945
|
subExtIndex = 0;
|
|
3060
|
-
const CArcExtInfo &extInfo = ai.Exts[
|
|
2946
|
+
const CArcExtInfo &extInfo = ai.Exts[subExtIndex];
|
|
3061
2947
|
DefaultName = GetDefaultName2(fileName, extInfo.Ext, extInfo.AddExt);
|
|
3062
2948
|
}
|
|
3063
2949
|
}
|
|
@@ -3066,7 +2952,7 @@ HRESULT CArc::OpenStream(const COpenOptions &op)
|
|
|
3066
2952
|
return S_OK;
|
|
3067
2953
|
}
|
|
3068
2954
|
|
|
3069
|
-
#ifdef
|
|
2955
|
+
#ifdef _SFX
|
|
3070
2956
|
|
|
3071
2957
|
#ifdef _WIN32
|
|
3072
2958
|
#define k_ExeExt ".exe"
|
|
@@ -3086,12 +2972,7 @@ HRESULT CArc::OpenStreamOrFile(COpenOptions &op)
|
|
|
3086
2972
|
|
|
3087
2973
|
if (op.stdInMode)
|
|
3088
2974
|
{
|
|
3089
|
-
#if 1
|
|
3090
2975
|
seqStream = new CStdInFileStream;
|
|
3091
|
-
#else
|
|
3092
|
-
if (!CreateStdInStream(seqStream))
|
|
3093
|
-
return GetLastError_noZero_HRESULT();
|
|
3094
|
-
#endif
|
|
3095
2976
|
op.seqStream = seqStream;
|
|
3096
2977
|
}
|
|
3097
2978
|
else if (!op.stream)
|
|
@@ -3100,9 +2981,11 @@ HRESULT CArc::OpenStreamOrFile(COpenOptions &op)
|
|
|
3100
2981
|
fileStream = fileStreamSpec;
|
|
3101
2982
|
Path = filePath;
|
|
3102
2983
|
if (!fileStreamSpec->Open(us2fs(Path)))
|
|
3103
|
-
|
|
2984
|
+
{
|
|
2985
|
+
return GetLastError();
|
|
2986
|
+
}
|
|
3104
2987
|
op.stream = fileStream;
|
|
3105
|
-
#ifdef
|
|
2988
|
+
#ifdef _SFX
|
|
3106
2989
|
IgnoreSplit = true;
|
|
3107
2990
|
#endif
|
|
3108
2991
|
}
|
|
@@ -3111,7 +2994,7 @@ HRESULT CArc::OpenStreamOrFile(COpenOptions &op)
|
|
|
3111
2994
|
if (callback)
|
|
3112
2995
|
{
|
|
3113
2996
|
UInt64 fileSize;
|
|
3114
|
-
RINOK(
|
|
2997
|
+
RINOK(op.stream->Seek(0, STREAM_SEEK_END, &fileSize));
|
|
3115
2998
|
RINOK(op.callback->SetTotal(NULL, &fileSize))
|
|
3116
2999
|
}
|
|
3117
3000
|
*/
|
|
@@ -3119,7 +3002,7 @@ HRESULT CArc::OpenStreamOrFile(COpenOptions &op)
|
|
|
3119
3002
|
HRESULT res = OpenStream(op);
|
|
3120
3003
|
IgnoreSplit = false;
|
|
3121
3004
|
|
|
3122
|
-
#ifdef
|
|
3005
|
+
#ifdef _SFX
|
|
3123
3006
|
|
|
3124
3007
|
if (res != S_FALSE
|
|
3125
3008
|
|| !fileStreamSpec
|
|
@@ -3135,10 +3018,10 @@ HRESULT CArc::OpenStreamOrFile(COpenOptions &op)
|
|
|
3135
3018
|
FOR_VECTOR (i, op.codecs->Formats)
|
|
3136
3019
|
{
|
|
3137
3020
|
const CArcInfoEx &ai = op.codecs->Formats[i];
|
|
3138
|
-
if (ai.
|
|
3021
|
+
if (ai.IsSplit())
|
|
3139
3022
|
continue;
|
|
3140
3023
|
UString path3 = path2;
|
|
3141
|
-
path3.
|
|
3024
|
+
path3 += '.';
|
|
3142
3025
|
path3 += ai.GetMainExt(); // "7z" for SFX.
|
|
3143
3026
|
Path = path3;
|
|
3144
3027
|
Path += ".001";
|
|
@@ -3184,7 +3067,7 @@ HRESULT CArchiveLink::Close()
|
|
|
3184
3067
|
for (unsigned i = Arcs.Size(); i != 0;)
|
|
3185
3068
|
{
|
|
3186
3069
|
i--;
|
|
3187
|
-
RINOK(Arcs[i].Close())
|
|
3070
|
+
RINOK(Arcs[i].Close());
|
|
3188
3071
|
}
|
|
3189
3072
|
IsOpen = false;
|
|
3190
3073
|
// ErrorsText.Empty();
|
|
@@ -3317,13 +3200,13 @@ HRESULT CArchiveLink::Open(COpenOptions &op)
|
|
|
3317
3200
|
UInt32 mainSubfile;
|
|
3318
3201
|
{
|
|
3319
3202
|
NCOM::CPropVariant prop;
|
|
3320
|
-
RINOK(arc.Archive->GetArchiveProperty(kpidMainSubfile, &prop))
|
|
3203
|
+
RINOK(arc.Archive->GetArchiveProperty(kpidMainSubfile, &prop));
|
|
3321
3204
|
if (prop.vt == VT_UI4)
|
|
3322
3205
|
mainSubfile = prop.ulVal;
|
|
3323
3206
|
else
|
|
3324
3207
|
break;
|
|
3325
3208
|
UInt32 numItems;
|
|
3326
|
-
RINOK(arc.Archive->GetNumberOfItems(&numItems))
|
|
3209
|
+
RINOK(arc.Archive->GetNumberOfItems(&numItems));
|
|
3327
3210
|
if (mainSubfile >= numItems)
|
|
3328
3211
|
break;
|
|
3329
3212
|
}
|
|
@@ -3342,17 +3225,16 @@ HRESULT CArchiveLink::Open(COpenOptions &op)
|
|
|
3342
3225
|
break;
|
|
3343
3226
|
|
|
3344
3227
|
CArc arc2;
|
|
3345
|
-
RINOK(arc.
|
|
3228
|
+
RINOK(arc.GetItemPath(mainSubfile, arc2.Path));
|
|
3346
3229
|
|
|
3347
3230
|
bool zerosTailIsAllowed;
|
|
3348
|
-
RINOK(Archive_GetItemBoolProp(arc.Archive, mainSubfile, kpidZerosTailIsAllowed, zerosTailIsAllowed))
|
|
3231
|
+
RINOK(Archive_GetItemBoolProp(arc.Archive, mainSubfile, kpidZerosTailIsAllowed, zerosTailIsAllowed));
|
|
3349
3232
|
|
|
3350
3233
|
|
|
3351
3234
|
if (op.callback)
|
|
3352
3235
|
{
|
|
3353
|
-
|
|
3354
|
-
|
|
3355
|
-
setSubArchiveName, op.callback)
|
|
3236
|
+
CMyComPtr<IArchiveOpenSetSubArchiveName> setSubArchiveName;
|
|
3237
|
+
op.callback->QueryInterface(IID_IArchiveOpenSetSubArchiveName, (void **)&setSubArchiveName);
|
|
3356
3238
|
if (setSubArchiveName)
|
|
3357
3239
|
setSubArchiveName->SetSubArchiveName(arc2.Path);
|
|
3358
3240
|
}
|
|
@@ -3363,7 +3245,7 @@ HRESULT CArchiveLink::Open(COpenOptions &op)
|
|
|
3363
3245
|
CIntVector excl;
|
|
3364
3246
|
|
|
3365
3247
|
COpenOptions op2;
|
|
3366
|
-
#ifndef
|
|
3248
|
+
#ifndef _SFX
|
|
3367
3249
|
op2.props = op.props;
|
|
3368
3250
|
#endif
|
|
3369
3251
|
op2.codecs = op.codecs;
|
|
@@ -3386,8 +3268,8 @@ HRESULT CArchiveLink::Open(COpenOptions &op)
|
|
|
3386
3268
|
NonOpen_ArcPath = arc2.Path;
|
|
3387
3269
|
break;
|
|
3388
3270
|
}
|
|
3389
|
-
RINOK(result)
|
|
3390
|
-
RINOK(arc.
|
|
3271
|
+
RINOK(result);
|
|
3272
|
+
RINOK(arc.GetItemMTime(mainSubfile, arc2.MTime, arc2.MTimeDefined));
|
|
3391
3273
|
Arcs.Add(arc2);
|
|
3392
3274
|
}
|
|
3393
3275
|
IsOpen = !Arcs.IsEmpty();
|
|
@@ -3406,7 +3288,7 @@ HRESULT CArchiveLink::Open2(COpenOptions &op, IOpenCallbackUI *callbackUI)
|
|
|
3406
3288
|
if (!op.stream && !op.stdInMode)
|
|
3407
3289
|
{
|
|
3408
3290
|
NFile::NDir::GetFullPathAndSplit(us2fs(op.filePath), prefix, name);
|
|
3409
|
-
|
|
3291
|
+
openCallbackSpec->Init(prefix, name);
|
|
3410
3292
|
}
|
|
3411
3293
|
else
|
|
3412
3294
|
{
|
|
@@ -3421,7 +3303,7 @@ HRESULT CArchiveLink::Open2(COpenOptions &op, IOpenCallbackUI *callbackUI)
|
|
|
3421
3303
|
PasswordWasAsked = openCallbackSpec->PasswordWasAsked;
|
|
3422
3304
|
// Password = openCallbackSpec->Password;
|
|
3423
3305
|
|
|
3424
|
-
RINOK(res)
|
|
3306
|
+
RINOK(res);
|
|
3425
3307
|
// VolumePaths.Add(fs2us(prefix + name));
|
|
3426
3308
|
|
|
3427
3309
|
FOR_VECTOR (i, openCallbackSpec->FileNames_WasUsed)
|
|
@@ -3436,7 +3318,7 @@ HRESULT CArchiveLink::Open2(COpenOptions &op, IOpenCallbackUI *callbackUI)
|
|
|
3436
3318
|
return S_OK;
|
|
3437
3319
|
}
|
|
3438
3320
|
|
|
3439
|
-
HRESULT CArc::ReOpen(const COpenOptions &op
|
|
3321
|
+
HRESULT CArc::ReOpen(const COpenOptions &op)
|
|
3440
3322
|
{
|
|
3441
3323
|
ErrorInfo.ClearErrors();
|
|
3442
3324
|
ErrorInfo.ErrorFormatIndex = -1;
|
|
@@ -3444,9 +3326,8 @@ HRESULT CArc::ReOpen(const COpenOptions &op, IArchiveOpenCallback *openCallback_
|
|
|
3444
3326
|
UInt64 fileSize = 0;
|
|
3445
3327
|
if (op.stream)
|
|
3446
3328
|
{
|
|
3447
|
-
RINOK(
|
|
3448
|
-
RINOK(
|
|
3449
|
-
// RINOK(InStream_GetSize_SeekToBegin(op.stream, fileSize))
|
|
3329
|
+
RINOK(op.stream->Seek(0, STREAM_SEEK_END, &fileSize));
|
|
3330
|
+
RINOK(op.stream->Seek(0, STREAM_SEEK_SET, NULL));
|
|
3450
3331
|
}
|
|
3451
3332
|
FileSize = fileSize;
|
|
3452
3333
|
|
|
@@ -3459,23 +3340,20 @@ HRESULT CArc::ReOpen(const COpenOptions &op, IArchiveOpenCallback *openCallback_
|
|
|
3459
3340
|
CTailInStream *tailStreamSpec = new CTailInStream;
|
|
3460
3341
|
stream2 = tailStreamSpec;
|
|
3461
3342
|
tailStreamSpec->Stream = op.stream;
|
|
3462
|
-
tailStreamSpec->Offset =
|
|
3343
|
+
tailStreamSpec->Offset = globalOffset;
|
|
3463
3344
|
tailStreamSpec->Init();
|
|
3464
|
-
RINOK(tailStreamSpec->SeekToStart())
|
|
3345
|
+
RINOK(tailStreamSpec->SeekToStart());
|
|
3465
3346
|
}
|
|
3466
3347
|
|
|
3467
3348
|
// There are archives with embedded STUBs (like ZIP), so we must support signature scanning
|
|
3468
3349
|
// But for another archives we can use 0 here. So the code can be fixed !!!
|
|
3469
3350
|
UInt64 maxStartPosition = kMaxCheckStartPosition;
|
|
3470
|
-
|
|
3471
|
-
if (!openCallback)
|
|
3472
|
-
openCallback = op.callback;
|
|
3473
|
-
HRESULT res = Archive->Open(stream2, &maxStartPosition, openCallback);
|
|
3351
|
+
HRESULT res = Archive->Open(stream2, &maxStartPosition, op.callback);
|
|
3474
3352
|
|
|
3475
3353
|
if (res == S_OK)
|
|
3476
3354
|
{
|
|
3477
|
-
RINOK(ReadBasicProps(Archive,
|
|
3478
|
-
ArcStreamOffset =
|
|
3355
|
+
RINOK(ReadBasicProps(Archive, globalOffset, res));
|
|
3356
|
+
ArcStreamOffset = globalOffset;
|
|
3479
3357
|
if (ArcStreamOffset != 0)
|
|
3480
3358
|
InStream = op.stream;
|
|
3481
3359
|
}
|
|
@@ -3487,7 +3365,7 @@ HRESULT CArchiveLink::Open3(COpenOptions &op, IOpenCallbackUI *callbackUI)
|
|
|
3487
3365
|
HRESULT res = Open2(op, callbackUI);
|
|
3488
3366
|
if (callbackUI)
|
|
3489
3367
|
{
|
|
3490
|
-
RINOK(callbackUI->Open_Finished())
|
|
3368
|
+
RINOK(callbackUI->Open_Finished());
|
|
3491
3369
|
}
|
|
3492
3370
|
return res;
|
|
3493
3371
|
}
|
|
@@ -3507,8 +3385,6 @@ HRESULT CArchiveLink::ReOpen(COpenOptions &op)
|
|
|
3507
3385
|
if (Arcs.Size() == 0) // ???
|
|
3508
3386
|
return Open2(op, NULL);
|
|
3509
3387
|
|
|
3510
|
-
/* if archive is multivolume (unsupported here still)
|
|
3511
|
-
COpenCallbackImp object will exist after Open stage. */
|
|
3512
3388
|
COpenCallbackImp *openCallbackSpec = new COpenCallbackImp;
|
|
3513
3389
|
CMyComPtr<IArchiveOpenCallback> openCallbackNew = openCallbackSpec;
|
|
3514
3390
|
|
|
@@ -3517,20 +3393,18 @@ HRESULT CArchiveLink::ReOpen(COpenOptions &op)
|
|
|
3517
3393
|
{
|
|
3518
3394
|
FString dirPrefix, fileName;
|
|
3519
3395
|
NFile::NDir::GetFullPathAndSplit(us2fs(op.filePath), dirPrefix, fileName);
|
|
3520
|
-
|
|
3396
|
+
openCallbackSpec->Init(dirPrefix, fileName);
|
|
3521
3397
|
}
|
|
3522
3398
|
|
|
3523
3399
|
|
|
3524
3400
|
CInFileStream *fileStreamSpec = new CInFileStream;
|
|
3525
3401
|
CMyComPtr<IInStream> stream(fileStreamSpec);
|
|
3526
3402
|
if (!fileStreamSpec->Open(us2fs(op.filePath)))
|
|
3527
|
-
return
|
|
3403
|
+
return GetLastError();
|
|
3528
3404
|
op.stream = stream;
|
|
3529
3405
|
|
|
3530
3406
|
CArc &arc = Arcs[0];
|
|
3531
|
-
|
|
3532
|
-
|
|
3533
|
-
openCallbackSpec->ReOpenCallback = NULL;
|
|
3407
|
+
HRESULT res = arc.ReOpen(op);
|
|
3534
3408
|
|
|
3535
3409
|
PasswordWasAsked = openCallbackSpec->PasswordWasAsked;
|
|
3536
3410
|
// Password = openCallbackSpec->Password;
|
|
@@ -3539,9 +3413,8 @@ HRESULT CArchiveLink::ReOpen(COpenOptions &op)
|
|
|
3539
3413
|
return res;
|
|
3540
3414
|
}
|
|
3541
3415
|
|
|
3542
|
-
#ifndef
|
|
3416
|
+
#ifndef _SFX
|
|
3543
3417
|
|
|
3544
|
-
bool ParseComplexSize(const wchar_t *s, UInt64 &result);
|
|
3545
3418
|
bool ParseComplexSize(const wchar_t *s, UInt64 &result)
|
|
3546
3419
|
{
|
|
3547
3420
|
result = 0;
|
|
@@ -3583,7 +3456,6 @@ static bool ParseTypeParams(const UString &s, COpenType &type)
|
|
|
3583
3456
|
case 'e': type.EachPos = true; return true;
|
|
3584
3457
|
case 'a': type.CanReturnArc = true; return true;
|
|
3585
3458
|
case 'r': type.Recursive = true; return true;
|
|
3586
|
-
default: break;
|
|
3587
3459
|
}
|
|
3588
3460
|
return false;
|
|
3589
3461
|
}
|
|
@@ -3600,7 +3472,7 @@ static bool ParseTypeParams(const UString &s, COpenType &type)
|
|
|
3600
3472
|
return false;
|
|
3601
3473
|
}
|
|
3602
3474
|
|
|
3603
|
-
|
|
3475
|
+
bool ParseType(CCodecs &codecs, const UString &s, COpenType &type)
|
|
3604
3476
|
{
|
|
3605
3477
|
int pos2 = s.Find(L':');
|
|
3606
3478
|
|
|
@@ -3609,11 +3481,11 @@ static bool ParseType(CCodecs &codecs, const UString &s, COpenType &type)
|
|
|
3609
3481
|
if (pos2 < 0)
|
|
3610
3482
|
{
|
|
3611
3483
|
name = s;
|
|
3612
|
-
pos2 =
|
|
3484
|
+
pos2 = s.Len();
|
|
3613
3485
|
}
|
|
3614
3486
|
else
|
|
3615
3487
|
{
|
|
3616
|
-
name = s.Left(
|
|
3488
|
+
name = s.Left(pos2);
|
|
3617
3489
|
pos2++;
|
|
3618
3490
|
}
|
|
3619
3491
|
|
|
@@ -3634,12 +3506,6 @@ static bool ParseType(CCodecs &codecs, const UString &s, COpenType &type)
|
|
|
3634
3506
|
type.CanReturnArc = false;
|
|
3635
3507
|
type.CanReturnParser = true;
|
|
3636
3508
|
}
|
|
3637
|
-
else if (name.IsEqualTo_Ascii_NoCase("hash"))
|
|
3638
|
-
{
|
|
3639
|
-
// type.CanReturnArc = false;
|
|
3640
|
-
// type.CanReturnParser = false;
|
|
3641
|
-
type.IsHashType = true;
|
|
3642
|
-
}
|
|
3643
3509
|
else
|
|
3644
3510
|
return false;
|
|
3645
3511
|
}
|
|
@@ -3648,17 +3514,17 @@ static bool ParseType(CCodecs &codecs, const UString &s, COpenType &type)
|
|
|
3648
3514
|
|
|
3649
3515
|
}
|
|
3650
3516
|
|
|
3651
|
-
for (unsigned i =
|
|
3517
|
+
for (unsigned i = pos2; i < s.Len();)
|
|
3652
3518
|
{
|
|
3653
3519
|
int next = s.Find(L':', i);
|
|
3654
3520
|
if (next < 0)
|
|
3655
|
-
next =
|
|
3656
|
-
const UString name = s.Mid(i,
|
|
3521
|
+
next = s.Len();
|
|
3522
|
+
const UString name = s.Mid(i, next - i);
|
|
3657
3523
|
if (name.IsEmpty())
|
|
3658
3524
|
return false;
|
|
3659
3525
|
if (!ParseTypeParams(name, type))
|
|
3660
3526
|
return false;
|
|
3661
|
-
i =
|
|
3527
|
+
i = next + 1;
|
|
3662
3528
|
}
|
|
3663
3529
|
|
|
3664
3530
|
return true;
|
|
@@ -3667,36 +3533,21 @@ static bool ParseType(CCodecs &codecs, const UString &s, COpenType &type)
|
|
|
3667
3533
|
bool ParseOpenTypes(CCodecs &codecs, const UString &s, CObjectVector<COpenType> &types)
|
|
3668
3534
|
{
|
|
3669
3535
|
types.Clear();
|
|
3670
|
-
bool isHashType = false;
|
|
3671
3536
|
for (unsigned pos = 0; pos < s.Len();)
|
|
3672
3537
|
{
|
|
3673
3538
|
int pos2 = s.Find(L'.', pos);
|
|
3674
3539
|
if (pos2 < 0)
|
|
3675
|
-
pos2 =
|
|
3676
|
-
UString name = s.Mid(pos,
|
|
3540
|
+
pos2 = s.Len();
|
|
3541
|
+
UString name = s.Mid(pos, pos2 - pos);
|
|
3677
3542
|
if (name.IsEmpty())
|
|
3678
3543
|
return false;
|
|
3679
3544
|
COpenType type;
|
|
3680
3545
|
if (!ParseType(codecs, name, type))
|
|
3681
3546
|
return false;
|
|
3682
|
-
if (isHashType)
|
|
3683
|
-
return false;
|
|
3684
|
-
if (type.IsHashType)
|
|
3685
|
-
isHashType = true;
|
|
3686
3547
|
types.Add(type);
|
|
3687
|
-
pos =
|
|
3548
|
+
pos = pos2 + 1;
|
|
3688
3549
|
}
|
|
3689
3550
|
return true;
|
|
3690
3551
|
}
|
|
3691
3552
|
|
|
3692
|
-
/*
|
|
3693
|
-
bool IsHashType(const CObjectVector<COpenType> &types)
|
|
3694
|
-
{
|
|
3695
|
-
if (types.Size() != 1)
|
|
3696
|
-
return false;
|
|
3697
|
-
return types[0].IsHashType;
|
|
3698
|
-
}
|
|
3699
|
-
*/
|
|
3700
|
-
|
|
3701
|
-
|
|
3702
3553
|
#endif
|