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
|
@@ -1,140 +1,74 @@
|
|
|
1
1
|
/* LzFind.c -- Match finder for LZ algorithms
|
|
2
|
-
: Igor Pavlov : Public domain */
|
|
2
|
+
2018-07-08 : Igor Pavlov : Public domain */
|
|
3
3
|
|
|
4
4
|
#include "Precomp.h"
|
|
5
5
|
|
|
6
6
|
#include <string.h>
|
|
7
|
-
// #include <stdio.h>
|
|
8
7
|
|
|
9
|
-
#include "CpuArch.h"
|
|
10
8
|
#include "LzFind.h"
|
|
11
9
|
#include "LzHash.h"
|
|
12
10
|
|
|
13
|
-
#define kBlockMoveAlign (1 << 7) // alignment for memmove()
|
|
14
|
-
#define kBlockSizeAlign (1 << 16) // alignment for block allocation
|
|
15
|
-
#define kBlockSizeReserveMin (1 << 24) // it's 1/256 from 4 GB dictinary
|
|
16
|
-
|
|
17
11
|
#define kEmptyHashValue 0
|
|
12
|
+
#define kMaxValForNormalize ((UInt32)0xFFFFFFFF)
|
|
13
|
+
#define kNormalizeStepMin (1 << 10) /* it must be power of 2 */
|
|
14
|
+
#define kNormalizeMask (~(UInt32)(kNormalizeStepMin - 1))
|
|
15
|
+
#define kMaxHistorySize ((UInt32)7 << 29)
|
|
18
16
|
|
|
19
|
-
#define
|
|
20
|
-
// #define kMaxValForNormalize ((UInt32)(1 << 20) + 0xfff) // for debug
|
|
21
|
-
|
|
22
|
-
// #define kNormalizeAlign (1 << 7) // alignment for speculated accesses
|
|
23
|
-
|
|
24
|
-
#define GET_AVAIL_BYTES(p) \
|
|
25
|
-
Inline_MatchFinder_GetNumAvailableBytes(p)
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
// #define kFix5HashSize (kHash2Size + kHash3Size + kHash4Size)
|
|
29
|
-
#define kFix5HashSize kFix4HashSize
|
|
30
|
-
|
|
31
|
-
/*
|
|
32
|
-
HASH2_CALC:
|
|
33
|
-
if (hv) match, then cur[0] and cur[1] also match
|
|
34
|
-
*/
|
|
35
|
-
#define HASH2_CALC hv = GetUi16(cur);
|
|
36
|
-
|
|
37
|
-
// (crc[0 ... 255] & 0xFF) provides one-to-one correspondence to [0 ... 255]
|
|
38
|
-
|
|
39
|
-
/*
|
|
40
|
-
HASH3_CALC:
|
|
41
|
-
if (cur[0]) and (h2) match, then cur[1] also match
|
|
42
|
-
if (cur[0]) and (hv) match, then cur[1] and cur[2] also match
|
|
43
|
-
*/
|
|
44
|
-
#define HASH3_CALC { \
|
|
45
|
-
UInt32 temp = p->crc[cur[0]] ^ cur[1]; \
|
|
46
|
-
h2 = temp & (kHash2Size - 1); \
|
|
47
|
-
hv = (temp ^ ((UInt32)cur[2] << 8)) & p->hashMask; }
|
|
48
|
-
|
|
49
|
-
#define HASH4_CALC { \
|
|
50
|
-
UInt32 temp = p->crc[cur[0]] ^ cur[1]; \
|
|
51
|
-
h2 = temp & (kHash2Size - 1); \
|
|
52
|
-
temp ^= ((UInt32)cur[2] << 8); \
|
|
53
|
-
h3 = temp & (kHash3Size - 1); \
|
|
54
|
-
hv = (temp ^ (p->crc[cur[3]] << kLzHash_CrcShift_1)) & p->hashMask; }
|
|
55
|
-
|
|
56
|
-
#define HASH5_CALC { \
|
|
57
|
-
UInt32 temp = p->crc[cur[0]] ^ cur[1]; \
|
|
58
|
-
h2 = temp & (kHash2Size - 1); \
|
|
59
|
-
temp ^= ((UInt32)cur[2] << 8); \
|
|
60
|
-
h3 = temp & (kHash3Size - 1); \
|
|
61
|
-
temp ^= (p->crc[cur[3]] << kLzHash_CrcShift_1); \
|
|
62
|
-
/* h4 = temp & p->hash4Mask; */ /* (kHash4Size - 1); */ \
|
|
63
|
-
hv = (temp ^ (p->crc[cur[4]] << kLzHash_CrcShift_2)) & p->hashMask; }
|
|
64
|
-
|
|
65
|
-
#define HASH_ZIP_CALC hv = ((cur[2] | ((UInt32)cur[0] << 8)) ^ p->crc[cur[1]]) & 0xFFFF;
|
|
66
|
-
|
|
17
|
+
#define kStartMaxLen 3
|
|
67
18
|
|
|
68
19
|
static void LzInWindow_Free(CMatchFinder *p, ISzAllocPtr alloc)
|
|
69
20
|
{
|
|
70
|
-
|
|
21
|
+
if (!p->directInput)
|
|
71
22
|
{
|
|
72
|
-
ISzAlloc_Free(alloc, p->
|
|
73
|
-
p->
|
|
23
|
+
ISzAlloc_Free(alloc, p->bufferBase);
|
|
24
|
+
p->bufferBase = NULL;
|
|
74
25
|
}
|
|
75
26
|
}
|
|
76
27
|
|
|
28
|
+
/* keepSizeBefore + keepSizeAfter + keepSizeReserv must be < 4G) */
|
|
77
29
|
|
|
78
|
-
static int
|
|
30
|
+
static int LzInWindow_Create(CMatchFinder *p, UInt32 keepSizeReserv, ISzAllocPtr alloc)
|
|
79
31
|
{
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
32
|
+
UInt32 blockSize = p->keepSizeBefore + p->keepSizeAfter + keepSizeReserv;
|
|
33
|
+
if (p->directInput)
|
|
34
|
+
{
|
|
35
|
+
p->blockSize = blockSize;
|
|
36
|
+
return 1;
|
|
37
|
+
}
|
|
38
|
+
if (!p->bufferBase || p->blockSize != blockSize)
|
|
83
39
|
{
|
|
84
|
-
// size_t blockSizeT;
|
|
85
40
|
LzInWindow_Free(p, alloc);
|
|
86
41
|
p->blockSize = blockSize;
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
// printf("\nblockSize = 0x%x\n", blockSize);
|
|
90
|
-
/*
|
|
91
|
-
#if defined _WIN64
|
|
92
|
-
// we can allocate 4GiB, but still use UInt32 for (p->blockSize)
|
|
93
|
-
// we use UInt32 type for (p->blockSize), because
|
|
94
|
-
// we don't want to wrap over 4 GiB,
|
|
95
|
-
// when we use (p->streamPos - p->pos) that is UInt32.
|
|
96
|
-
if (blockSize >= (UInt32)0 - (UInt32)kBlockSizeAlign)
|
|
97
|
-
{
|
|
98
|
-
blockSizeT = ((size_t)1 << 32);
|
|
99
|
-
printf("\nchanged to blockSizeT = 4GiB\n");
|
|
100
|
-
}
|
|
101
|
-
#endif
|
|
102
|
-
*/
|
|
103
|
-
|
|
104
|
-
p->bufBase = (Byte *)ISzAlloc_Alloc(alloc, blockSize);
|
|
105
|
-
// printf("\nbufferBase = %p\n", p->bufBase);
|
|
106
|
-
// return 0; // for debug
|
|
42
|
+
p->bufferBase = (Byte *)ISzAlloc_Alloc(alloc, (size_t)blockSize);
|
|
107
43
|
}
|
|
108
|
-
return (p->
|
|
44
|
+
return (p->bufferBase != NULL);
|
|
109
45
|
}
|
|
110
46
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
}
|
|
47
|
+
Byte *MatchFinder_GetPointerToCurrentPos(CMatchFinder *p) { return p->buffer; }
|
|
48
|
+
|
|
49
|
+
UInt32 MatchFinder_GetNumAvailableBytes(CMatchFinder *p) { return p->streamPos - p->pos; }
|
|
115
50
|
|
|
116
|
-
|
|
51
|
+
void MatchFinder_ReduceOffsets(CMatchFinder *p, UInt32 subValue)
|
|
117
52
|
{
|
|
118
|
-
|
|
53
|
+
p->posLimit -= subValue;
|
|
54
|
+
p->pos -= subValue;
|
|
55
|
+
p->streamPos -= subValue;
|
|
119
56
|
}
|
|
120
57
|
|
|
121
|
-
|
|
122
|
-
Z7_NO_INLINE
|
|
123
58
|
static void MatchFinder_ReadBlock(CMatchFinder *p)
|
|
124
59
|
{
|
|
125
60
|
if (p->streamEndWasReached || p->result != SZ_OK)
|
|
126
61
|
return;
|
|
127
62
|
|
|
128
|
-
/* We use (p->streamPos - p->pos) value.
|
|
129
|
-
(p->streamPos < p->pos) is allowed. */
|
|
63
|
+
/* We use (p->streamPos - p->pos) value. (p->streamPos < p->pos) is allowed. */
|
|
130
64
|
|
|
131
65
|
if (p->directInput)
|
|
132
66
|
{
|
|
133
|
-
UInt32 curSize = 0xFFFFFFFF -
|
|
67
|
+
UInt32 curSize = 0xFFFFFFFF - (p->streamPos - p->pos);
|
|
134
68
|
if (curSize > p->directInputRem)
|
|
135
69
|
curSize = (UInt32)p->directInputRem;
|
|
136
|
-
p->streamPos += curSize;
|
|
137
70
|
p->directInputRem -= curSize;
|
|
71
|
+
p->streamPos += curSize;
|
|
138
72
|
if (p->directInputRem == 0)
|
|
139
73
|
p->streamEndWasReached = 1;
|
|
140
74
|
return;
|
|
@@ -142,31 +76,12 @@ static void MatchFinder_ReadBlock(CMatchFinder *p)
|
|
|
142
76
|
|
|
143
77
|
for (;;)
|
|
144
78
|
{
|
|
145
|
-
|
|
146
|
-
size_t size = (
|
|
79
|
+
Byte *dest = p->buffer + (p->streamPos - p->pos);
|
|
80
|
+
size_t size = (p->bufferBase + p->blockSize - dest);
|
|
147
81
|
if (size == 0)
|
|
148
|
-
{
|
|
149
|
-
/* we call ReadBlock() after NeedMove() and MoveBlock().
|
|
150
|
-
NeedMove() and MoveBlock() povide more than (keepSizeAfter)
|
|
151
|
-
to the end of (blockSize).
|
|
152
|
-
So we don't execute this branch in normal code flow.
|
|
153
|
-
We can go here, if we will call ReadBlock() before NeedMove(), MoveBlock().
|
|
154
|
-
*/
|
|
155
|
-
// p->result = SZ_ERROR_FAIL; // we can show error here
|
|
156
82
|
return;
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
// #define kRead 3
|
|
160
|
-
// if (size > kRead) size = kRead; // for debug
|
|
161
83
|
|
|
162
|
-
|
|
163
|
-
// we need cast (Byte *)dest.
|
|
164
|
-
#ifdef __clang__
|
|
165
|
-
#pragma GCC diagnostic ignored "-Wcast-qual"
|
|
166
|
-
#endif
|
|
167
|
-
*/
|
|
168
|
-
p->result = ISeqInStream_Read(p->stream,
|
|
169
|
-
p->bufBase + (dest - p->bufBase), &size);
|
|
84
|
+
p->result = ISeqInStream_Read(p->stream, dest, &size);
|
|
170
85
|
if (p->result != SZ_OK)
|
|
171
86
|
return;
|
|
172
87
|
if (size == 0)
|
|
@@ -175,60 +90,47 @@ static void MatchFinder_ReadBlock(CMatchFinder *p)
|
|
|
175
90
|
return;
|
|
176
91
|
}
|
|
177
92
|
p->streamPos += (UInt32)size;
|
|
178
|
-
if (
|
|
93
|
+
if (p->streamPos - p->pos > p->keepSizeAfter)
|
|
179
94
|
return;
|
|
180
|
-
/* here and in another (p->keepSizeAfter) checks we keep on 1 byte more than was requested by Create() function
|
|
181
|
-
(GET_AVAIL_BYTES(p) >= p->keepSizeAfter) - minimal required size */
|
|
182
95
|
}
|
|
183
|
-
|
|
184
|
-
// on exit: (p->result != SZ_OK || p->streamEndWasReached || GET_AVAIL_BYTES(p) > p->keepSizeAfter)
|
|
185
96
|
}
|
|
186
97
|
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
Z7_NO_INLINE
|
|
190
98
|
void MatchFinder_MoveBlock(CMatchFinder *p)
|
|
191
99
|
{
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
p->bufBase + (offset & ~((size_t)kBlockMoveAlign - 1)),
|
|
197
|
-
keepBefore + (size_t)GET_AVAIL_BYTES(p));
|
|
100
|
+
memmove(p->bufferBase,
|
|
101
|
+
p->buffer - p->keepSizeBefore,
|
|
102
|
+
(size_t)(p->streamPos - p->pos) + p->keepSizeBefore);
|
|
103
|
+
p->buffer = p->bufferBase + p->keepSizeBefore;
|
|
198
104
|
}
|
|
199
105
|
|
|
200
|
-
/* We call MoveBlock() before ReadBlock().
|
|
201
|
-
So MoveBlock() can be wasteful operation, if the whole input data
|
|
202
|
-
can fit in current block even without calling MoveBlock().
|
|
203
|
-
in important case where (dataSize <= historySize)
|
|
204
|
-
condition (p->blockSize > dataSize + p->keepSizeAfter) is met
|
|
205
|
-
So there is no MoveBlock() in that case case.
|
|
206
|
-
*/
|
|
207
|
-
|
|
208
106
|
int MatchFinder_NeedMove(CMatchFinder *p)
|
|
209
107
|
{
|
|
210
108
|
if (p->directInput)
|
|
211
109
|
return 0;
|
|
212
|
-
if (p->streamEndWasReached
|
|
213
|
-
|
|
214
|
-
return ((size_t)(p->bufBase + p->blockSize - p->buffer) <= p->keepSizeAfter);
|
|
110
|
+
/* if (p->streamEndWasReached) return 0; */
|
|
111
|
+
return ((size_t)(p->bufferBase + p->blockSize - p->buffer) <= p->keepSizeAfter);
|
|
215
112
|
}
|
|
216
113
|
|
|
217
114
|
void MatchFinder_ReadIfRequired(CMatchFinder *p)
|
|
218
115
|
{
|
|
219
|
-
if (p->
|
|
116
|
+
if (p->streamEndWasReached)
|
|
117
|
+
return;
|
|
118
|
+
if (p->keepSizeAfter >= p->streamPos - p->pos)
|
|
220
119
|
MatchFinder_ReadBlock(p);
|
|
221
120
|
}
|
|
222
121
|
|
|
223
|
-
|
|
122
|
+
static void MatchFinder_CheckAndMoveAndRead(CMatchFinder *p)
|
|
123
|
+
{
|
|
124
|
+
if (MatchFinder_NeedMove(p))
|
|
125
|
+
MatchFinder_MoveBlock(p);
|
|
126
|
+
MatchFinder_ReadBlock(p);
|
|
127
|
+
}
|
|
224
128
|
|
|
225
129
|
static void MatchFinder_SetDefaultSettings(CMatchFinder *p)
|
|
226
130
|
{
|
|
227
131
|
p->cutValue = 32;
|
|
228
132
|
p->btMode = 1;
|
|
229
133
|
p->numHashBytes = 4;
|
|
230
|
-
p->numHashBytes_Min = 2;
|
|
231
|
-
p->numHashOutBits = 0;
|
|
232
134
|
p->bigHash = 0;
|
|
233
135
|
}
|
|
234
136
|
|
|
@@ -237,10 +139,8 @@ static void MatchFinder_SetDefaultSettings(CMatchFinder *p)
|
|
|
237
139
|
void MatchFinder_Construct(CMatchFinder *p)
|
|
238
140
|
{
|
|
239
141
|
unsigned i;
|
|
240
|
-
p->
|
|
241
|
-
p->bufBase = NULL;
|
|
142
|
+
p->bufferBase = NULL;
|
|
242
143
|
p->directInput = 0;
|
|
243
|
-
p->stream = NULL;
|
|
244
144
|
p->hash = NULL;
|
|
245
145
|
p->expectedDataSize = (UInt64)(Int64)-1;
|
|
246
146
|
MatchFinder_SetDefaultSettings(p);
|
|
@@ -255,8 +155,6 @@ void MatchFinder_Construct(CMatchFinder *p)
|
|
|
255
155
|
}
|
|
256
156
|
}
|
|
257
157
|
|
|
258
|
-
#undef kCrcPoly
|
|
259
|
-
|
|
260
158
|
static void MatchFinder_FreeThisClassMemory(CMatchFinder *p, ISzAllocPtr alloc)
|
|
261
159
|
{
|
|
262
160
|
ISzAlloc_Free(alloc, p->hash);
|
|
@@ -271,213 +169,87 @@ void MatchFinder_Free(CMatchFinder *p, ISzAllocPtr alloc)
|
|
|
271
169
|
|
|
272
170
|
static CLzRef* AllocRefs(size_t num, ISzAllocPtr alloc)
|
|
273
171
|
{
|
|
274
|
-
|
|
172
|
+
size_t sizeInBytes = (size_t)num * sizeof(CLzRef);
|
|
275
173
|
if (sizeInBytes / sizeof(CLzRef) != num)
|
|
276
174
|
return NULL;
|
|
277
175
|
return (CLzRef *)ISzAlloc_Alloc(alloc, sizeInBytes);
|
|
278
176
|
}
|
|
279
177
|
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
static UInt32 GetBlockSize(CMatchFinder *p, UInt32 historySize)
|
|
178
|
+
int MatchFinder_Create(CMatchFinder *p, UInt32 historySize,
|
|
179
|
+
UInt32 keepAddBufferBefore, UInt32 matchMaxLen, UInt32 keepAddBufferAfter,
|
|
180
|
+
ISzAllocPtr alloc)
|
|
287
181
|
{
|
|
288
|
-
UInt32
|
|
289
|
-
|
|
182
|
+
UInt32 sizeReserv;
|
|
183
|
+
|
|
290
184
|
if (historySize > kMaxHistorySize)
|
|
185
|
+
{
|
|
186
|
+
MatchFinder_Free(p, alloc);
|
|
291
187
|
return 0;
|
|
292
|
-
|
|
293
|
-
// printf("\nhistorySize == 0x%x\n", historySize);
|
|
188
|
+
}
|
|
294
189
|
|
|
295
|
-
|
|
296
|
-
|
|
190
|
+
sizeReserv = historySize >> 1;
|
|
191
|
+
if (historySize >= ((UInt32)3 << 30)) sizeReserv = historySize >> 3;
|
|
192
|
+
else if (historySize >= ((UInt32)2 << 30)) sizeReserv = historySize >> 2;
|
|
297
193
|
|
|
298
|
-
|
|
299
|
-
const UInt32 kBlockSizeMax = (UInt32)0 - (UInt32)kBlockSizeAlign;
|
|
300
|
-
const UInt32 rem = kBlockSizeMax - blockSize;
|
|
301
|
-
const UInt32 reserve = (blockSize >> (blockSize < ((UInt32)1 << 30) ? 1 : 2))
|
|
302
|
-
+ (1 << 12) + kBlockMoveAlign + kBlockSizeAlign; // do not overflow 32-bit here
|
|
303
|
-
if (blockSize >= kBlockSizeMax
|
|
304
|
-
|| rem < kBlockSizeReserveMin) // we reject settings that will be slow
|
|
305
|
-
return 0;
|
|
306
|
-
if (reserve >= rem)
|
|
307
|
-
blockSize = kBlockSizeMax;
|
|
308
|
-
else
|
|
309
|
-
{
|
|
310
|
-
blockSize += reserve;
|
|
311
|
-
blockSize &= ~(UInt32)(kBlockSizeAlign - 1);
|
|
312
|
-
}
|
|
313
|
-
}
|
|
314
|
-
// printf("\n LzFind_blockSize = %x\n", blockSize);
|
|
315
|
-
// printf("\n LzFind_blockSize = %d\n", blockSize >> 20);
|
|
316
|
-
return blockSize;
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
// input is historySize
|
|
321
|
-
static UInt32 MatchFinder_GetHashMask2(CMatchFinder *p, UInt32 hs)
|
|
322
|
-
{
|
|
323
|
-
if (p->numHashBytes == 2)
|
|
324
|
-
return (1 << 16) - 1;
|
|
325
|
-
if (hs != 0)
|
|
326
|
-
hs--;
|
|
327
|
-
hs |= (hs >> 1);
|
|
328
|
-
hs |= (hs >> 2);
|
|
329
|
-
hs |= (hs >> 4);
|
|
330
|
-
hs |= (hs >> 8);
|
|
331
|
-
// we propagated 16 bits in (hs). Low 16 bits must be set later
|
|
332
|
-
if (hs >= (1 << 24))
|
|
333
|
-
{
|
|
334
|
-
if (p->numHashBytes == 3)
|
|
335
|
-
hs = (1 << 24) - 1;
|
|
336
|
-
/* if (bigHash) mode, GetHeads4b() in LzFindMt.c needs (hs >= ((1 << 24) - 1))) */
|
|
337
|
-
}
|
|
338
|
-
// (hash_size >= (1 << 16)) : Required for (numHashBytes > 2)
|
|
339
|
-
hs |= (1 << 16) - 1; /* don't change it! */
|
|
340
|
-
// bt5: we adjust the size with recommended minimum size
|
|
341
|
-
if (p->numHashBytes >= 5)
|
|
342
|
-
hs |= (256 << kLzHash_CrcShift_2) - 1;
|
|
343
|
-
return hs;
|
|
344
|
-
}
|
|
345
|
-
|
|
346
|
-
// input is historySize
|
|
347
|
-
static UInt32 MatchFinder_GetHashMask(CMatchFinder *p, UInt32 hs)
|
|
348
|
-
{
|
|
349
|
-
if (p->numHashBytes == 2)
|
|
350
|
-
return (1 << 16) - 1;
|
|
351
|
-
if (hs != 0)
|
|
352
|
-
hs--;
|
|
353
|
-
hs |= (hs >> 1);
|
|
354
|
-
hs |= (hs >> 2);
|
|
355
|
-
hs |= (hs >> 4);
|
|
356
|
-
hs |= (hs >> 8);
|
|
357
|
-
// we propagated 16 bits in (hs). Low 16 bits must be set later
|
|
358
|
-
hs >>= 1;
|
|
359
|
-
if (hs >= (1 << 24))
|
|
360
|
-
{
|
|
361
|
-
if (p->numHashBytes == 3)
|
|
362
|
-
hs = (1 << 24) - 1;
|
|
363
|
-
else
|
|
364
|
-
hs >>= 1;
|
|
365
|
-
/* if (bigHash) mode, GetHeads4b() in LzFindMt.c needs (hs >= ((1 << 24) - 1))) */
|
|
366
|
-
}
|
|
367
|
-
// (hash_size >= (1 << 16)) : Required for (numHashBytes > 2)
|
|
368
|
-
hs |= (1 << 16) - 1; /* don't change it! */
|
|
369
|
-
// bt5: we adjust the size with recommended minimum size
|
|
370
|
-
if (p->numHashBytes >= 5)
|
|
371
|
-
hs |= (256 << kLzHash_CrcShift_2) - 1;
|
|
372
|
-
return hs;
|
|
373
|
-
}
|
|
374
|
-
|
|
194
|
+
sizeReserv += (keepAddBufferBefore + matchMaxLen + keepAddBufferAfter) / 2 + (1 << 19);
|
|
375
195
|
|
|
376
|
-
int MatchFinder_Create(CMatchFinder *p, UInt32 historySize,
|
|
377
|
-
UInt32 keepAddBufferBefore, UInt32 matchMaxLen, UInt32 keepAddBufferAfter,
|
|
378
|
-
ISzAllocPtr alloc)
|
|
379
|
-
{
|
|
380
|
-
/* we need one additional byte in (p->keepSizeBefore),
|
|
381
|
-
since we use MoveBlock() after (p->pos++) and before dictionary using */
|
|
382
|
-
// keepAddBufferBefore = (UInt32)0xFFFFFFFF - (1 << 22); // for debug
|
|
383
196
|
p->keepSizeBefore = historySize + keepAddBufferBefore + 1;
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
/* we need
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
// keepAddBufferAfter -= 2; // for debug
|
|
390
|
-
p->keepSizeAfter = keepAddBufferAfter;
|
|
391
|
-
|
|
392
|
-
if (p->directInput)
|
|
393
|
-
p->blockSize = 0;
|
|
394
|
-
if (p->directInput || LzInWindow_Create2(p, GetBlockSize(p, historySize), alloc))
|
|
197
|
+
p->keepSizeAfter = matchMaxLen + keepAddBufferAfter;
|
|
198
|
+
|
|
199
|
+
/* we need one additional byte, since we use MoveBlock after pos++ and before dictionary using */
|
|
200
|
+
|
|
201
|
+
if (LzInWindow_Create(p, sizeReserv, alloc))
|
|
395
202
|
{
|
|
396
|
-
|
|
203
|
+
UInt32 newCyclicBufferSize = historySize + 1;
|
|
204
|
+
UInt32 hs;
|
|
205
|
+
p->matchMaxLen = matchMaxLen;
|
|
397
206
|
{
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
if (p->numHashOutBits != 0)
|
|
402
|
-
{
|
|
403
|
-
unsigned numBits = p->numHashOutBits;
|
|
404
|
-
const unsigned nbMax =
|
|
405
|
-
(p->numHashBytes == 2 ? 16 :
|
|
406
|
-
(p->numHashBytes == 3 ? 24 : 32));
|
|
407
|
-
if (numBits >= nbMax)
|
|
408
|
-
numBits = nbMax;
|
|
409
|
-
if (numBits >= 32)
|
|
410
|
-
hs = (UInt32)0 - 1;
|
|
411
|
-
else
|
|
412
|
-
hs = ((UInt32)1 << numBits) - 1;
|
|
413
|
-
// (hash_size >= (1 << 16)) : Required for (numHashBytes > 2)
|
|
414
|
-
hs |= (1 << 16) - 1; /* don't change it! */
|
|
415
|
-
if (p->numHashBytes >= 5)
|
|
416
|
-
hs |= (256 << kLzHash_CrcShift_2) - 1;
|
|
417
|
-
{
|
|
418
|
-
const UInt32 hs2 = MatchFinder_GetHashMask2(p, historySize);
|
|
419
|
-
if (hs >= hs2)
|
|
420
|
-
hs = hs2;
|
|
421
|
-
}
|
|
422
|
-
hsCur = hs;
|
|
423
|
-
if (p->expectedDataSize < historySize)
|
|
424
|
-
{
|
|
425
|
-
const UInt32 hs2 = MatchFinder_GetHashMask2(p, (UInt32)p->expectedDataSize);
|
|
426
|
-
if (hsCur >= hs2)
|
|
427
|
-
hsCur = hs2;
|
|
428
|
-
}
|
|
429
|
-
}
|
|
207
|
+
p->fixedHashSize = 0;
|
|
208
|
+
if (p->numHashBytes == 2)
|
|
209
|
+
hs = (1 << 16) - 1;
|
|
430
210
|
else
|
|
431
211
|
{
|
|
432
|
-
hs =
|
|
433
|
-
|
|
434
|
-
|
|
212
|
+
hs = historySize;
|
|
213
|
+
if (hs > p->expectedDataSize)
|
|
214
|
+
hs = (UInt32)p->expectedDataSize;
|
|
215
|
+
if (hs != 0)
|
|
216
|
+
hs--;
|
|
217
|
+
hs |= (hs >> 1);
|
|
218
|
+
hs |= (hs >> 2);
|
|
219
|
+
hs |= (hs >> 4);
|
|
220
|
+
hs |= (hs >> 8);
|
|
221
|
+
hs >>= 1;
|
|
222
|
+
hs |= 0xFFFF; /* don't change it! It's required for Deflate */
|
|
223
|
+
if (hs > (1 << 24))
|
|
435
224
|
{
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
225
|
+
if (p->numHashBytes == 3)
|
|
226
|
+
hs = (1 << 24) - 1;
|
|
227
|
+
else
|
|
228
|
+
hs >>= 1;
|
|
229
|
+
/* if (bigHash) mode, GetHeads4b() in LzFindMt.c needs (hs >= ((1 << 24) - 1))) */
|
|
439
230
|
}
|
|
440
231
|
}
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
return 0;
|
|
448
|
-
{
|
|
449
|
-
UInt32 fixedHashSize = 0;
|
|
450
|
-
if (p->numHashBytes > 2 && p->numHashBytes_Min <= 2) fixedHashSize += kHash2Size;
|
|
451
|
-
if (p->numHashBytes > 3 && p->numHashBytes_Min <= 3) fixedHashSize += kHash3Size;
|
|
452
|
-
// if (p->numHashBytes > 4) p->fixedHashSize += hs4; // kHash4Size;
|
|
453
|
-
hashSizeSum += fixedHashSize;
|
|
454
|
-
p->fixedHashSize = fixedHashSize;
|
|
455
|
-
}
|
|
232
|
+
p->hashMask = hs;
|
|
233
|
+
hs++;
|
|
234
|
+
if (p->numHashBytes > 2) p->fixedHashSize += kHash2Size;
|
|
235
|
+
if (p->numHashBytes > 3) p->fixedHashSize += kHash3Size;
|
|
236
|
+
if (p->numHashBytes > 4) p->fixedHashSize += kHash4Size;
|
|
237
|
+
hs += p->fixedHashSize;
|
|
456
238
|
}
|
|
457
239
|
|
|
458
|
-
p->matchMaxLen = matchMaxLen;
|
|
459
|
-
|
|
460
240
|
{
|
|
461
241
|
size_t newSize;
|
|
462
242
|
size_t numSons;
|
|
463
|
-
const UInt32 newCyclicBufferSize = historySize + 1; // do not change it
|
|
464
243
|
p->historySize = historySize;
|
|
465
|
-
p->
|
|
244
|
+
p->hashSizeSum = hs;
|
|
245
|
+
p->cyclicBufferSize = newCyclicBufferSize;
|
|
466
246
|
|
|
467
247
|
numSons = newCyclicBufferSize;
|
|
468
248
|
if (p->btMode)
|
|
469
249
|
numSons <<= 1;
|
|
470
|
-
newSize =
|
|
471
|
-
|
|
472
|
-
if (numSons < newCyclicBufferSize || newSize < numSons)
|
|
473
|
-
return 0;
|
|
474
|
-
|
|
475
|
-
// aligned size is not required here, but it can be better for some loops
|
|
476
|
-
#define NUM_REFS_ALIGN_MASK 0xF
|
|
477
|
-
newSize = (newSize + NUM_REFS_ALIGN_MASK) & ~(size_t)NUM_REFS_ALIGN_MASK;
|
|
250
|
+
newSize = hs + numSons;
|
|
478
251
|
|
|
479
|
-
|
|
480
|
-
if (p->hash && p->numRefs >= newSize)
|
|
252
|
+
if (p->hash && p->numRefs == newSize)
|
|
481
253
|
return 1;
|
|
482
254
|
|
|
483
255
|
MatchFinder_FreeThisClassMemory(p, alloc);
|
|
@@ -486,7 +258,7 @@ int MatchFinder_Create(CMatchFinder *p, UInt32 historySize,
|
|
|
486
258
|
|
|
487
259
|
if (p->hash)
|
|
488
260
|
{
|
|
489
|
-
p->son = p->hash + hashSizeSum;
|
|
261
|
+
p->son = p->hash + p->hashSizeSum;
|
|
490
262
|
return 1;
|
|
491
263
|
}
|
|
492
264
|
}
|
|
@@ -496,43 +268,33 @@ int MatchFinder_Create(CMatchFinder *p, UInt32 historySize,
|
|
|
496
268
|
return 0;
|
|
497
269
|
}
|
|
498
270
|
|
|
499
|
-
|
|
500
271
|
static void MatchFinder_SetLimits(CMatchFinder *p)
|
|
501
272
|
{
|
|
502
|
-
UInt32
|
|
503
|
-
UInt32
|
|
504
|
-
if (n == 0)
|
|
505
|
-
n = (UInt32)(Int32)-1; // we allow (pos == 0) at start even with (kMaxValForNormalize == 0)
|
|
273
|
+
UInt32 limit = kMaxValForNormalize - p->pos;
|
|
274
|
+
UInt32 limit2 = p->cyclicBufferSize - p->cyclicBufferPos;
|
|
506
275
|
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
276
|
+
if (limit2 < limit)
|
|
277
|
+
limit = limit2;
|
|
278
|
+
limit2 = p->streamPos - p->pos;
|
|
279
|
+
|
|
280
|
+
if (limit2 <= p->keepSizeAfter)
|
|
512
281
|
{
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
if (k > ksa)
|
|
516
|
-
k -= ksa; // we must limit exactly to keepSizeAfter for ReadBlock
|
|
517
|
-
else if (k >= mm)
|
|
518
|
-
{
|
|
519
|
-
// the limitation for (p->lenLimit) update
|
|
520
|
-
k -= mm; // optimization : to reduce the number of checks
|
|
521
|
-
k++;
|
|
522
|
-
// k = 1; // non-optimized version : for debug
|
|
523
|
-
}
|
|
524
|
-
else
|
|
525
|
-
{
|
|
526
|
-
mm = k;
|
|
527
|
-
if (k != 0)
|
|
528
|
-
k = 1;
|
|
529
|
-
}
|
|
530
|
-
p->lenLimit = mm;
|
|
282
|
+
if (limit2 > 0)
|
|
283
|
+
limit2 = 1;
|
|
531
284
|
}
|
|
532
|
-
|
|
533
|
-
|
|
285
|
+
else
|
|
286
|
+
limit2 -= p->keepSizeAfter;
|
|
287
|
+
|
|
288
|
+
if (limit2 < limit)
|
|
289
|
+
limit = limit2;
|
|
534
290
|
|
|
535
|
-
|
|
291
|
+
{
|
|
292
|
+
UInt32 lenLimit = p->streamPos - p->pos;
|
|
293
|
+
if (lenLimit > p->matchMaxLen)
|
|
294
|
+
lenLimit = p->matchMaxLen;
|
|
295
|
+
p->lenLimit = lenLimit;
|
|
296
|
+
}
|
|
297
|
+
p->posLimit = p->pos + limit;
|
|
536
298
|
}
|
|
537
299
|
|
|
538
300
|
|
|
@@ -540,7 +302,7 @@ void MatchFinder_Init_LowHash(CMatchFinder *p)
|
|
|
540
302
|
{
|
|
541
303
|
size_t i;
|
|
542
304
|
CLzRef *items = p->hash;
|
|
543
|
-
|
|
305
|
+
size_t numItems = p->fixedHashSize;
|
|
544
306
|
for (i = 0; i < numItems; i++)
|
|
545
307
|
items[i] = kEmptyHashValue;
|
|
546
308
|
}
|
|
@@ -550,325 +312,72 @@ void MatchFinder_Init_HighHash(CMatchFinder *p)
|
|
|
550
312
|
{
|
|
551
313
|
size_t i;
|
|
552
314
|
CLzRef *items = p->hash + p->fixedHashSize;
|
|
553
|
-
|
|
315
|
+
size_t numItems = (size_t)p->hashMask + 1;
|
|
554
316
|
for (i = 0; i < numItems; i++)
|
|
555
317
|
items[i] = kEmptyHashValue;
|
|
556
318
|
}
|
|
557
319
|
|
|
558
320
|
|
|
559
|
-
void
|
|
321
|
+
void MatchFinder_Init_3(CMatchFinder *p, int readData)
|
|
560
322
|
{
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
the code in CMatchFinderMt expects (pos = 1) */
|
|
566
|
-
p->pos =
|
|
567
|
-
p->streamPos =
|
|
568
|
-
1; // it's smallest optimal value. do not change it
|
|
569
|
-
// 0; // for debug
|
|
570
|
-
}
|
|
323
|
+
p->cyclicBufferPos = 0;
|
|
324
|
+
p->buffer = p->bufferBase;
|
|
325
|
+
p->pos =
|
|
326
|
+
p->streamPos = p->cyclicBufferSize;
|
|
571
327
|
p->result = SZ_OK;
|
|
572
328
|
p->streamEndWasReached = 0;
|
|
329
|
+
|
|
330
|
+
if (readData)
|
|
331
|
+
MatchFinder_ReadBlock(p);
|
|
332
|
+
|
|
333
|
+
MatchFinder_SetLimits(p);
|
|
573
334
|
}
|
|
574
335
|
|
|
575
336
|
|
|
576
|
-
|
|
577
|
-
#define CYC_TO_POS_OFFSET 0
|
|
578
|
-
// #define CYC_TO_POS_OFFSET 1 // for debug
|
|
579
|
-
|
|
580
|
-
void MatchFinder_Init(void *_p)
|
|
337
|
+
void MatchFinder_Init(CMatchFinder *p)
|
|
581
338
|
{
|
|
582
|
-
CMatchFinder *p = (CMatchFinder *)_p;
|
|
583
339
|
MatchFinder_Init_HighHash(p);
|
|
584
340
|
MatchFinder_Init_LowHash(p);
|
|
585
|
-
|
|
586
|
-
// if (readData)
|
|
587
|
-
MatchFinder_ReadBlock(p);
|
|
588
|
-
|
|
589
|
-
/* if we init (cyclicBufferPos = pos), then we can use one variable
|
|
590
|
-
instead of both (cyclicBufferPos) and (pos) : only before (cyclicBufferPos) wrapping */
|
|
591
|
-
p->cyclicBufferPos = (p->pos - CYC_TO_POS_OFFSET); // init with relation to (pos)
|
|
592
|
-
// p->cyclicBufferPos = 0; // smallest value
|
|
593
|
-
// p->son[0] = p->son[1] = 0; // unused: we can init skipped record for speculated accesses.
|
|
594
|
-
MatchFinder_SetLimits(p);
|
|
595
|
-
}
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
#ifdef MY_CPU_X86_OR_AMD64
|
|
600
|
-
#if defined(__clang__) && (__clang_major__ >= 4) \
|
|
601
|
-
|| defined(Z7_GCC_VERSION) && (Z7_GCC_VERSION >= 40900)
|
|
602
|
-
// || defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 1900)
|
|
603
|
-
|
|
604
|
-
#define USE_LZFIND_SATUR_SUB_128
|
|
605
|
-
#define USE_LZFIND_SATUR_SUB_256
|
|
606
|
-
#define LZFIND_ATTRIB_SSE41 __attribute__((__target__("sse4.1")))
|
|
607
|
-
#define LZFIND_ATTRIB_AVX2 __attribute__((__target__("avx2")))
|
|
608
|
-
#elif defined(_MSC_VER)
|
|
609
|
-
#if (_MSC_VER >= 1600)
|
|
610
|
-
#define USE_LZFIND_SATUR_SUB_128
|
|
611
|
-
#endif
|
|
612
|
-
#if (_MSC_VER >= 1900)
|
|
613
|
-
#define USE_LZFIND_SATUR_SUB_256
|
|
614
|
-
#endif
|
|
615
|
-
#endif
|
|
616
|
-
|
|
617
|
-
#elif defined(MY_CPU_ARM64) \
|
|
618
|
-
/* || (defined(__ARM_ARCH) && (__ARM_ARCH >= 7)) */
|
|
619
|
-
|
|
620
|
-
#if defined(Z7_CLANG_VERSION) && (Z7_CLANG_VERSION >= 30800) \
|
|
621
|
-
|| defined(__GNUC__) && (__GNUC__ >= 6)
|
|
622
|
-
#define USE_LZFIND_SATUR_SUB_128
|
|
623
|
-
#ifdef MY_CPU_ARM64
|
|
624
|
-
// #define LZFIND_ATTRIB_SSE41 __attribute__((__target__("")))
|
|
625
|
-
#else
|
|
626
|
-
#define LZFIND_ATTRIB_SSE41 __attribute__((__target__("fpu=neon")))
|
|
627
|
-
#endif
|
|
628
|
-
|
|
629
|
-
#elif defined(_MSC_VER)
|
|
630
|
-
#if (_MSC_VER >= 1910)
|
|
631
|
-
#define USE_LZFIND_SATUR_SUB_128
|
|
632
|
-
#endif
|
|
633
|
-
#endif
|
|
634
|
-
|
|
635
|
-
#if defined(Z7_MSC_VER_ORIGINAL) && defined(MY_CPU_ARM64)
|
|
636
|
-
#include <arm64_neon.h>
|
|
637
|
-
#else
|
|
638
|
-
#include <arm_neon.h>
|
|
639
|
-
#endif
|
|
640
|
-
|
|
641
|
-
#endif
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
#ifdef USE_LZFIND_SATUR_SUB_128
|
|
645
|
-
|
|
646
|
-
// #define Z7_SHOW_HW_STATUS
|
|
647
|
-
|
|
648
|
-
#ifdef Z7_SHOW_HW_STATUS
|
|
649
|
-
#include <stdio.h>
|
|
650
|
-
#define PRF(x) x
|
|
651
|
-
PRF(;)
|
|
652
|
-
#else
|
|
653
|
-
#define PRF(x)
|
|
654
|
-
#endif
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
#ifdef MY_CPU_ARM_OR_ARM64
|
|
658
|
-
|
|
659
|
-
#ifdef MY_CPU_ARM64
|
|
660
|
-
// #define FORCE_LZFIND_SATUR_SUB_128
|
|
661
|
-
#endif
|
|
662
|
-
typedef uint32x4_t LzFind_v128;
|
|
663
|
-
#define SASUB_128_V(v, s) \
|
|
664
|
-
vsubq_u32(vmaxq_u32(v, s), s)
|
|
665
|
-
|
|
666
|
-
#else // MY_CPU_ARM_OR_ARM64
|
|
667
|
-
|
|
668
|
-
#include <smmintrin.h> // sse4.1
|
|
669
|
-
|
|
670
|
-
typedef __m128i LzFind_v128;
|
|
671
|
-
// SSE 4.1
|
|
672
|
-
#define SASUB_128_V(v, s) \
|
|
673
|
-
_mm_sub_epi32(_mm_max_epu32(v, s), s)
|
|
674
|
-
|
|
675
|
-
#endif // MY_CPU_ARM_OR_ARM64
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
#define SASUB_128(i) \
|
|
679
|
-
*( LzFind_v128 *)( void *)(items + (i) * 4) = SASUB_128_V( \
|
|
680
|
-
*(const LzFind_v128 *)(const void *)(items + (i) * 4), sub2);
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
Z7_NO_INLINE
|
|
684
|
-
static
|
|
685
|
-
#ifdef LZFIND_ATTRIB_SSE41
|
|
686
|
-
LZFIND_ATTRIB_SSE41
|
|
687
|
-
#endif
|
|
688
|
-
void
|
|
689
|
-
Z7_FASTCALL
|
|
690
|
-
LzFind_SaturSub_128(UInt32 subValue, CLzRef *items, const CLzRef *lim)
|
|
691
|
-
{
|
|
692
|
-
const LzFind_v128 sub2 =
|
|
693
|
-
#ifdef MY_CPU_ARM_OR_ARM64
|
|
694
|
-
vdupq_n_u32(subValue);
|
|
695
|
-
#else
|
|
696
|
-
_mm_set_epi32((Int32)subValue, (Int32)subValue, (Int32)subValue, (Int32)subValue);
|
|
697
|
-
#endif
|
|
698
|
-
Z7_PRAGMA_OPT_DISABLE_LOOP_UNROLL_VECTORIZE
|
|
699
|
-
do
|
|
700
|
-
{
|
|
701
|
-
SASUB_128(0) SASUB_128(1) items += 2 * 4;
|
|
702
|
-
SASUB_128(0) SASUB_128(1) items += 2 * 4;
|
|
703
|
-
}
|
|
704
|
-
while (items != lim);
|
|
341
|
+
MatchFinder_Init_3(p, True);
|
|
705
342
|
}
|
|
706
343
|
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
#ifdef USE_LZFIND_SATUR_SUB_256
|
|
710
|
-
|
|
711
|
-
#include <immintrin.h> // avx
|
|
712
|
-
/*
|
|
713
|
-
clang :immintrin.h uses
|
|
714
|
-
#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \
|
|
715
|
-
defined(__AVX2__)
|
|
716
|
-
#include <avx2intrin.h>
|
|
717
|
-
#endif
|
|
718
|
-
so we need <avxintrin.h> for clang-cl */
|
|
719
|
-
|
|
720
|
-
#if defined(__clang__)
|
|
721
|
-
#include <avxintrin.h>
|
|
722
|
-
#include <avx2intrin.h>
|
|
723
|
-
#endif
|
|
724
|
-
|
|
725
|
-
// AVX2:
|
|
726
|
-
#define SASUB_256(i) \
|
|
727
|
-
*( __m256i *)( void *)(items + (i) * 8) = \
|
|
728
|
-
_mm256_sub_epi32(_mm256_max_epu32( \
|
|
729
|
-
*(const __m256i *)(const void *)(items + (i) * 8), sub2), sub2);
|
|
730
|
-
|
|
731
|
-
Z7_NO_INLINE
|
|
732
|
-
static
|
|
733
|
-
#ifdef LZFIND_ATTRIB_AVX2
|
|
734
|
-
LZFIND_ATTRIB_AVX2
|
|
735
|
-
#endif
|
|
736
|
-
void
|
|
737
|
-
Z7_FASTCALL
|
|
738
|
-
LzFind_SaturSub_256(UInt32 subValue, CLzRef *items, const CLzRef *lim)
|
|
344
|
+
|
|
345
|
+
static UInt32 MatchFinder_GetSubValue(CMatchFinder *p)
|
|
739
346
|
{
|
|
740
|
-
|
|
741
|
-
(Int32)subValue, (Int32)subValue, (Int32)subValue, (Int32)subValue,
|
|
742
|
-
(Int32)subValue, (Int32)subValue, (Int32)subValue, (Int32)subValue);
|
|
743
|
-
Z7_PRAGMA_OPT_DISABLE_LOOP_UNROLL_VECTORIZE
|
|
744
|
-
do
|
|
745
|
-
{
|
|
746
|
-
SASUB_256(0) SASUB_256(1) items += 2 * 8;
|
|
747
|
-
SASUB_256(0) SASUB_256(1) items += 2 * 8;
|
|
748
|
-
}
|
|
749
|
-
while (items != lim);
|
|
347
|
+
return (p->pos - p->historySize - 1) & kNormalizeMask;
|
|
750
348
|
}
|
|
751
|
-
#endif // USE_LZFIND_SATUR_SUB_256
|
|
752
|
-
|
|
753
|
-
#ifndef FORCE_LZFIND_SATUR_SUB_128
|
|
754
|
-
typedef void (Z7_FASTCALL *LZFIND_SATUR_SUB_CODE_FUNC)(
|
|
755
|
-
UInt32 subValue, CLzRef *items, const CLzRef *lim);
|
|
756
|
-
static LZFIND_SATUR_SUB_CODE_FUNC g_LzFind_SaturSub;
|
|
757
|
-
#endif // FORCE_LZFIND_SATUR_SUB_128
|
|
758
|
-
|
|
759
|
-
#endif // USE_LZFIND_SATUR_SUB_128
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
// kEmptyHashValue must be zero
|
|
763
|
-
// #define SASUB_32(i) { UInt32 v = items[i]; UInt32 m = v - subValue; if (v < subValue) m = kEmptyHashValue; items[i] = m; }
|
|
764
|
-
#define SASUB_32(i) { UInt32 v = items[i]; if (v < subValue) v = subValue; items[i] = v - subValue; }
|
|
765
349
|
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
#define DEFAULT_SaturSub LzFind_SaturSub_128
|
|
769
|
-
|
|
770
|
-
#else
|
|
771
|
-
|
|
772
|
-
#define DEFAULT_SaturSub LzFind_SaturSub_32
|
|
773
|
-
|
|
774
|
-
Z7_NO_INLINE
|
|
775
|
-
static
|
|
776
|
-
void
|
|
777
|
-
Z7_FASTCALL
|
|
778
|
-
LzFind_SaturSub_32(UInt32 subValue, CLzRef *items, const CLzRef *lim)
|
|
350
|
+
void MatchFinder_Normalize3(UInt32 subValue, CLzRef *items, size_t numItems)
|
|
779
351
|
{
|
|
780
|
-
|
|
781
|
-
|
|
352
|
+
size_t i;
|
|
353
|
+
for (i = 0; i < numItems; i++)
|
|
782
354
|
{
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
355
|
+
UInt32 value = items[i];
|
|
356
|
+
if (value <= subValue)
|
|
357
|
+
value = kEmptyHashValue;
|
|
358
|
+
else
|
|
359
|
+
value -= subValue;
|
|
360
|
+
items[i] = value;
|
|
787
361
|
}
|
|
788
|
-
while (items != lim);
|
|
789
362
|
}
|
|
790
363
|
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
Z7_NO_INLINE
|
|
795
|
-
void MatchFinder_Normalize3(UInt32 subValue, CLzRef *items, size_t numItems)
|
|
364
|
+
static void MatchFinder_Normalize(CMatchFinder *p)
|
|
796
365
|
{
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
{
|
|
801
|
-
SASUB_32(0)
|
|
802
|
-
items++;
|
|
803
|
-
}
|
|
804
|
-
{
|
|
805
|
-
const size_t k_Align_Mask = (LZFIND_NORM_ALIGN_BLOCK_SIZE / 4 - 1);
|
|
806
|
-
CLzRef *lim = items + (numItems & ~(size_t)k_Align_Mask);
|
|
807
|
-
numItems &= k_Align_Mask;
|
|
808
|
-
if (items != lim)
|
|
809
|
-
{
|
|
810
|
-
#if defined(USE_LZFIND_SATUR_SUB_128) && !defined(FORCE_LZFIND_SATUR_SUB_128)
|
|
811
|
-
if (g_LzFind_SaturSub)
|
|
812
|
-
g_LzFind_SaturSub(subValue, items, lim);
|
|
813
|
-
else
|
|
814
|
-
#endif
|
|
815
|
-
DEFAULT_SaturSub(subValue, items, lim);
|
|
816
|
-
}
|
|
817
|
-
items = lim;
|
|
818
|
-
}
|
|
819
|
-
Z7_PRAGMA_OPT_DISABLE_LOOP_UNROLL_VECTORIZE
|
|
820
|
-
for (; numItems != 0; numItems--)
|
|
821
|
-
{
|
|
822
|
-
SASUB_32(0)
|
|
823
|
-
items++;
|
|
824
|
-
}
|
|
366
|
+
UInt32 subValue = MatchFinder_GetSubValue(p);
|
|
367
|
+
MatchFinder_Normalize3(subValue, p->hash, p->numRefs);
|
|
368
|
+
MatchFinder_ReduceOffsets(p, subValue);
|
|
825
369
|
}
|
|
826
370
|
|
|
827
371
|
|
|
828
|
-
|
|
829
|
-
// call MatchFinder_CheckLimits() only after (p->pos++) update
|
|
830
|
-
|
|
831
|
-
Z7_NO_INLINE
|
|
372
|
+
MY_NO_INLINE
|
|
832
373
|
static void MatchFinder_CheckLimits(CMatchFinder *p)
|
|
833
374
|
{
|
|
834
|
-
if (// !p->streamEndWasReached && p->result == SZ_OK &&
|
|
835
|
-
p->keepSizeAfter == GET_AVAIL_BYTES(p))
|
|
836
|
-
{
|
|
837
|
-
// we try to read only in exact state (p->keepSizeAfter == GET_AVAIL_BYTES(p))
|
|
838
|
-
if (MatchFinder_NeedMove(p))
|
|
839
|
-
MatchFinder_MoveBlock(p);
|
|
840
|
-
MatchFinder_ReadBlock(p);
|
|
841
|
-
}
|
|
842
|
-
|
|
843
375
|
if (p->pos == kMaxValForNormalize)
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
if (data_size == 4 GiB), we don't call wastfull normalization,
|
|
848
|
-
but (pos) will be wrapped over Zero (0) in that case.
|
|
849
|
-
And we cannot resume later to normal operation
|
|
850
|
-
*/
|
|
851
|
-
{
|
|
852
|
-
// MatchFinder_Normalize(p);
|
|
853
|
-
/* after normalization we need (p->pos >= p->historySize + 1); */
|
|
854
|
-
/* we can reduce subValue to aligned value, if want to keep alignment
|
|
855
|
-
of (p->pos) and (p->buffer) for speculated accesses. */
|
|
856
|
-
const UInt32 subValue = (p->pos - p->historySize - 1) /* & ~(UInt32)(kNormalizeAlign - 1) */;
|
|
857
|
-
// const UInt32 subValue = (1 << 15); // for debug
|
|
858
|
-
// printf("\nMatchFinder_Normalize() subValue == 0x%x\n", subValue);
|
|
859
|
-
MatchFinder_REDUCE_OFFSETS(p, subValue)
|
|
860
|
-
MatchFinder_Normalize3(subValue, p->hash, (size_t)p->hashMask + 1 + p->fixedHashSize);
|
|
861
|
-
{
|
|
862
|
-
size_t numSonRefs = p->cyclicBufferSize;
|
|
863
|
-
if (p->btMode)
|
|
864
|
-
numSonRefs <<= 1;
|
|
865
|
-
MatchFinder_Normalize3(subValue, p->son, numSonRefs);
|
|
866
|
-
}
|
|
867
|
-
}
|
|
868
|
-
|
|
376
|
+
MatchFinder_Normalize(p);
|
|
377
|
+
if (!p->streamEndWasReached && p->keepSizeAfter == p->streamPos - p->pos)
|
|
378
|
+
MatchFinder_CheckAndMoveAndRead(p);
|
|
869
379
|
if (p->cyclicBufferPos == p->cyclicBufferSize)
|
|
870
380
|
p->cyclicBufferPos = 0;
|
|
871
|
-
|
|
872
381
|
MatchFinder_SetLimits(p);
|
|
873
382
|
}
|
|
874
383
|
|
|
@@ -876,10 +385,10 @@ static void MatchFinder_CheckLimits(CMatchFinder *p)
|
|
|
876
385
|
/*
|
|
877
386
|
(lenLimit > maxLen)
|
|
878
387
|
*/
|
|
879
|
-
|
|
880
|
-
static UInt32 * Hc_GetMatchesSpec(
|
|
881
|
-
|
|
882
|
-
UInt32 *
|
|
388
|
+
MY_FORCE_INLINE
|
|
389
|
+
static UInt32 * Hc_GetMatchesSpec(unsigned lenLimit, UInt32 curMatch, UInt32 pos, const Byte *cur, CLzRef *son,
|
|
390
|
+
UInt32 _cyclicBufferPos, UInt32 _cyclicBufferSize, UInt32 cutValue,
|
|
391
|
+
UInt32 *distances, unsigned maxLen)
|
|
883
392
|
{
|
|
884
393
|
/*
|
|
885
394
|
son[_cyclicBufferPos] = curMatch;
|
|
@@ -887,10 +396,10 @@ static UInt32 * Hc_GetMatchesSpec(size_t lenLimit, UInt32 curMatch, UInt32 pos,
|
|
|
887
396
|
{
|
|
888
397
|
UInt32 delta = pos - curMatch;
|
|
889
398
|
if (cutValue-- == 0 || delta >= _cyclicBufferSize)
|
|
890
|
-
return
|
|
399
|
+
return distances;
|
|
891
400
|
{
|
|
892
401
|
const Byte *pb = cur - delta;
|
|
893
|
-
curMatch = son[_cyclicBufferPos - delta + (
|
|
402
|
+
curMatch = son[_cyclicBufferPos - delta + ((delta > _cyclicBufferPos) ? _cyclicBufferSize : 0)];
|
|
894
403
|
if (pb[maxLen] == cur[maxLen] && *pb == *cur)
|
|
895
404
|
{
|
|
896
405
|
UInt32 len = 0;
|
|
@@ -900,10 +409,10 @@ static UInt32 * Hc_GetMatchesSpec(size_t lenLimit, UInt32 curMatch, UInt32 pos,
|
|
|
900
409
|
if (maxLen < len)
|
|
901
410
|
{
|
|
902
411
|
maxLen = len;
|
|
903
|
-
*
|
|
904
|
-
*
|
|
412
|
+
*distances++ = len;
|
|
413
|
+
*distances++ = delta - 1;
|
|
905
414
|
if (len == lenLimit)
|
|
906
|
-
return
|
|
415
|
+
return distances;
|
|
907
416
|
}
|
|
908
417
|
}
|
|
909
418
|
}
|
|
@@ -912,41 +421,35 @@ static UInt32 * Hc_GetMatchesSpec(size_t lenLimit, UInt32 curMatch, UInt32 pos,
|
|
|
912
421
|
|
|
913
422
|
const Byte *lim = cur + lenLimit;
|
|
914
423
|
son[_cyclicBufferPos] = curMatch;
|
|
915
|
-
|
|
916
424
|
do
|
|
917
425
|
{
|
|
918
|
-
UInt32 delta;
|
|
919
|
-
|
|
920
|
-
if (curMatch == 0)
|
|
921
|
-
break;
|
|
922
|
-
// if (curMatch2 >= curMatch) return NULL;
|
|
923
|
-
delta = pos - curMatch;
|
|
426
|
+
UInt32 delta = pos - curMatch;
|
|
924
427
|
if (delta >= _cyclicBufferSize)
|
|
925
428
|
break;
|
|
926
429
|
{
|
|
927
430
|
ptrdiff_t diff;
|
|
928
|
-
curMatch = son[_cyclicBufferPos - delta + (
|
|
929
|
-
diff = (ptrdiff_t)0 -
|
|
930
|
-
if (cur[maxLen] == cur[
|
|
431
|
+
curMatch = son[_cyclicBufferPos - delta + ((delta > _cyclicBufferPos) ? _cyclicBufferSize : 0)];
|
|
432
|
+
diff = (ptrdiff_t)0 - delta;
|
|
433
|
+
if (cur[maxLen] == cur[maxLen + diff])
|
|
931
434
|
{
|
|
932
435
|
const Byte *c = cur;
|
|
933
436
|
while (*c == c[diff])
|
|
934
437
|
{
|
|
935
438
|
if (++c == lim)
|
|
936
439
|
{
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
return
|
|
440
|
+
distances[0] = (UInt32)(lim - cur);
|
|
441
|
+
distances[1] = delta - 1;
|
|
442
|
+
return distances + 2;
|
|
940
443
|
}
|
|
941
444
|
}
|
|
942
445
|
{
|
|
943
|
-
|
|
446
|
+
unsigned len = (unsigned)(c - cur);
|
|
944
447
|
if (maxLen < len)
|
|
945
448
|
{
|
|
946
449
|
maxLen = len;
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
450
|
+
distances[0] = (UInt32)len;
|
|
451
|
+
distances[1] = delta - 1;
|
|
452
|
+
distances += 2;
|
|
950
453
|
}
|
|
951
454
|
}
|
|
952
455
|
}
|
|
@@ -954,36 +457,31 @@ static UInt32 * Hc_GetMatchesSpec(size_t lenLimit, UInt32 curMatch, UInt32 pos,
|
|
|
954
457
|
}
|
|
955
458
|
while (--cutValue);
|
|
956
459
|
|
|
957
|
-
return
|
|
460
|
+
return distances;
|
|
958
461
|
}
|
|
959
462
|
|
|
960
463
|
|
|
961
|
-
|
|
464
|
+
MY_FORCE_INLINE
|
|
962
465
|
UInt32 * GetMatchesSpec1(UInt32 lenLimit, UInt32 curMatch, UInt32 pos, const Byte *cur, CLzRef *son,
|
|
963
|
-
|
|
964
|
-
UInt32 *
|
|
466
|
+
UInt32 _cyclicBufferPos, UInt32 _cyclicBufferSize, UInt32 cutValue,
|
|
467
|
+
UInt32 *distances, UInt32 maxLen)
|
|
965
468
|
{
|
|
966
469
|
CLzRef *ptr0 = son + ((size_t)_cyclicBufferPos << 1) + 1;
|
|
967
470
|
CLzRef *ptr1 = son + ((size_t)_cyclicBufferPos << 1);
|
|
968
471
|
unsigned len0 = 0, len1 = 0;
|
|
969
|
-
|
|
970
|
-
UInt32 cmCheck;
|
|
971
|
-
|
|
972
|
-
// if (curMatch >= pos) { *ptr0 = *ptr1 = kEmptyHashValue; return NULL; }
|
|
973
|
-
|
|
974
|
-
cmCheck = (UInt32)(pos - _cyclicBufferSize);
|
|
975
|
-
if ((UInt32)pos < _cyclicBufferSize)
|
|
976
|
-
cmCheck = 0;
|
|
977
|
-
|
|
978
|
-
if (cmCheck < curMatch)
|
|
979
|
-
do
|
|
472
|
+
for (;;)
|
|
980
473
|
{
|
|
981
|
-
|
|
474
|
+
UInt32 delta = pos - curMatch;
|
|
475
|
+
if (cutValue-- == 0 || delta >= _cyclicBufferSize)
|
|
476
|
+
{
|
|
477
|
+
*ptr0 = *ptr1 = kEmptyHashValue;
|
|
478
|
+
return distances;
|
|
479
|
+
}
|
|
982
480
|
{
|
|
983
|
-
CLzRef *pair = son + ((size_t)(_cyclicBufferPos - delta + (
|
|
481
|
+
CLzRef *pair = son + ((size_t)(_cyclicBufferPos - delta + ((delta > _cyclicBufferPos) ? _cyclicBufferSize : 0)) << 1);
|
|
984
482
|
const Byte *pb = cur - delta;
|
|
985
483
|
unsigned len = (len0 < len1 ? len0 : len1);
|
|
986
|
-
|
|
484
|
+
UInt32 pair0 = pair[0];
|
|
987
485
|
if (pb[len] == cur[len])
|
|
988
486
|
{
|
|
989
487
|
if (++len != lenLimit && pb[len] == cur[len])
|
|
@@ -993,62 +491,50 @@ UInt32 * GetMatchesSpec1(UInt32 lenLimit, UInt32 curMatch, UInt32 pos, const Byt
|
|
|
993
491
|
if (maxLen < len)
|
|
994
492
|
{
|
|
995
493
|
maxLen = (UInt32)len;
|
|
996
|
-
*
|
|
997
|
-
*
|
|
494
|
+
*distances++ = (UInt32)len;
|
|
495
|
+
*distances++ = delta - 1;
|
|
998
496
|
if (len == lenLimit)
|
|
999
497
|
{
|
|
1000
498
|
*ptr1 = pair0;
|
|
1001
499
|
*ptr0 = pair[1];
|
|
1002
|
-
return
|
|
500
|
+
return distances;
|
|
1003
501
|
}
|
|
1004
502
|
}
|
|
1005
503
|
}
|
|
1006
504
|
if (pb[len] < cur[len])
|
|
1007
505
|
{
|
|
1008
506
|
*ptr1 = curMatch;
|
|
1009
|
-
// const UInt32 curMatch2 = pair[1];
|
|
1010
|
-
// if (curMatch2 >= curMatch) { *ptr0 = *ptr1 = kEmptyHashValue; return NULL; }
|
|
1011
|
-
// curMatch = curMatch2;
|
|
1012
|
-
curMatch = pair[1];
|
|
1013
507
|
ptr1 = pair + 1;
|
|
508
|
+
curMatch = *ptr1;
|
|
1014
509
|
len1 = len;
|
|
1015
510
|
}
|
|
1016
511
|
else
|
|
1017
512
|
{
|
|
1018
513
|
*ptr0 = curMatch;
|
|
1019
|
-
curMatch = pair[0];
|
|
1020
514
|
ptr0 = pair;
|
|
515
|
+
curMatch = *ptr0;
|
|
1021
516
|
len0 = len;
|
|
1022
517
|
}
|
|
1023
518
|
}
|
|
1024
519
|
}
|
|
1025
|
-
while(--cutValue && cmCheck < curMatch);
|
|
1026
|
-
|
|
1027
|
-
*ptr0 = *ptr1 = kEmptyHashValue;
|
|
1028
|
-
return d;
|
|
1029
520
|
}
|
|
1030
521
|
|
|
1031
|
-
|
|
1032
522
|
static void SkipMatchesSpec(UInt32 lenLimit, UInt32 curMatch, UInt32 pos, const Byte *cur, CLzRef *son,
|
|
1033
|
-
|
|
523
|
+
UInt32 _cyclicBufferPos, UInt32 _cyclicBufferSize, UInt32 cutValue)
|
|
1034
524
|
{
|
|
1035
525
|
CLzRef *ptr0 = son + ((size_t)_cyclicBufferPos << 1) + 1;
|
|
1036
526
|
CLzRef *ptr1 = son + ((size_t)_cyclicBufferPos << 1);
|
|
1037
527
|
unsigned len0 = 0, len1 = 0;
|
|
1038
|
-
|
|
1039
|
-
UInt32 cmCheck;
|
|
1040
|
-
|
|
1041
|
-
cmCheck = (UInt32)(pos - _cyclicBufferSize);
|
|
1042
|
-
if ((UInt32)pos < _cyclicBufferSize)
|
|
1043
|
-
cmCheck = 0;
|
|
1044
|
-
|
|
1045
|
-
if (// curMatch >= pos || // failure
|
|
1046
|
-
cmCheck < curMatch)
|
|
1047
|
-
do
|
|
528
|
+
for (;;)
|
|
1048
529
|
{
|
|
1049
|
-
|
|
530
|
+
UInt32 delta = pos - curMatch;
|
|
531
|
+
if (cutValue-- == 0 || delta >= _cyclicBufferSize)
|
|
1050
532
|
{
|
|
1051
|
-
|
|
533
|
+
*ptr0 = *ptr1 = kEmptyHashValue;
|
|
534
|
+
return;
|
|
535
|
+
}
|
|
536
|
+
{
|
|
537
|
+
CLzRef *pair = son + ((size_t)(_cyclicBufferPos - delta + ((delta > _cyclicBufferPos) ? _cyclicBufferSize : 0)) << 1);
|
|
1052
538
|
const Byte *pb = cur - delta;
|
|
1053
539
|
unsigned len = (len0 < len1 ? len0 : len1);
|
|
1054
540
|
if (pb[len] == cur[len])
|
|
@@ -1068,122 +554,84 @@ static void SkipMatchesSpec(UInt32 lenLimit, UInt32 curMatch, UInt32 pos, const
|
|
|
1068
554
|
if (pb[len] < cur[len])
|
|
1069
555
|
{
|
|
1070
556
|
*ptr1 = curMatch;
|
|
1071
|
-
curMatch = pair[1];
|
|
1072
557
|
ptr1 = pair + 1;
|
|
558
|
+
curMatch = *ptr1;
|
|
1073
559
|
len1 = len;
|
|
1074
560
|
}
|
|
1075
561
|
else
|
|
1076
562
|
{
|
|
1077
563
|
*ptr0 = curMatch;
|
|
1078
|
-
curMatch = pair[0];
|
|
1079
564
|
ptr0 = pair;
|
|
565
|
+
curMatch = *ptr0;
|
|
1080
566
|
len0 = len;
|
|
1081
567
|
}
|
|
1082
568
|
}
|
|
1083
569
|
}
|
|
1084
|
-
while(--cutValue && cmCheck < curMatch);
|
|
1085
|
-
|
|
1086
|
-
*ptr0 = *ptr1 = kEmptyHashValue;
|
|
1087
|
-
return;
|
|
1088
570
|
}
|
|
1089
571
|
|
|
1090
|
-
|
|
1091
572
|
#define MOVE_POS \
|
|
1092
|
-
p->cyclicBufferPos
|
|
573
|
+
++p->cyclicBufferPos; \
|
|
1093
574
|
p->buffer++; \
|
|
1094
|
-
|
|
1095
|
-
p->pos = pos1; \
|
|
1096
|
-
if (pos1 == p->posLimit) MatchFinder_CheckLimits(p); }
|
|
575
|
+
if (++p->pos == p->posLimit) MatchFinder_CheckLimits(p);
|
|
1097
576
|
|
|
1098
|
-
#define MOVE_POS_RET MOVE_POS return
|
|
577
|
+
#define MOVE_POS_RET MOVE_POS return (UInt32)offset;
|
|
1099
578
|
|
|
1100
|
-
|
|
1101
|
-
static void MatchFinder_MovePos(CMatchFinder *p)
|
|
1102
|
-
{
|
|
1103
|
-
/* we go here at the end of stream data, when (avail < num_hash_bytes)
|
|
1104
|
-
We don't update sons[cyclicBufferPos << btMode].
|
|
1105
|
-
So (sons) record will contain junk. And we cannot resume match searching
|
|
1106
|
-
to normal operation, even if we will provide more input data in buffer.
|
|
1107
|
-
p->sons[p->cyclicBufferPos << p->btMode] = 0; // kEmptyHashValue
|
|
1108
|
-
if (p->btMode)
|
|
1109
|
-
p->sons[(p->cyclicBufferPos << p->btMode) + 1] = 0; // kEmptyHashValue
|
|
1110
|
-
*/
|
|
1111
|
-
MOVE_POS
|
|
1112
|
-
}
|
|
579
|
+
static void MatchFinder_MovePos(CMatchFinder *p) { MOVE_POS; }
|
|
1113
580
|
|
|
1114
581
|
#define GET_MATCHES_HEADER2(minLen, ret_op) \
|
|
1115
|
-
UInt32 hv; const Byte *cur; UInt32 curMatch; \
|
|
1116
|
-
|
|
1117
|
-
if (lenLimit < minLen) { MatchFinder_MovePos(p); ret_op; } \
|
|
582
|
+
unsigned lenLimit; UInt32 hv; const Byte *cur; UInt32 curMatch; \
|
|
583
|
+
lenLimit = (unsigned)p->lenLimit; { if (lenLimit < minLen) { MatchFinder_MovePos(p); ret_op; }} \
|
|
1118
584
|
cur = p->buffer;
|
|
1119
585
|
|
|
1120
|
-
#define GET_MATCHES_HEADER(minLen) GET_MATCHES_HEADER2(minLen, return
|
|
1121
|
-
#define SKIP_HEADER(minLen)
|
|
1122
|
-
do { GET_MATCHES_HEADER2(minLen, continue)
|
|
1123
|
-
|
|
1124
|
-
#define MF_PARAMS(p) lenLimit, curMatch, p->pos, p->buffer, p->son, \
|
|
1125
|
-
p->cyclicBufferPos, p->cyclicBufferSize, p->cutValue
|
|
1126
|
-
|
|
1127
|
-
#define SKIP_FOOTER \
|
|
1128
|
-
SkipMatchesSpec(MF_PARAMS(p)); \
|
|
1129
|
-
MOVE_POS \
|
|
1130
|
-
} while (--num);
|
|
1131
|
-
|
|
1132
|
-
#define GET_MATCHES_FOOTER_BASE(_maxLen_, func) \
|
|
1133
|
-
distances = func(MF_PARAMS(p), distances, (UInt32)_maxLen_); \
|
|
1134
|
-
MOVE_POS_RET
|
|
1135
|
-
|
|
1136
|
-
#define GET_MATCHES_FOOTER_BT(_maxLen_) \
|
|
1137
|
-
GET_MATCHES_FOOTER_BASE(_maxLen_, GetMatchesSpec1)
|
|
586
|
+
#define GET_MATCHES_HEADER(minLen) GET_MATCHES_HEADER2(minLen, return 0)
|
|
587
|
+
#define SKIP_HEADER(minLen) GET_MATCHES_HEADER2(minLen, continue)
|
|
1138
588
|
|
|
1139
|
-
#define
|
|
1140
|
-
GET_MATCHES_FOOTER_BASE(_maxLen_, Hc_GetMatchesSpec)
|
|
589
|
+
#define MF_PARAMS(p) p->pos, p->buffer, p->son, p->cyclicBufferPos, p->cyclicBufferSize, p->cutValue
|
|
1141
590
|
|
|
591
|
+
#define GET_MATCHES_FOOTER(offset, maxLen) \
|
|
592
|
+
offset = (unsigned)(GetMatchesSpec1((UInt32)lenLimit, curMatch, MF_PARAMS(p), \
|
|
593
|
+
distances + offset, (UInt32)maxLen) - distances); MOVE_POS_RET;
|
|
1142
594
|
|
|
595
|
+
#define SKIP_FOOTER \
|
|
596
|
+
SkipMatchesSpec((UInt32)lenLimit, curMatch, MF_PARAMS(p)); MOVE_POS;
|
|
1143
597
|
|
|
1144
598
|
#define UPDATE_maxLen { \
|
|
1145
|
-
|
|
599
|
+
ptrdiff_t diff = (ptrdiff_t)0 - d2; \
|
|
1146
600
|
const Byte *c = cur + maxLen; \
|
|
1147
601
|
const Byte *lim = cur + lenLimit; \
|
|
1148
602
|
for (; c != lim; c++) if (*(c + diff) != *c) break; \
|
|
1149
603
|
maxLen = (unsigned)(c - cur); }
|
|
1150
604
|
|
|
1151
|
-
static UInt32
|
|
605
|
+
static UInt32 Bt2_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances)
|
|
1152
606
|
{
|
|
1153
|
-
|
|
607
|
+
unsigned offset;
|
|
1154
608
|
GET_MATCHES_HEADER(2)
|
|
1155
|
-
HASH2_CALC
|
|
609
|
+
HASH2_CALC;
|
|
1156
610
|
curMatch = p->hash[hv];
|
|
1157
611
|
p->hash[hv] = p->pos;
|
|
1158
|
-
|
|
612
|
+
offset = 0;
|
|
613
|
+
GET_MATCHES_FOOTER(offset, 1)
|
|
1159
614
|
}
|
|
1160
615
|
|
|
1161
|
-
UInt32
|
|
616
|
+
UInt32 Bt3Zip_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances)
|
|
1162
617
|
{
|
|
618
|
+
unsigned offset;
|
|
1163
619
|
GET_MATCHES_HEADER(3)
|
|
1164
|
-
HASH_ZIP_CALC
|
|
620
|
+
HASH_ZIP_CALC;
|
|
1165
621
|
curMatch = p->hash[hv];
|
|
1166
622
|
p->hash[hv] = p->pos;
|
|
1167
|
-
|
|
623
|
+
offset = 0;
|
|
624
|
+
GET_MATCHES_FOOTER(offset, 2)
|
|
1168
625
|
}
|
|
1169
626
|
|
|
1170
|
-
|
|
1171
|
-
#define SET_mmm \
|
|
1172
|
-
mmm = p->cyclicBufferSize; \
|
|
1173
|
-
if (pos < mmm) \
|
|
1174
|
-
mmm = pos;
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
static UInt32* Bt3_MatchFinder_GetMatches(void *_p, UInt32 *distances)
|
|
627
|
+
static UInt32 Bt3_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances)
|
|
1178
628
|
{
|
|
1179
|
-
CMatchFinder *p = (CMatchFinder *)_p;
|
|
1180
|
-
UInt32 mmm;
|
|
1181
629
|
UInt32 h2, d2, pos;
|
|
1182
|
-
unsigned maxLen;
|
|
630
|
+
unsigned maxLen, offset;
|
|
1183
631
|
UInt32 *hash;
|
|
1184
632
|
GET_MATCHES_HEADER(3)
|
|
1185
633
|
|
|
1186
|
-
HASH3_CALC
|
|
634
|
+
HASH3_CALC;
|
|
1187
635
|
|
|
1188
636
|
hash = p->hash;
|
|
1189
637
|
pos = p->pos;
|
|
@@ -1195,180 +643,167 @@ static UInt32* Bt3_MatchFinder_GetMatches(void *_p, UInt32 *distances)
|
|
|
1195
643
|
hash[h2] = pos;
|
|
1196
644
|
(hash + kFix3HashSize)[hv] = pos;
|
|
1197
645
|
|
|
1198
|
-
SET_mmm
|
|
1199
|
-
|
|
1200
646
|
maxLen = 2;
|
|
647
|
+
offset = 0;
|
|
1201
648
|
|
|
1202
|
-
if (d2 <
|
|
649
|
+
if (d2 < p->cyclicBufferSize && *(cur - d2) == *cur)
|
|
1203
650
|
{
|
|
1204
651
|
UPDATE_maxLen
|
|
1205
652
|
distances[0] = (UInt32)maxLen;
|
|
1206
653
|
distances[1] = d2 - 1;
|
|
1207
|
-
|
|
654
|
+
offset = 2;
|
|
1208
655
|
if (maxLen == lenLimit)
|
|
1209
656
|
{
|
|
1210
|
-
SkipMatchesSpec(MF_PARAMS(p));
|
|
1211
|
-
MOVE_POS_RET
|
|
657
|
+
SkipMatchesSpec((UInt32)lenLimit, curMatch, MF_PARAMS(p));
|
|
658
|
+
MOVE_POS_RET;
|
|
1212
659
|
}
|
|
1213
660
|
}
|
|
1214
661
|
|
|
1215
|
-
|
|
662
|
+
GET_MATCHES_FOOTER(offset, maxLen)
|
|
1216
663
|
}
|
|
1217
664
|
|
|
1218
|
-
|
|
1219
|
-
static UInt32* Bt4_MatchFinder_GetMatches(void *_p, UInt32 *distances)
|
|
665
|
+
static UInt32 Bt4_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances)
|
|
1220
666
|
{
|
|
1221
|
-
CMatchFinder *p = (CMatchFinder *)_p;
|
|
1222
|
-
UInt32 mmm;
|
|
1223
667
|
UInt32 h2, h3, d2, d3, pos;
|
|
1224
|
-
unsigned maxLen;
|
|
668
|
+
unsigned maxLen, offset;
|
|
1225
669
|
UInt32 *hash;
|
|
1226
670
|
GET_MATCHES_HEADER(4)
|
|
1227
671
|
|
|
1228
|
-
HASH4_CALC
|
|
672
|
+
HASH4_CALC;
|
|
1229
673
|
|
|
1230
674
|
hash = p->hash;
|
|
1231
675
|
pos = p->pos;
|
|
1232
676
|
|
|
1233
677
|
d2 = pos - hash [h2];
|
|
1234
678
|
d3 = pos - (hash + kFix3HashSize)[h3];
|
|
679
|
+
|
|
1235
680
|
curMatch = (hash + kFix4HashSize)[hv];
|
|
1236
681
|
|
|
1237
682
|
hash [h2] = pos;
|
|
1238
683
|
(hash + kFix3HashSize)[h3] = pos;
|
|
1239
684
|
(hash + kFix4HashSize)[hv] = pos;
|
|
1240
685
|
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
maxLen = 3;
|
|
686
|
+
maxLen = 0;
|
|
687
|
+
offset = 0;
|
|
1244
688
|
|
|
1245
|
-
|
|
689
|
+
if (d2 < p->cyclicBufferSize && *(cur - d2) == *cur)
|
|
1246
690
|
{
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
distances += 2;
|
|
1261
|
-
}
|
|
1262
|
-
else
|
|
1263
|
-
break;
|
|
1264
|
-
}
|
|
1265
|
-
else if (d3 < mmm && *(cur - d3) == *cur)
|
|
1266
|
-
{
|
|
1267
|
-
d2 = d3;
|
|
1268
|
-
distances[1] = d3 - 1;
|
|
1269
|
-
distances += 2;
|
|
1270
|
-
}
|
|
1271
|
-
else
|
|
1272
|
-
break;
|
|
691
|
+
maxLen = 2;
|
|
692
|
+
distances[0] = 2;
|
|
693
|
+
distances[1] = d2 - 1;
|
|
694
|
+
offset = 2;
|
|
695
|
+
}
|
|
696
|
+
|
|
697
|
+
if (d2 != d3 && d3 < p->cyclicBufferSize && *(cur - d3) == *cur)
|
|
698
|
+
{
|
|
699
|
+
maxLen = 3;
|
|
700
|
+
distances[(size_t)offset + 1] = d3 - 1;
|
|
701
|
+
offset += 2;
|
|
702
|
+
d2 = d3;
|
|
703
|
+
}
|
|
1273
704
|
|
|
705
|
+
if (offset != 0)
|
|
706
|
+
{
|
|
1274
707
|
UPDATE_maxLen
|
|
1275
|
-
distances[-2] = (UInt32)maxLen;
|
|
708
|
+
distances[(size_t)offset - 2] = (UInt32)maxLen;
|
|
1276
709
|
if (maxLen == lenLimit)
|
|
1277
710
|
{
|
|
1278
|
-
SkipMatchesSpec(MF_PARAMS(p));
|
|
1279
|
-
MOVE_POS_RET
|
|
711
|
+
SkipMatchesSpec((UInt32)lenLimit, curMatch, MF_PARAMS(p));
|
|
712
|
+
MOVE_POS_RET;
|
|
1280
713
|
}
|
|
1281
|
-
break;
|
|
1282
714
|
}
|
|
1283
715
|
|
|
1284
|
-
|
|
716
|
+
if (maxLen < 3)
|
|
717
|
+
maxLen = 3;
|
|
718
|
+
|
|
719
|
+
GET_MATCHES_FOOTER(offset, maxLen)
|
|
1285
720
|
}
|
|
1286
721
|
|
|
1287
|
-
|
|
1288
|
-
static UInt32
|
|
722
|
+
/*
|
|
723
|
+
static UInt32 Bt5_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances)
|
|
1289
724
|
{
|
|
1290
|
-
|
|
1291
|
-
UInt32 mmm;
|
|
1292
|
-
UInt32 h2, h3, d2, d3, pos;
|
|
1293
|
-
unsigned maxLen;
|
|
725
|
+
UInt32 h2, h3, h4, d2, d3, d4, maxLen, offset, pos;
|
|
1294
726
|
UInt32 *hash;
|
|
1295
727
|
GET_MATCHES_HEADER(5)
|
|
1296
728
|
|
|
1297
|
-
HASH5_CALC
|
|
729
|
+
HASH5_CALC;
|
|
1298
730
|
|
|
1299
731
|
hash = p->hash;
|
|
1300
732
|
pos = p->pos;
|
|
1301
733
|
|
|
1302
734
|
d2 = pos - hash [h2];
|
|
1303
735
|
d3 = pos - (hash + kFix3HashSize)[h3];
|
|
1304
|
-
|
|
736
|
+
d4 = pos - (hash + kFix4HashSize)[h4];
|
|
1305
737
|
|
|
1306
738
|
curMatch = (hash + kFix5HashSize)[hv];
|
|
1307
739
|
|
|
1308
740
|
hash [h2] = pos;
|
|
1309
741
|
(hash + kFix3HashSize)[h3] = pos;
|
|
1310
|
-
|
|
742
|
+
(hash + kFix4HashSize)[h4] = pos;
|
|
1311
743
|
(hash + kFix5HashSize)[hv] = pos;
|
|
1312
744
|
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
maxLen = 4;
|
|
745
|
+
maxLen = 0;
|
|
746
|
+
offset = 0;
|
|
1316
747
|
|
|
1317
|
-
|
|
748
|
+
if (d2 < p->cyclicBufferSize && *(cur - d2) == *cur)
|
|
1318
749
|
{
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
distances
|
|
1324
|
-
|
|
1325
|
-
{
|
|
1326
|
-
}
|
|
1327
|
-
else if (d3 < mmm && *(cur - d3) == *cur)
|
|
1328
|
-
{
|
|
1329
|
-
distances[1] = d3 - 1;
|
|
1330
|
-
distances += 2;
|
|
1331
|
-
d2 = d3;
|
|
1332
|
-
}
|
|
1333
|
-
else
|
|
1334
|
-
break;
|
|
1335
|
-
}
|
|
1336
|
-
else if (d3 < mmm && *(cur - d3) == *cur)
|
|
750
|
+
distances[0] = maxLen = 2;
|
|
751
|
+
distances[1] = d2 - 1;
|
|
752
|
+
offset = 2;
|
|
753
|
+
if (*(cur - d2 + 2) == cur[2])
|
|
754
|
+
distances[0] = maxLen = 3;
|
|
755
|
+
else if (d3 < p->cyclicBufferSize && *(cur - d3) == *cur)
|
|
1337
756
|
{
|
|
1338
|
-
distances[
|
|
1339
|
-
distances
|
|
757
|
+
distances[2] = maxLen = 3;
|
|
758
|
+
distances[3] = d3 - 1;
|
|
759
|
+
offset = 4;
|
|
1340
760
|
d2 = d3;
|
|
1341
761
|
}
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
distances[
|
|
1346
|
-
|
|
1347
|
-
|
|
762
|
+
}
|
|
763
|
+
else if (d3 < p->cyclicBufferSize && *(cur - d3) == *cur)
|
|
764
|
+
{
|
|
765
|
+
distances[0] = maxLen = 3;
|
|
766
|
+
distances[1] = d3 - 1;
|
|
767
|
+
offset = 2;
|
|
768
|
+
d2 = d3;
|
|
769
|
+
}
|
|
770
|
+
|
|
771
|
+
if (d2 != d4 && d4 < p->cyclicBufferSize
|
|
772
|
+
&& *(cur - d4) == *cur
|
|
773
|
+
&& *(cur - d4 + 3) == *(cur + 3))
|
|
774
|
+
{
|
|
775
|
+
maxLen = 4;
|
|
776
|
+
distances[(size_t)offset + 1] = d4 - 1;
|
|
777
|
+
offset += 2;
|
|
778
|
+
d2 = d4;
|
|
779
|
+
}
|
|
780
|
+
|
|
781
|
+
if (offset != 0)
|
|
782
|
+
{
|
|
1348
783
|
UPDATE_maxLen
|
|
1349
|
-
distances[-2] =
|
|
784
|
+
distances[(size_t)offset - 2] = maxLen;
|
|
1350
785
|
if (maxLen == lenLimit)
|
|
1351
786
|
{
|
|
1352
|
-
SkipMatchesSpec(MF_PARAMS(p));
|
|
1353
|
-
MOVE_POS_RET
|
|
787
|
+
SkipMatchesSpec(lenLimit, curMatch, MF_PARAMS(p));
|
|
788
|
+
MOVE_POS_RET;
|
|
1354
789
|
}
|
|
1355
|
-
break;
|
|
1356
790
|
}
|
|
791
|
+
|
|
792
|
+
if (maxLen < 4)
|
|
793
|
+
maxLen = 4;
|
|
1357
794
|
|
|
1358
|
-
|
|
795
|
+
GET_MATCHES_FOOTER(offset, maxLen)
|
|
1359
796
|
}
|
|
797
|
+
*/
|
|
1360
798
|
|
|
1361
|
-
|
|
1362
|
-
static UInt32* Hc4_MatchFinder_GetMatches(void *_p, UInt32 *distances)
|
|
799
|
+
static UInt32 Hc4_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances)
|
|
1363
800
|
{
|
|
1364
|
-
CMatchFinder *p = (CMatchFinder *)_p;
|
|
1365
|
-
UInt32 mmm;
|
|
1366
801
|
UInt32 h2, h3, d2, d3, pos;
|
|
1367
|
-
unsigned maxLen;
|
|
802
|
+
unsigned maxLen, offset;
|
|
1368
803
|
UInt32 *hash;
|
|
1369
804
|
GET_MATCHES_HEADER(4)
|
|
1370
805
|
|
|
1371
|
-
HASH4_CALC
|
|
806
|
+
HASH4_CALC;
|
|
1372
807
|
|
|
1373
808
|
hash = p->hash;
|
|
1374
809
|
pos = p->pos;
|
|
@@ -1381,366 +816,312 @@ static UInt32* Hc4_MatchFinder_GetMatches(void *_p, UInt32 *distances)
|
|
|
1381
816
|
(hash + kFix3HashSize)[h3] = pos;
|
|
1382
817
|
(hash + kFix4HashSize)[hv] = pos;
|
|
1383
818
|
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
maxLen = 3;
|
|
819
|
+
maxLen = 0;
|
|
820
|
+
offset = 0;
|
|
1387
821
|
|
|
1388
|
-
|
|
822
|
+
if (d2 < p->cyclicBufferSize && *(cur - d2) == *cur)
|
|
823
|
+
{
|
|
824
|
+
maxLen = 2;
|
|
825
|
+
distances[0] = 2;
|
|
826
|
+
distances[1] = d2 - 1;
|
|
827
|
+
offset = 2;
|
|
828
|
+
}
|
|
829
|
+
|
|
830
|
+
if (d2 != d3 && d3 < p->cyclicBufferSize && *(cur - d3) == *cur)
|
|
831
|
+
{
|
|
832
|
+
maxLen = 3;
|
|
833
|
+
distances[(size_t)offset + 1] = d3 - 1;
|
|
834
|
+
offset += 2;
|
|
835
|
+
d2 = d3;
|
|
836
|
+
}
|
|
837
|
+
|
|
838
|
+
if (offset != 0)
|
|
1389
839
|
{
|
|
1390
|
-
if (d2 < mmm && *(cur - d2) == *cur)
|
|
1391
|
-
{
|
|
1392
|
-
distances[0] = 2;
|
|
1393
|
-
distances[1] = d2 - 1;
|
|
1394
|
-
distances += 2;
|
|
1395
|
-
if (*(cur - d2 + 2) == cur[2])
|
|
1396
|
-
{
|
|
1397
|
-
// distances[-2] = 3;
|
|
1398
|
-
}
|
|
1399
|
-
else if (d3 < mmm && *(cur - d3) == *cur)
|
|
1400
|
-
{
|
|
1401
|
-
d2 = d3;
|
|
1402
|
-
distances[1] = d3 - 1;
|
|
1403
|
-
distances += 2;
|
|
1404
|
-
}
|
|
1405
|
-
else
|
|
1406
|
-
break;
|
|
1407
|
-
}
|
|
1408
|
-
else if (d3 < mmm && *(cur - d3) == *cur)
|
|
1409
|
-
{
|
|
1410
|
-
d2 = d3;
|
|
1411
|
-
distances[1] = d3 - 1;
|
|
1412
|
-
distances += 2;
|
|
1413
|
-
}
|
|
1414
|
-
else
|
|
1415
|
-
break;
|
|
1416
|
-
|
|
1417
840
|
UPDATE_maxLen
|
|
1418
|
-
distances[-2] = (UInt32)maxLen;
|
|
841
|
+
distances[(size_t)offset - 2] = (UInt32)maxLen;
|
|
1419
842
|
if (maxLen == lenLimit)
|
|
1420
843
|
{
|
|
1421
844
|
p->son[p->cyclicBufferPos] = curMatch;
|
|
1422
|
-
MOVE_POS_RET
|
|
845
|
+
MOVE_POS_RET;
|
|
1423
846
|
}
|
|
1424
|
-
break;
|
|
1425
847
|
}
|
|
1426
848
|
|
|
1427
|
-
|
|
1428
|
-
|
|
849
|
+
if (maxLen < 3)
|
|
850
|
+
maxLen = 3;
|
|
1429
851
|
|
|
852
|
+
offset = (unsigned)(Hc_GetMatchesSpec(lenLimit, curMatch, MF_PARAMS(p),
|
|
853
|
+
distances + offset, maxLen) - (distances));
|
|
854
|
+
MOVE_POS_RET
|
|
855
|
+
}
|
|
1430
856
|
|
|
1431
|
-
|
|
857
|
+
/*
|
|
858
|
+
static UInt32 Hc5_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances)
|
|
1432
859
|
{
|
|
1433
|
-
|
|
1434
|
-
UInt32 mmm;
|
|
1435
|
-
UInt32 h2, h3, d2, d3, pos;
|
|
1436
|
-
unsigned maxLen;
|
|
860
|
+
UInt32 h2, h3, h4, d2, d3, d4, maxLen, offset, pos
|
|
1437
861
|
UInt32 *hash;
|
|
1438
862
|
GET_MATCHES_HEADER(5)
|
|
1439
863
|
|
|
1440
|
-
HASH5_CALC
|
|
864
|
+
HASH5_CALC;
|
|
1441
865
|
|
|
1442
866
|
hash = p->hash;
|
|
1443
867
|
pos = p->pos;
|
|
1444
|
-
|
|
868
|
+
|
|
1445
869
|
d2 = pos - hash [h2];
|
|
1446
870
|
d3 = pos - (hash + kFix3HashSize)[h3];
|
|
1447
|
-
|
|
871
|
+
d4 = pos - (hash + kFix4HashSize)[h4];
|
|
1448
872
|
|
|
1449
873
|
curMatch = (hash + kFix5HashSize)[hv];
|
|
1450
874
|
|
|
1451
875
|
hash [h2] = pos;
|
|
1452
876
|
(hash + kFix3HashSize)[h3] = pos;
|
|
1453
|
-
|
|
877
|
+
(hash + kFix4HashSize)[h4] = pos;
|
|
1454
878
|
(hash + kFix5HashSize)[hv] = pos;
|
|
1455
879
|
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
maxLen = 4;
|
|
880
|
+
maxLen = 0;
|
|
881
|
+
offset = 0;
|
|
1459
882
|
|
|
1460
|
-
|
|
883
|
+
if (d2 < p->cyclicBufferSize && *(cur - d2) == *cur)
|
|
1461
884
|
{
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
distances
|
|
1467
|
-
|
|
1468
|
-
{
|
|
1469
|
-
}
|
|
1470
|
-
else if (d3 < mmm && *(cur - d3) == *cur)
|
|
1471
|
-
{
|
|
1472
|
-
distances[1] = d3 - 1;
|
|
1473
|
-
distances += 2;
|
|
1474
|
-
d2 = d3;
|
|
1475
|
-
}
|
|
1476
|
-
else
|
|
1477
|
-
break;
|
|
1478
|
-
}
|
|
1479
|
-
else if (d3 < mmm && *(cur - d3) == *cur)
|
|
885
|
+
distances[0] = maxLen = 2;
|
|
886
|
+
distances[1] = d2 - 1;
|
|
887
|
+
offset = 2;
|
|
888
|
+
if (*(cur - d2 + 2) == cur[2])
|
|
889
|
+
distances[0] = maxLen = 3;
|
|
890
|
+
else if (d3 < p->cyclicBufferSize && *(cur - d3) == *cur)
|
|
1480
891
|
{
|
|
1481
|
-
distances[
|
|
1482
|
-
distances
|
|
892
|
+
distances[2] = maxLen = 3;
|
|
893
|
+
distances[3] = d3 - 1;
|
|
894
|
+
offset = 4;
|
|
1483
895
|
d2 = d3;
|
|
1484
896
|
}
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
distances[
|
|
1489
|
-
|
|
1490
|
-
|
|
897
|
+
}
|
|
898
|
+
else if (d3 < p->cyclicBufferSize && *(cur - d3) == *cur)
|
|
899
|
+
{
|
|
900
|
+
distances[0] = maxLen = 3;
|
|
901
|
+
distances[1] = d3 - 1;
|
|
902
|
+
offset = 2;
|
|
903
|
+
d2 = d3;
|
|
904
|
+
}
|
|
905
|
+
|
|
906
|
+
if (d2 != d4 && d4 < p->cyclicBufferSize
|
|
907
|
+
&& *(cur - d4) == *cur
|
|
908
|
+
&& *(cur - d4 + 3) == *(cur + 3))
|
|
909
|
+
{
|
|
910
|
+
maxLen = 4;
|
|
911
|
+
distances[(size_t)offset + 1] = d4 - 1;
|
|
912
|
+
offset += 2;
|
|
913
|
+
d2 = d4;
|
|
914
|
+
}
|
|
915
|
+
|
|
916
|
+
if (offset != 0)
|
|
917
|
+
{
|
|
1491
918
|
UPDATE_maxLen
|
|
1492
|
-
distances[-2] =
|
|
919
|
+
distances[(size_t)offset - 2] = maxLen;
|
|
1493
920
|
if (maxLen == lenLimit)
|
|
1494
921
|
{
|
|
1495
922
|
p->son[p->cyclicBufferPos] = curMatch;
|
|
1496
|
-
MOVE_POS_RET
|
|
923
|
+
MOVE_POS_RET;
|
|
1497
924
|
}
|
|
1498
|
-
break;
|
|
1499
925
|
}
|
|
1500
926
|
|
|
1501
|
-
|
|
1502
|
-
|
|
927
|
+
if (maxLen < 4)
|
|
928
|
+
maxLen = 4;
|
|
1503
929
|
|
|
930
|
+
offset = (UInt32)(Hc_GetMatchesSpec(lenLimit, curMatch, MF_PARAMS(p),
|
|
931
|
+
distances + offset, maxLen) - (distances));
|
|
932
|
+
MOVE_POS_RET
|
|
933
|
+
}
|
|
934
|
+
*/
|
|
1504
935
|
|
|
1505
|
-
UInt32
|
|
936
|
+
UInt32 Hc3Zip_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances)
|
|
1506
937
|
{
|
|
938
|
+
unsigned offset;
|
|
1507
939
|
GET_MATCHES_HEADER(3)
|
|
1508
|
-
HASH_ZIP_CALC
|
|
940
|
+
HASH_ZIP_CALC;
|
|
1509
941
|
curMatch = p->hash[hv];
|
|
1510
942
|
p->hash[hv] = p->pos;
|
|
1511
|
-
|
|
943
|
+
offset = (unsigned)(Hc_GetMatchesSpec(lenLimit, curMatch, MF_PARAMS(p),
|
|
944
|
+
distances, 2) - (distances));
|
|
945
|
+
MOVE_POS_RET
|
|
1512
946
|
}
|
|
1513
947
|
|
|
1514
|
-
|
|
1515
|
-
static void Bt2_MatchFinder_Skip(void *_p, UInt32 num)
|
|
948
|
+
static void Bt2_MatchFinder_Skip(CMatchFinder *p, UInt32 num)
|
|
1516
949
|
{
|
|
1517
|
-
|
|
1518
|
-
SKIP_HEADER(2)
|
|
950
|
+
do
|
|
1519
951
|
{
|
|
1520
|
-
|
|
952
|
+
SKIP_HEADER(2)
|
|
953
|
+
HASH2_CALC;
|
|
1521
954
|
curMatch = p->hash[hv];
|
|
1522
955
|
p->hash[hv] = p->pos;
|
|
956
|
+
SKIP_FOOTER
|
|
1523
957
|
}
|
|
1524
|
-
|
|
958
|
+
while (--num != 0);
|
|
1525
959
|
}
|
|
1526
960
|
|
|
1527
961
|
void Bt3Zip_MatchFinder_Skip(CMatchFinder *p, UInt32 num)
|
|
1528
962
|
{
|
|
1529
|
-
|
|
963
|
+
do
|
|
1530
964
|
{
|
|
1531
|
-
|
|
965
|
+
SKIP_HEADER(3)
|
|
966
|
+
HASH_ZIP_CALC;
|
|
1532
967
|
curMatch = p->hash[hv];
|
|
1533
968
|
p->hash[hv] = p->pos;
|
|
969
|
+
SKIP_FOOTER
|
|
1534
970
|
}
|
|
1535
|
-
|
|
971
|
+
while (--num != 0);
|
|
1536
972
|
}
|
|
1537
973
|
|
|
1538
|
-
static void Bt3_MatchFinder_Skip(
|
|
974
|
+
static void Bt3_MatchFinder_Skip(CMatchFinder *p, UInt32 num)
|
|
1539
975
|
{
|
|
1540
|
-
|
|
1541
|
-
SKIP_HEADER(3)
|
|
976
|
+
do
|
|
1542
977
|
{
|
|
1543
978
|
UInt32 h2;
|
|
1544
979
|
UInt32 *hash;
|
|
1545
|
-
|
|
980
|
+
SKIP_HEADER(3)
|
|
981
|
+
HASH3_CALC;
|
|
1546
982
|
hash = p->hash;
|
|
1547
983
|
curMatch = (hash + kFix3HashSize)[hv];
|
|
1548
984
|
hash[h2] =
|
|
1549
985
|
(hash + kFix3HashSize)[hv] = p->pos;
|
|
986
|
+
SKIP_FOOTER
|
|
1550
987
|
}
|
|
1551
|
-
|
|
988
|
+
while (--num != 0);
|
|
1552
989
|
}
|
|
1553
990
|
|
|
1554
|
-
static void Bt4_MatchFinder_Skip(
|
|
991
|
+
static void Bt4_MatchFinder_Skip(CMatchFinder *p, UInt32 num)
|
|
1555
992
|
{
|
|
1556
|
-
|
|
1557
|
-
SKIP_HEADER(4)
|
|
993
|
+
do
|
|
1558
994
|
{
|
|
1559
995
|
UInt32 h2, h3;
|
|
1560
996
|
UInt32 *hash;
|
|
1561
|
-
|
|
997
|
+
SKIP_HEADER(4)
|
|
998
|
+
HASH4_CALC;
|
|
1562
999
|
hash = p->hash;
|
|
1563
1000
|
curMatch = (hash + kFix4HashSize)[hv];
|
|
1564
1001
|
hash [h2] =
|
|
1565
1002
|
(hash + kFix3HashSize)[h3] =
|
|
1566
1003
|
(hash + kFix4HashSize)[hv] = p->pos;
|
|
1004
|
+
SKIP_FOOTER
|
|
1567
1005
|
}
|
|
1568
|
-
|
|
1006
|
+
while (--num != 0);
|
|
1569
1007
|
}
|
|
1570
1008
|
|
|
1571
|
-
|
|
1009
|
+
/*
|
|
1010
|
+
static void Bt5_MatchFinder_Skip(CMatchFinder *p, UInt32 num)
|
|
1572
1011
|
{
|
|
1573
|
-
|
|
1574
|
-
SKIP_HEADER(5)
|
|
1012
|
+
do
|
|
1575
1013
|
{
|
|
1576
|
-
UInt32 h2, h3;
|
|
1014
|
+
UInt32 h2, h3, h4;
|
|
1577
1015
|
UInt32 *hash;
|
|
1578
|
-
|
|
1016
|
+
SKIP_HEADER(5)
|
|
1017
|
+
HASH5_CALC;
|
|
1579
1018
|
hash = p->hash;
|
|
1580
1019
|
curMatch = (hash + kFix5HashSize)[hv];
|
|
1581
1020
|
hash [h2] =
|
|
1582
1021
|
(hash + kFix3HashSize)[h3] =
|
|
1583
|
-
|
|
1022
|
+
(hash + kFix4HashSize)[h4] =
|
|
1584
1023
|
(hash + kFix5HashSize)[hv] = p->pos;
|
|
1024
|
+
SKIP_FOOTER
|
|
1585
1025
|
}
|
|
1586
|
-
|
|
1026
|
+
while (--num != 0);
|
|
1587
1027
|
}
|
|
1028
|
+
*/
|
|
1588
1029
|
|
|
1589
|
-
|
|
1590
|
-
#define HC_SKIP_HEADER(minLen) \
|
|
1591
|
-
do { if (p->lenLimit < minLen) { MatchFinder_MovePos(p); num--; continue; } { \
|
|
1592
|
-
const Byte *cur; \
|
|
1593
|
-
UInt32 *hash; \
|
|
1594
|
-
UInt32 *son; \
|
|
1595
|
-
UInt32 pos = p->pos; \
|
|
1596
|
-
UInt32 num2 = num; \
|
|
1597
|
-
/* (p->pos == p->posLimit) is not allowed here !!! */ \
|
|
1598
|
-
{ const UInt32 rem = p->posLimit - pos; if (num2 >= rem) num2 = rem; } \
|
|
1599
|
-
num -= num2; \
|
|
1600
|
-
{ const UInt32 cycPos = p->cyclicBufferPos; \
|
|
1601
|
-
son = p->son + cycPos; \
|
|
1602
|
-
p->cyclicBufferPos = cycPos + num2; } \
|
|
1603
|
-
cur = p->buffer; \
|
|
1604
|
-
hash = p->hash; \
|
|
1605
|
-
do { \
|
|
1606
|
-
UInt32 curMatch; \
|
|
1607
|
-
UInt32 hv;
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
#define HC_SKIP_FOOTER \
|
|
1611
|
-
cur++; pos++; *son++ = curMatch; \
|
|
1612
|
-
} while (--num2); \
|
|
1613
|
-
p->buffer = cur; \
|
|
1614
|
-
p->pos = pos; \
|
|
1615
|
-
if (pos == p->posLimit) MatchFinder_CheckLimits(p); \
|
|
1616
|
-
}} while(num); \
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
static void Hc4_MatchFinder_Skip(void *_p, UInt32 num)
|
|
1030
|
+
static void Hc4_MatchFinder_Skip(CMatchFinder *p, UInt32 num)
|
|
1620
1031
|
{
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1032
|
+
do
|
|
1033
|
+
{
|
|
1624
1034
|
UInt32 h2, h3;
|
|
1625
|
-
|
|
1035
|
+
UInt32 *hash;
|
|
1036
|
+
SKIP_HEADER(4)
|
|
1037
|
+
HASH4_CALC;
|
|
1038
|
+
hash = p->hash;
|
|
1626
1039
|
curMatch = (hash + kFix4HashSize)[hv];
|
|
1627
1040
|
hash [h2] =
|
|
1628
1041
|
(hash + kFix3HashSize)[h3] =
|
|
1629
|
-
(hash + kFix4HashSize)[hv] = pos;
|
|
1630
|
-
|
|
1631
|
-
|
|
1042
|
+
(hash + kFix4HashSize)[hv] = p->pos;
|
|
1043
|
+
p->son[p->cyclicBufferPos] = curMatch;
|
|
1044
|
+
MOVE_POS
|
|
1045
|
+
}
|
|
1046
|
+
while (--num != 0);
|
|
1632
1047
|
}
|
|
1633
1048
|
|
|
1634
|
-
|
|
1635
|
-
static void Hc5_MatchFinder_Skip(
|
|
1049
|
+
/*
|
|
1050
|
+
static void Hc5_MatchFinder_Skip(CMatchFinder *p, UInt32 num)
|
|
1636
1051
|
{
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
UInt32
|
|
1641
|
-
|
|
1642
|
-
|
|
1052
|
+
do
|
|
1053
|
+
{
|
|
1054
|
+
UInt32 h2, h3, h4;
|
|
1055
|
+
UInt32 *hash;
|
|
1056
|
+
SKIP_HEADER(5)
|
|
1057
|
+
HASH5_CALC;
|
|
1058
|
+
hash = p->hash;
|
|
1059
|
+
curMatch = hash + kFix5HashSize)[hv];
|
|
1643
1060
|
hash [h2] =
|
|
1644
1061
|
(hash + kFix3HashSize)[h3] =
|
|
1645
|
-
|
|
1646
|
-
(hash + kFix5HashSize)[hv] = pos;
|
|
1647
|
-
|
|
1648
|
-
|
|
1062
|
+
(hash + kFix4HashSize)[h4] =
|
|
1063
|
+
(hash + kFix5HashSize)[hv] = p->pos;
|
|
1064
|
+
p->son[p->cyclicBufferPos] = curMatch;
|
|
1065
|
+
MOVE_POS
|
|
1066
|
+
}
|
|
1067
|
+
while (--num != 0);
|
|
1649
1068
|
}
|
|
1650
|
-
|
|
1069
|
+
*/
|
|
1651
1070
|
|
|
1652
1071
|
void Hc3Zip_MatchFinder_Skip(CMatchFinder *p, UInt32 num)
|
|
1653
1072
|
{
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
hash[hv]
|
|
1659
|
-
|
|
1660
|
-
|
|
1073
|
+
do
|
|
1074
|
+
{
|
|
1075
|
+
SKIP_HEADER(3)
|
|
1076
|
+
HASH_ZIP_CALC;
|
|
1077
|
+
curMatch = p->hash[hv];
|
|
1078
|
+
p->hash[hv] = p->pos;
|
|
1079
|
+
p->son[p->cyclicBufferPos] = curMatch;
|
|
1080
|
+
MOVE_POS
|
|
1081
|
+
}
|
|
1082
|
+
while (--num != 0);
|
|
1661
1083
|
}
|
|
1662
1084
|
|
|
1663
|
-
|
|
1664
|
-
void MatchFinder_CreateVTable(CMatchFinder *p, IMatchFinder2 *vTable)
|
|
1085
|
+
void MatchFinder_CreateVTable(CMatchFinder *p, IMatchFinder *vTable)
|
|
1665
1086
|
{
|
|
1666
|
-
vTable->Init = MatchFinder_Init;
|
|
1667
|
-
vTable->GetNumAvailableBytes = MatchFinder_GetNumAvailableBytes;
|
|
1668
|
-
vTable->GetPointerToCurrentPos = MatchFinder_GetPointerToCurrentPos;
|
|
1087
|
+
vTable->Init = (Mf_Init_Func)MatchFinder_Init;
|
|
1088
|
+
vTable->GetNumAvailableBytes = (Mf_GetNumAvailableBytes_Func)MatchFinder_GetNumAvailableBytes;
|
|
1089
|
+
vTable->GetPointerToCurrentPos = (Mf_GetPointerToCurrentPos_Func)MatchFinder_GetPointerToCurrentPos;
|
|
1669
1090
|
if (!p->btMode)
|
|
1670
1091
|
{
|
|
1671
|
-
if (p->numHashBytes <= 4)
|
|
1092
|
+
/* if (p->numHashBytes <= 4) */
|
|
1672
1093
|
{
|
|
1673
|
-
vTable->GetMatches = Hc4_MatchFinder_GetMatches;
|
|
1674
|
-
vTable->Skip = Hc4_MatchFinder_Skip;
|
|
1094
|
+
vTable->GetMatches = (Mf_GetMatches_Func)Hc4_MatchFinder_GetMatches;
|
|
1095
|
+
vTable->Skip = (Mf_Skip_Func)Hc4_MatchFinder_Skip;
|
|
1675
1096
|
}
|
|
1097
|
+
/*
|
|
1676
1098
|
else
|
|
1677
1099
|
{
|
|
1678
|
-
vTable->GetMatches = Hc5_MatchFinder_GetMatches;
|
|
1679
|
-
vTable->Skip = Hc5_MatchFinder_Skip;
|
|
1100
|
+
vTable->GetMatches = (Mf_GetMatches_Func)Hc5_MatchFinder_GetMatches;
|
|
1101
|
+
vTable->Skip = (Mf_Skip_Func)Hc5_MatchFinder_Skip;
|
|
1680
1102
|
}
|
|
1103
|
+
*/
|
|
1681
1104
|
}
|
|
1682
1105
|
else if (p->numHashBytes == 2)
|
|
1683
1106
|
{
|
|
1684
|
-
vTable->GetMatches = Bt2_MatchFinder_GetMatches;
|
|
1685
|
-
vTable->Skip = Bt2_MatchFinder_Skip;
|
|
1107
|
+
vTable->GetMatches = (Mf_GetMatches_Func)Bt2_MatchFinder_GetMatches;
|
|
1108
|
+
vTable->Skip = (Mf_Skip_Func)Bt2_MatchFinder_Skip;
|
|
1686
1109
|
}
|
|
1687
1110
|
else if (p->numHashBytes == 3)
|
|
1688
1111
|
{
|
|
1689
|
-
vTable->GetMatches = Bt3_MatchFinder_GetMatches;
|
|
1690
|
-
vTable->Skip = Bt3_MatchFinder_Skip;
|
|
1112
|
+
vTable->GetMatches = (Mf_GetMatches_Func)Bt3_MatchFinder_GetMatches;
|
|
1113
|
+
vTable->Skip = (Mf_Skip_Func)Bt3_MatchFinder_Skip;
|
|
1691
1114
|
}
|
|
1692
|
-
else if (p->numHashBytes == 4)
|
|
1115
|
+
else /* if (p->numHashBytes == 4) */
|
|
1693
1116
|
{
|
|
1694
|
-
vTable->GetMatches = Bt4_MatchFinder_GetMatches;
|
|
1695
|
-
vTable->Skip = Bt4_MatchFinder_Skip;
|
|
1117
|
+
vTable->GetMatches = (Mf_GetMatches_Func)Bt4_MatchFinder_GetMatches;
|
|
1118
|
+
vTable->Skip = (Mf_Skip_Func)Bt4_MatchFinder_Skip;
|
|
1696
1119
|
}
|
|
1120
|
+
/*
|
|
1697
1121
|
else
|
|
1698
1122
|
{
|
|
1699
|
-
vTable->GetMatches = Bt5_MatchFinder_GetMatches;
|
|
1700
|
-
vTable->Skip = Bt5_MatchFinder_Skip;
|
|
1123
|
+
vTable->GetMatches = (Mf_GetMatches_Func)Bt5_MatchFinder_GetMatches;
|
|
1124
|
+
vTable->Skip = (Mf_Skip_Func)Bt5_MatchFinder_Skip;
|
|
1701
1125
|
}
|
|
1126
|
+
*/
|
|
1702
1127
|
}
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
void LzFindPrepare(void)
|
|
1707
|
-
{
|
|
1708
|
-
#ifndef FORCE_LZFIND_SATUR_SUB_128
|
|
1709
|
-
#ifdef USE_LZFIND_SATUR_SUB_128
|
|
1710
|
-
LZFIND_SATUR_SUB_CODE_FUNC f = NULL;
|
|
1711
|
-
#ifdef MY_CPU_ARM_OR_ARM64
|
|
1712
|
-
{
|
|
1713
|
-
if (CPU_IsSupported_NEON())
|
|
1714
|
-
{
|
|
1715
|
-
// #pragma message ("=== LzFind NEON")
|
|
1716
|
-
PRF(printf("\n=== LzFind NEON\n"));
|
|
1717
|
-
f = LzFind_SaturSub_128;
|
|
1718
|
-
}
|
|
1719
|
-
// f = 0; // for debug
|
|
1720
|
-
}
|
|
1721
|
-
#else // MY_CPU_ARM_OR_ARM64
|
|
1722
|
-
if (CPU_IsSupported_SSE41())
|
|
1723
|
-
{
|
|
1724
|
-
// #pragma message ("=== LzFind SSE41")
|
|
1725
|
-
PRF(printf("\n=== LzFind SSE41\n"));
|
|
1726
|
-
f = LzFind_SaturSub_128;
|
|
1727
|
-
|
|
1728
|
-
#ifdef USE_LZFIND_SATUR_SUB_256
|
|
1729
|
-
if (CPU_IsSupported_AVX2())
|
|
1730
|
-
{
|
|
1731
|
-
// #pragma message ("=== LzFind AVX2")
|
|
1732
|
-
PRF(printf("\n=== LzFind AVX2\n"));
|
|
1733
|
-
f = LzFind_SaturSub_256;
|
|
1734
|
-
}
|
|
1735
|
-
#endif
|
|
1736
|
-
}
|
|
1737
|
-
#endif // MY_CPU_ARM_OR_ARM64
|
|
1738
|
-
g_LzFind_SaturSub = f;
|
|
1739
|
-
#endif // USE_LZFIND_SATUR_SUB_128
|
|
1740
|
-
#endif // FORCE_LZFIND_SATUR_SUB_128
|
|
1741
|
-
}
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
#undef MOVE_POS
|
|
1745
|
-
#undef MOVE_POS_RET
|
|
1746
|
-
#undef PRF
|