7zip-native 0.0.0-stage → 0.0.1
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/LICENSE +21 -0
- package/README.md +103 -2
- package/THIRD_PARTY_NOTICES.md +23 -0
- package/bench/args.mts +69 -0
- package/bench/benchmark.mts +102 -0
- package/bench/compare.mts +546 -0
- package/bench/concurrency.mts +196 -0
- package/binding.gyp +51 -0
- package/dist/index.cjs +433 -0
- package/dist/index.d.cts +59 -0
- package/dist/index.d.mts +59 -0
- package/dist/index.d.ts +59 -0
- package/dist/index.mjs +429 -0
- package/docs/architecture.md +112 -0
- package/examples/basic.mts +19 -0
- package/native/addon.cpp +2154 -0
- package/package.json +85 -5
- package/prebuilds/linux-x64/7z.so +0 -0
- package/prebuilds/linux-x64/7zip_native.node +0 -0
- package/vendor/7zip/.gitattributes +2 -0
- package/vendor/7zip/Asm/arm/7zCrcOpt.asm +100 -0
- package/vendor/7zip/Asm/arm64/7zAsm.S +187 -0
- package/vendor/7zip/Asm/arm64/LzmaDecOpt.S +1487 -0
- package/vendor/7zip/Asm/x86/7zAsm.asm +341 -0
- package/vendor/7zip/Asm/x86/7zCrcOpt.asm +258 -0
- package/vendor/7zip/Asm/x86/AesOpt.asm +742 -0
- package/vendor/7zip/Asm/x86/LzFindOpt.asm +540 -0
- package/vendor/7zip/Asm/x86/LzmaDecOpt.asm +1339 -0
- package/vendor/7zip/Asm/x86/Sha1Opt.asm +263 -0
- package/vendor/7zip/Asm/x86/Sha256Opt.asm +275 -0
- package/vendor/7zip/Asm/x86/Sort.asm +860 -0
- package/vendor/7zip/Asm/x86/XzCrc64Opt.asm +523 -0
- package/vendor/7zip/C/7z.h +204 -0
- package/vendor/7zip/C/7zAlloc.c +89 -0
- package/vendor/7zip/C/7zAlloc.h +19 -0
- package/vendor/7zip/C/7zArcIn.c +1701 -0
- package/vendor/7zip/C/7zBuf.c +36 -0
- package/vendor/7zip/C/7zBuf.h +35 -0
- package/vendor/7zip/C/7zBuf2.c +52 -0
- package/vendor/7zip/C/7zCrc.c +420 -0
- package/vendor/7zip/C/7zCrc.h +28 -0
- package/vendor/7zip/C/7zCrcOpt.c +199 -0
- package/vendor/7zip/C/7zDec.c +672 -0
- package/vendor/7zip/C/7zFile.c +443 -0
- package/vendor/7zip/C/7zFile.h +91 -0
- package/vendor/7zip/C/7zStream.c +199 -0
- package/vendor/7zip/C/7zTypes.h +600 -0
- package/vendor/7zip/C/7zVersion.h +27 -0
- package/vendor/7zip/C/7zVersion.rc +55 -0
- package/vendor/7zip/C/7zWindows.h +107 -0
- package/vendor/7zip/C/7zip_gcc_c.mak +366 -0
- package/vendor/7zip/C/Aes.c +429 -0
- package/vendor/7zip/C/Aes.h +60 -0
- package/vendor/7zip/C/AesOpt.c +1002 -0
- package/vendor/7zip/C/Alloc.c +774 -0
- package/vendor/7zip/C/Alloc.h +76 -0
- package/vendor/7zip/C/Asm_c.mak +12 -0
- package/vendor/7zip/C/Bcj2.c +290 -0
- package/vendor/7zip/C/Bcj2.h +332 -0
- package/vendor/7zip/C/Bcj2Enc.c +509 -0
- package/vendor/7zip/C/Blake2.h +105 -0
- package/vendor/7zip/C/Blake2s.c +2672 -0
- package/vendor/7zip/C/Bra.c +709 -0
- package/vendor/7zip/C/Bra.h +105 -0
- package/vendor/7zip/C/Bra86.c +187 -0
- package/vendor/7zip/C/BraIA64.c +14 -0
- package/vendor/7zip/C/BwtSort.c +630 -0
- package/vendor/7zip/C/BwtSort.h +27 -0
- package/vendor/7zip/C/Compiler.h +287 -0
- package/vendor/7zip/C/CpuArch.c +970 -0
- package/vendor/7zip/C/CpuArch.h +719 -0
- package/vendor/7zip/C/Delta.c +169 -0
- package/vendor/7zip/C/Delta.h +19 -0
- package/vendor/7zip/C/DllSecur.c +99 -0
- package/vendor/7zip/C/DllSecur.h +20 -0
- package/vendor/7zip/C/HuffEnc.c +361 -0
- package/vendor/7zip/C/HuffEnc.h +23 -0
- package/vendor/7zip/C/LzFind.c +1746 -0
- package/vendor/7zip/C/LzFind.h +160 -0
- package/vendor/7zip/C/LzFindMt.c +1422 -0
- package/vendor/7zip/C/LzFindMt.h +114 -0
- package/vendor/7zip/C/LzFindOpt.c +578 -0
- package/vendor/7zip/C/LzHash.h +34 -0
- package/vendor/7zip/C/Lzma2Dec.c +493 -0
- package/vendor/7zip/C/Lzma2Dec.h +121 -0
- package/vendor/7zip/C/Lzma2DecMt.c +1095 -0
- package/vendor/7zip/C/Lzma2DecMt.h +81 -0
- package/vendor/7zip/C/Lzma2Enc.c +799 -0
- package/vendor/7zip/C/Lzma2Enc.h +58 -0
- package/vendor/7zip/C/Lzma86.h +111 -0
- package/vendor/7zip/C/Lzma86Dec.c +53 -0
- package/vendor/7zip/C/Lzma86Enc.c +103 -0
- package/vendor/7zip/C/LzmaDec.c +1367 -0
- package/vendor/7zip/C/LzmaDec.h +237 -0
- package/vendor/7zip/C/LzmaEnc.c +3154 -0
- package/vendor/7zip/C/LzmaEnc.h +85 -0
- package/vendor/7zip/C/LzmaLib.c +42 -0
- package/vendor/7zip/C/LzmaLib.h +138 -0
- package/vendor/7zip/C/Md5.c +206 -0
- package/vendor/7zip/C/Md5.h +34 -0
- package/vendor/7zip/C/MtCoder.c +604 -0
- package/vendor/7zip/C/MtCoder.h +144 -0
- package/vendor/7zip/C/MtDec.c +1124 -0
- package/vendor/7zip/C/MtDec.h +202 -0
- package/vendor/7zip/C/Ppmd.h +169 -0
- package/vendor/7zip/C/Ppmd7.c +1131 -0
- package/vendor/7zip/C/Ppmd7.h +181 -0
- package/vendor/7zip/C/Ppmd7Dec.c +312 -0
- package/vendor/7zip/C/Ppmd7Enc.c +340 -0
- package/vendor/7zip/C/Ppmd7aDec.c +295 -0
- package/vendor/7zip/C/Ppmd8.c +1574 -0
- package/vendor/7zip/C/Ppmd8.h +181 -0
- package/vendor/7zip/C/Ppmd8Dec.c +295 -0
- package/vendor/7zip/C/Ppmd8Enc.c +337 -0
- package/vendor/7zip/C/Precomp.h +127 -0
- package/vendor/7zip/C/RotateDefs.h +50 -0
- package/vendor/7zip/C/Sha1.c +441 -0
- package/vendor/7zip/C/Sha1.h +86 -0
- package/vendor/7zip/C/Sha1Opt.c +424 -0
- package/vendor/7zip/C/Sha256.c +492 -0
- package/vendor/7zip/C/Sha256.h +86 -0
- package/vendor/7zip/C/Sha256Opt.c +451 -0
- package/vendor/7zip/C/Sha3.c +359 -0
- package/vendor/7zip/C/Sha3.h +36 -0
- package/vendor/7zip/C/Sha512.c +711 -0
- package/vendor/7zip/C/Sha512.h +86 -0
- package/vendor/7zip/C/Sha512Opt.c +395 -0
- package/vendor/7zip/C/Sort.c +268 -0
- package/vendor/7zip/C/Sort.h +15 -0
- package/vendor/7zip/C/SwapBytes.c +835 -0
- package/vendor/7zip/C/SwapBytes.h +17 -0
- package/vendor/7zip/C/Threads.c +826 -0
- package/vendor/7zip/C/Threads.h +260 -0
- package/vendor/7zip/C/Util/7z/7z.dsp +249 -0
- package/vendor/7zip/C/Util/7z/7z.dsw +29 -0
- package/vendor/7zip/C/Util/7z/7zMain.c +1210 -0
- package/vendor/7zip/C/Util/7z/Precomp.c +4 -0
- package/vendor/7zip/C/Util/7z/Precomp.h +13 -0
- package/vendor/7zip/C/Util/7z/makefile +44 -0
- package/vendor/7zip/C/Util/7z/makefile.gcc +32 -0
- package/vendor/7zip/C/Util/7zipInstall/7zip.ico +0 -0
- package/vendor/7zip/C/Util/7zipInstall/7zipInstall.c +1699 -0
- package/vendor/7zip/C/Util/7zipInstall/7zipInstall.dsp +248 -0
- package/vendor/7zip/C/Util/7zipInstall/7zipInstall.dsw +29 -0
- package/vendor/7zip/C/Util/7zipInstall/7zipInstall.manifest +18 -0
- package/vendor/7zip/C/Util/7zipInstall/Precomp.c +4 -0
- package/vendor/7zip/C/Util/7zipInstall/Precomp.h +13 -0
- package/vendor/7zip/C/Util/7zipInstall/makefile +47 -0
- package/vendor/7zip/C/Util/7zipInstall/resource.h +9 -0
- package/vendor/7zip/C/Util/7zipInstall/resource.rc +48 -0
- package/vendor/7zip/C/Util/7zipUninstall/7zipUninstall.c +1234 -0
- package/vendor/7zip/C/Util/7zipUninstall/7zipUninstall.dsp +132 -0
- package/vendor/7zip/C/Util/7zipUninstall/7zipUninstall.dsw +29 -0
- package/vendor/7zip/C/Util/7zipUninstall/7zipUninstall.ico +0 -0
- package/vendor/7zip/C/Util/7zipUninstall/7zipUninstall.manifest +18 -0
- package/vendor/7zip/C/Util/7zipUninstall/Precomp.c +4 -0
- package/vendor/7zip/C/Util/7zipUninstall/Precomp.h +13 -0
- package/vendor/7zip/C/Util/7zipUninstall/makefile +18 -0
- package/vendor/7zip/C/Util/7zipUninstall/resource.h +9 -0
- package/vendor/7zip/C/Util/7zipUninstall/resource.rc +48 -0
- package/vendor/7zip/C/Util/Lzma/LzmaUtil.c +313 -0
- package/vendor/7zip/C/Util/Lzma/LzmaUtil.dsp +192 -0
- package/vendor/7zip/C/Util/Lzma/LzmaUtil.dsw +29 -0
- package/vendor/7zip/C/Util/Lzma/Precomp.h +13 -0
- package/vendor/7zip/C/Util/Lzma/makefile +30 -0
- package/vendor/7zip/C/Util/Lzma/makefile.gcc +21 -0
- package/vendor/7zip/C/Util/LzmaLib/LzmaLib.def +4 -0
- package/vendor/7zip/C/Util/LzmaLib/LzmaLib.dsp +206 -0
- package/vendor/7zip/C/Util/LzmaLib/LzmaLib.dsw +29 -0
- package/vendor/7zip/C/Util/LzmaLib/LzmaLibExports.c +15 -0
- package/vendor/7zip/C/Util/LzmaLib/Precomp.c +4 -0
- package/vendor/7zip/C/Util/LzmaLib/Precomp.h +13 -0
- package/vendor/7zip/C/Util/LzmaLib/makefile +59 -0
- package/vendor/7zip/C/Util/LzmaLib/resource.rc +3 -0
- package/vendor/7zip/C/Util/SfxSetup/Precomp.c +4 -0
- package/vendor/7zip/C/Util/SfxSetup/Precomp.h +13 -0
- package/vendor/7zip/C/Util/SfxSetup/SfxSetup.c +657 -0
- package/vendor/7zip/C/Util/SfxSetup/SfxSetup.dsp +231 -0
- package/vendor/7zip/C/Util/SfxSetup/SfxSetup.dsw +29 -0
- package/vendor/7zip/C/Util/SfxSetup/makefile +44 -0
- package/vendor/7zip/C/Util/SfxSetup/makefile_con +40 -0
- package/vendor/7zip/C/Util/SfxSetup/resource.rc +5 -0
- package/vendor/7zip/C/Util/SfxSetup/setup.ico +0 -0
- package/vendor/7zip/C/Xxh64.c +389 -0
- package/vendor/7zip/C/Xxh64.h +50 -0
- package/vendor/7zip/C/Xz.c +92 -0
- package/vendor/7zip/C/Xz.h +542 -0
- package/vendor/7zip/C/XzCrc64.c +140 -0
- package/vendor/7zip/C/XzCrc64.h +26 -0
- package/vendor/7zip/C/XzCrc64Opt.c +261 -0
- package/vendor/7zip/C/XzDec.c +2865 -0
- package/vendor/7zip/C/XzEnc.c +1374 -0
- package/vendor/7zip/C/XzEnc.h +62 -0
- package/vendor/7zip/C/XzIn.c +385 -0
- package/vendor/7zip/C/ZstdDec.c +4067 -0
- package/vendor/7zip/C/ZstdDec.h +173 -0
- package/vendor/7zip/C/var_clang.mak +11 -0
- package/vendor/7zip/C/var_clang_arm64.mak +12 -0
- package/vendor/7zip/C/var_clang_x64.mak +11 -0
- package/vendor/7zip/C/var_clang_x86.mak +11 -0
- package/vendor/7zip/C/var_gcc.mak +12 -0
- package/vendor/7zip/C/var_gcc_arm64.mak +12 -0
- package/vendor/7zip/C/var_gcc_x64.mak +10 -0
- package/vendor/7zip/C/var_gcc_x86.mak +10 -0
- package/vendor/7zip/C/var_mac_arm64.mak +13 -0
- package/vendor/7zip/C/var_mac_x64.mak +13 -0
- package/vendor/7zip/C/warn_clang.mak +1 -0
- package/vendor/7zip/C/warn_clang_mac.mak +1 -0
- package/vendor/7zip/C/warn_gcc.mak +51 -0
- package/vendor/7zip/CPP/7zip/7zip.mak +240 -0
- package/vendor/7zip/CPP/7zip/7zip_gcc.mak +1376 -0
- package/vendor/7zip/CPP/7zip/Aes.mak +10 -0
- package/vendor/7zip/CPP/7zip/Archive/7z/7z.dsp +650 -0
- package/vendor/7zip/CPP/7zip/Archive/7z/7z.dsw +29 -0
- package/vendor/7zip/CPP/7zip/Archive/7z/7zCompressionMode.cpp +3 -0
- package/vendor/7zip/CPP/7zip/Archive/7z/7zCompressionMode.h +92 -0
- package/vendor/7zip/CPP/7zip/Archive/7z/7zDecode.cpp +599 -0
- package/vendor/7zip/CPP/7zip/Archive/7z/7zDecode.h +73 -0
- package/vendor/7zip/CPP/7zip/Archive/7z/7zEncode.cpp +702 -0
- package/vendor/7zip/CPP/7zip/Archive/7z/7zEncode.h +95 -0
- package/vendor/7zip/CPP/7zip/Archive/7z/7zExtract.cpp +444 -0
- package/vendor/7zip/CPP/7zip/Archive/7z/7zFolderInStream.cpp +264 -0
- package/vendor/7zip/CPP/7zip/Archive/7z/7zFolderInStream.h +101 -0
- package/vendor/7zip/CPP/7zip/Archive/7z/7zHandler.cpp +800 -0
- package/vendor/7zip/CPP/7zip/Archive/7z/7zHandler.h +178 -0
- package/vendor/7zip/CPP/7zip/Archive/7z/7zHandlerOut.cpp +1162 -0
- package/vendor/7zip/CPP/7zip/Archive/7z/7zHeader.cpp +19 -0
- package/vendor/7zip/CPP/7zip/Archive/7z/7zHeader.h +156 -0
- package/vendor/7zip/CPP/7zip/Archive/7z/7zIn.cpp +1815 -0
- package/vendor/7zip/CPP/7zip/Archive/7z/7zIn.h +454 -0
- package/vendor/7zip/CPP/7zip/Archive/7z/7zItem.h +207 -0
- package/vendor/7zip/CPP/7zip/Archive/7z/7zOut.cpp +1026 -0
- package/vendor/7zip/CPP/7zip/Archive/7z/7zOut.h +346 -0
- package/vendor/7zip/CPP/7zip/Archive/7z/7zProperties.cpp +182 -0
- package/vendor/7zip/CPP/7zip/Archive/7z/7zProperties.h +26 -0
- package/vendor/7zip/CPP/7zip/Archive/7z/7zRegister.cpp +27 -0
- package/vendor/7zip/CPP/7zip/Archive/7z/7zSpecStream.cpp +31 -0
- package/vendor/7zip/CPP/7zip/Archive/7z/7zSpecStream.h +49 -0
- package/vendor/7zip/CPP/7zip/Archive/7z/7zUpdate.cpp +3087 -0
- package/vendor/7zip/CPP/7zip/Archive/7z/7zUpdate.h +167 -0
- package/vendor/7zip/CPP/7zip/Archive/7z/StdAfx.cpp +3 -0
- package/vendor/7zip/CPP/7zip/Archive/7z/StdAfx.h +11 -0
- package/vendor/7zip/CPP/7zip/Archive/7z/makefile +81 -0
- package/vendor/7zip/CPP/7zip/Archive/7z/resource.rc +11 -0
- package/vendor/7zip/CPP/7zip/Archive/ApfsHandler.cpp +4470 -0
- package/vendor/7zip/CPP/7zip/Archive/ApmHandler.cpp +420 -0
- package/vendor/7zip/CPP/7zip/Archive/ArHandler.cpp +844 -0
- package/vendor/7zip/CPP/7zip/Archive/Archive.def +15 -0
- package/vendor/7zip/CPP/7zip/Archive/Archive2.def +22 -0
- package/vendor/7zip/CPP/7zip/Archive/ArchiveExports.cpp +158 -0
- package/vendor/7zip/CPP/7zip/Archive/ArjHandler.cpp +977 -0
- package/vendor/7zip/CPP/7zip/Archive/AvbHandler.cpp +616 -0
- package/vendor/7zip/CPP/7zip/Archive/Base64Handler.cpp +488 -0
- package/vendor/7zip/CPP/7zip/Archive/Bz2Handler.cpp +482 -0
- package/vendor/7zip/CPP/7zip/Archive/Cab/CabBlockInStream.cpp +122 -0
- package/vendor/7zip/CPP/7zip/Archive/Cab/CabBlockInStream.h +28 -0
- package/vendor/7zip/CPP/7zip/Archive/Cab/CabHandler.cpp +1270 -0
- package/vendor/7zip/CPP/7zip/Archive/Cab/CabHandler.h +29 -0
- package/vendor/7zip/CPP/7zip/Archive/Cab/CabHeader.cpp +15 -0
- package/vendor/7zip/CPP/7zip/Archive/Cab/CabHeader.h +41 -0
- package/vendor/7zip/CPP/7zip/Archive/Cab/CabIn.cpp +485 -0
- package/vendor/7zip/CPP/7zip/Archive/Cab/CabIn.h +169 -0
- package/vendor/7zip/CPP/7zip/Archive/Cab/CabItem.h +69 -0
- package/vendor/7zip/CPP/7zip/Archive/Cab/CabRegister.cpp +19 -0
- package/vendor/7zip/CPP/7zip/Archive/Cab/StdAfx.h +11 -0
- package/vendor/7zip/CPP/7zip/Archive/Chm/ChmHandler.cpp +790 -0
- package/vendor/7zip/CPP/7zip/Archive/Chm/ChmHandler.h +27 -0
- package/vendor/7zip/CPP/7zip/Archive/Chm/ChmIn.cpp +1026 -0
- package/vendor/7zip/CPP/7zip/Archive/Chm/ChmIn.h +282 -0
- package/vendor/7zip/CPP/7zip/Archive/Chm/StdAfx.h +11 -0
- package/vendor/7zip/CPP/7zip/Archive/ComHandler.cpp +1449 -0
- package/vendor/7zip/CPP/7zip/Archive/Common/CoderMixer2.cpp +1144 -0
- package/vendor/7zip/CPP/7zip/Archive/Common/CoderMixer2.h +447 -0
- package/vendor/7zip/CPP/7zip/Archive/Common/DummyOutStream.cpp +17 -0
- package/vendor/7zip/CPP/7zip/Archive/Common/DummyOutStream.h +23 -0
- package/vendor/7zip/CPP/7zip/Archive/Common/FindSignature.cpp +90 -0
- package/vendor/7zip/CPP/7zip/Archive/Common/FindSignature.h +12 -0
- package/vendor/7zip/CPP/7zip/Archive/Common/HandlerOut.cpp +315 -0
- package/vendor/7zip/CPP/7zip/Archive/Common/HandlerOut.h +169 -0
- package/vendor/7zip/CPP/7zip/Archive/Common/InStreamWithCRC.cpp +57 -0
- package/vendor/7zip/CPP/7zip/Archive/Common/InStreamWithCRC.h +64 -0
- package/vendor/7zip/CPP/7zip/Archive/Common/ItemNameUtils.cpp +140 -0
- package/vendor/7zip/CPP/7zip/Archive/Common/ItemNameUtils.h +33 -0
- package/vendor/7zip/CPP/7zip/Archive/Common/MultiStream.cpp +193 -0
- package/vendor/7zip/CPP/7zip/Archive/Common/MultiStream.h +86 -0
- package/vendor/7zip/CPP/7zip/Archive/Common/OutStreamWithCRC.cpp +18 -0
- package/vendor/7zip/CPP/7zip/Archive/Common/OutStreamWithCRC.h +35 -0
- package/vendor/7zip/CPP/7zip/Archive/Common/OutStreamWithSha1.cpp +29 -0
- package/vendor/7zip/CPP/7zip/Archive/Common/OutStreamWithSha1.h +61 -0
- package/vendor/7zip/CPP/7zip/Archive/Common/ParseProperties.cpp +3 -0
- package/vendor/7zip/CPP/7zip/Archive/Common/ParseProperties.h +6 -0
- package/vendor/7zip/CPP/7zip/Archive/Common/StdAfx.h +11 -0
- package/vendor/7zip/CPP/7zip/Archive/CpioHandler.cpp +1110 -0
- package/vendor/7zip/CPP/7zip/Archive/CramfsHandler.cpp +784 -0
- package/vendor/7zip/CPP/7zip/Archive/DeflateProps.cpp +3 -0
- package/vendor/7zip/CPP/7zip/Archive/DeflateProps.h +6 -0
- package/vendor/7zip/CPP/7zip/Archive/DllExports.cpp +96 -0
- package/vendor/7zip/CPP/7zip/Archive/DllExports2.cpp +184 -0
- package/vendor/7zip/CPP/7zip/Archive/DmgHandler.cpp +2336 -0
- package/vendor/7zip/CPP/7zip/Archive/ElfHandler.cpp +1284 -0
- package/vendor/7zip/CPP/7zip/Archive/ExtHandler.cpp +2860 -0
- package/vendor/7zip/CPP/7zip/Archive/FatHandler.cpp +1325 -0
- package/vendor/7zip/CPP/7zip/Archive/FlvHandler.cpp +521 -0
- package/vendor/7zip/CPP/7zip/Archive/GptHandler.cpp +473 -0
- package/vendor/7zip/CPP/7zip/Archive/GzHandler.cpp +1200 -0
- package/vendor/7zip/CPP/7zip/Archive/HandlerCont.cpp +320 -0
- package/vendor/7zip/CPP/7zip/Archive/HandlerCont.h +134 -0
- package/vendor/7zip/CPP/7zip/Archive/HfsHandler.cpp +2631 -0
- package/vendor/7zip/CPP/7zip/Archive/HfsHandler.h +87 -0
- package/vendor/7zip/CPP/7zip/Archive/IArchive.h +755 -0
- package/vendor/7zip/CPP/7zip/Archive/Icons/7z.ico +0 -0
- package/vendor/7zip/CPP/7zip/Archive/Icons/apfs.ico +0 -0
- package/vendor/7zip/CPP/7zip/Archive/Icons/arj.ico +0 -0
- package/vendor/7zip/CPP/7zip/Archive/Icons/bz2.ico +0 -0
- package/vendor/7zip/CPP/7zip/Archive/Icons/cab.ico +0 -0
- package/vendor/7zip/CPP/7zip/Archive/Icons/cpio.ico +0 -0
- package/vendor/7zip/CPP/7zip/Archive/Icons/deb.ico +0 -0
- package/vendor/7zip/CPP/7zip/Archive/Icons/dmg.ico +0 -0
- package/vendor/7zip/CPP/7zip/Archive/Icons/fat.ico +0 -0
- package/vendor/7zip/CPP/7zip/Archive/Icons/gz.ico +0 -0
- package/vendor/7zip/CPP/7zip/Archive/Icons/hfs.ico +0 -0
- package/vendor/7zip/CPP/7zip/Archive/Icons/iso.ico +0 -0
- package/vendor/7zip/CPP/7zip/Archive/Icons/lzh.ico +0 -0
- package/vendor/7zip/CPP/7zip/Archive/Icons/lzma.ico +0 -0
- package/vendor/7zip/CPP/7zip/Archive/Icons/ntfs.ico +0 -0
- package/vendor/7zip/CPP/7zip/Archive/Icons/rar.ico +0 -0
- package/vendor/7zip/CPP/7zip/Archive/Icons/rpm.ico +0 -0
- package/vendor/7zip/CPP/7zip/Archive/Icons/split.ico +0 -0
- package/vendor/7zip/CPP/7zip/Archive/Icons/squashfs.ico +0 -0
- package/vendor/7zip/CPP/7zip/Archive/Icons/tar.ico +0 -0
- package/vendor/7zip/CPP/7zip/Archive/Icons/vhd.ico +0 -0
- package/vendor/7zip/CPP/7zip/Archive/Icons/wim.ico +0 -0
- package/vendor/7zip/CPP/7zip/Archive/Icons/xar.ico +0 -0
- package/vendor/7zip/CPP/7zip/Archive/Icons/xz.ico +0 -0
- package/vendor/7zip/CPP/7zip/Archive/Icons/z.ico +0 -0
- package/vendor/7zip/CPP/7zip/Archive/Icons/zip.ico +0 -0
- package/vendor/7zip/CPP/7zip/Archive/Icons/zst.ico +0 -0
- package/vendor/7zip/CPP/7zip/Archive/IhexHandler.cpp +493 -0
- package/vendor/7zip/CPP/7zip/Archive/Iso/IsoHandler.cpp +498 -0
- package/vendor/7zip/CPP/7zip/Archive/Iso/IsoHandler.h +24 -0
- package/vendor/7zip/CPP/7zip/Archive/Iso/IsoHeader.cpp +12 -0
- package/vendor/7zip/CPP/7zip/Archive/Iso/IsoHeader.h +64 -0
- package/vendor/7zip/CPP/7zip/Archive/Iso/IsoIn.cpp +801 -0
- package/vendor/7zip/CPP/7zip/Archive/Iso/IsoIn.h +328 -0
- package/vendor/7zip/CPP/7zip/Archive/Iso/IsoItem.h +316 -0
- package/vendor/7zip/CPP/7zip/Archive/Iso/IsoRegister.cpp +21 -0
- package/vendor/7zip/CPP/7zip/Archive/Iso/StdAfx.h +11 -0
- package/vendor/7zip/CPP/7zip/Archive/LpHandler.cpp +1172 -0
- package/vendor/7zip/CPP/7zip/Archive/LvmHandler.cpp +1108 -0
- package/vendor/7zip/CPP/7zip/Archive/LzhHandler.cpp +719 -0
- package/vendor/7zip/CPP/7zip/Archive/LzmaHandler.cpp +606 -0
- package/vendor/7zip/CPP/7zip/Archive/MachoHandler.cpp +1075 -0
- package/vendor/7zip/CPP/7zip/Archive/MbrHandler.cpp +648 -0
- package/vendor/7zip/CPP/7zip/Archive/MslzHandler.cpp +389 -0
- package/vendor/7zip/CPP/7zip/Archive/MubHandler.cpp +248 -0
- package/vendor/7zip/CPP/7zip/Archive/Nsis/NsisDecode.cpp +295 -0
- package/vendor/7zip/CPP/7zip/Archive/Nsis/NsisDecode.h +97 -0
- package/vendor/7zip/CPP/7zip/Archive/Nsis/NsisHandler.cpp +703 -0
- package/vendor/7zip/CPP/7zip/Archive/Nsis/NsisHandler.h +30 -0
- package/vendor/7zip/CPP/7zip/Archive/Nsis/NsisIn.cpp +6231 -0
- package/vendor/7zip/CPP/7zip/Archive/Nsis/NsisIn.h +462 -0
- package/vendor/7zip/CPP/7zip/Archive/Nsis/NsisRegister.cpp +20 -0
- package/vendor/7zip/CPP/7zip/Archive/Nsis/StdAfx.h +11 -0
- package/vendor/7zip/CPP/7zip/Archive/NtfsHandler.cpp +2944 -0
- package/vendor/7zip/CPP/7zip/Archive/PeHandler.cpp +3427 -0
- package/vendor/7zip/CPP/7zip/Archive/PpmdHandler.cpp +414 -0
- package/vendor/7zip/CPP/7zip/Archive/QcowHandler.cpp +713 -0
- package/vendor/7zip/CPP/7zip/Archive/Rar/Rar5Handler.cpp +3483 -0
- package/vendor/7zip/CPP/7zip/Archive/Rar/Rar5Handler.h +527 -0
- package/vendor/7zip/CPP/7zip/Archive/Rar/RarHandler.cpp +1775 -0
- package/vendor/7zip/CPP/7zip/Archive/Rar/RarHandler.h +115 -0
- package/vendor/7zip/CPP/7zip/Archive/Rar/RarHeader.h +209 -0
- package/vendor/7zip/CPP/7zip/Archive/Rar/RarItem.h +97 -0
- package/vendor/7zip/CPP/7zip/Archive/Rar/RarVol.h +136 -0
- package/vendor/7zip/CPP/7zip/Archive/Rar/StdAfx.cpp +3 -0
- package/vendor/7zip/CPP/7zip/Archive/Rar/StdAfx.h +11 -0
- package/vendor/7zip/CPP/7zip/Archive/RpmHandler.cpp +775 -0
- package/vendor/7zip/CPP/7zip/Archive/SparseHandler.cpp +558 -0
- package/vendor/7zip/CPP/7zip/Archive/SplitHandler.cpp +353 -0
- package/vendor/7zip/CPP/7zip/Archive/SquashfsHandler.cpp +2373 -0
- package/vendor/7zip/CPP/7zip/Archive/StdAfx.h +11 -0
- package/vendor/7zip/CPP/7zip/Archive/SwfHandler.cpp +996 -0
- package/vendor/7zip/CPP/7zip/Archive/Tar/StdAfx.h +11 -0
- package/vendor/7zip/CPP/7zip/Archive/Tar/TarHandler.cpp +1105 -0
- package/vendor/7zip/CPP/7zip/Archive/Tar/TarHandler.h +57 -0
- package/vendor/7zip/CPP/7zip/Archive/Tar/TarHandlerOut.cpp +332 -0
- package/vendor/7zip/CPP/7zip/Archive/Tar/TarHeader.cpp +99 -0
- package/vendor/7zip/CPP/7zip/Archive/Tar/TarHeader.h +90 -0
- package/vendor/7zip/CPP/7zip/Archive/Tar/TarIn.cpp +1151 -0
- package/vendor/7zip/CPP/7zip/Archive/Tar/TarIn.h +151 -0
- package/vendor/7zip/CPP/7zip/Archive/Tar/TarItem.h +365 -0
- package/vendor/7zip/CPP/7zip/Archive/Tar/TarOut.cpp +644 -0
- package/vendor/7zip/CPP/7zip/Archive/Tar/TarOut.h +53 -0
- package/vendor/7zip/CPP/7zip/Archive/Tar/TarRegister.cpp +31 -0
- package/vendor/7zip/CPP/7zip/Archive/Tar/TarUpdate.cpp +563 -0
- package/vendor/7zip/CPP/7zip/Archive/Tar/TarUpdate.h +74 -0
- package/vendor/7zip/CPP/7zip/Archive/Udf/StdAfx.h +11 -0
- package/vendor/7zip/CPP/7zip/Archive/Udf/UdfHandler.cpp +427 -0
- package/vendor/7zip/CPP/7zip/Archive/Udf/UdfHandler.h +32 -0
- package/vendor/7zip/CPP/7zip/Archive/Udf/UdfIn.cpp +1756 -0
- package/vendor/7zip/CPP/7zip/Archive/Udf/UdfIn.h +508 -0
- package/vendor/7zip/CPP/7zip/Archive/UefiHandler.cpp +1884 -0
- package/vendor/7zip/CPP/7zip/Archive/VdiHandler.cpp +433 -0
- package/vendor/7zip/CPP/7zip/Archive/VhdHandler.cpp +1106 -0
- package/vendor/7zip/CPP/7zip/Archive/VhdxHandler.cpp +2085 -0
- package/vendor/7zip/CPP/7zip/Archive/VmdkHandler.cpp +1530 -0
- package/vendor/7zip/CPP/7zip/Archive/Wim/StdAfx.h +11 -0
- package/vendor/7zip/CPP/7zip/Archive/Wim/WimHandler.cpp +1291 -0
- package/vendor/7zip/CPP/7zip/Archive/Wim/WimHandler.h +117 -0
- package/vendor/7zip/CPP/7zip/Archive/Wim/WimHandlerOut.cpp +2008 -0
- package/vendor/7zip/CPP/7zip/Archive/Wim/WimIn.cpp +2104 -0
- package/vendor/7zip/CPP/7zip/Archive/Wim/WimIn.h +719 -0
- package/vendor/7zip/CPP/7zip/Archive/Wim/WimRegister.cpp +29 -0
- package/vendor/7zip/CPP/7zip/Archive/XarHandler.cpp +1316 -0
- package/vendor/7zip/CPP/7zip/Archive/XzHandler.cpp +1452 -0
- package/vendor/7zip/CPP/7zip/Archive/XzHandler.h +11 -0
- package/vendor/7zip/CPP/7zip/Archive/ZHandler.cpp +208 -0
- package/vendor/7zip/CPP/7zip/Archive/Zip/StdAfx.h +11 -0
- package/vendor/7zip/CPP/7zip/Archive/Zip/ZipAddCommon.cpp +484 -0
- package/vendor/7zip/CPP/7zip/Archive/Zip/ZipAddCommon.h +76 -0
- package/vendor/7zip/CPP/7zip/Archive/Zip/ZipCompressionMode.h +62 -0
- package/vendor/7zip/CPP/7zip/Archive/Zip/ZipHandler.cpp +1679 -0
- package/vendor/7zip/CPP/7zip/Archive/Zip/ZipHandler.h +94 -0
- package/vendor/7zip/CPP/7zip/Archive/Zip/ZipHandlerOut.cpp +626 -0
- package/vendor/7zip/CPP/7zip/Archive/Zip/ZipHeader.h +201 -0
- package/vendor/7zip/CPP/7zip/Archive/Zip/ZipIn.cpp +3474 -0
- package/vendor/7zip/CPP/7zip/Archive/Zip/ZipIn.h +456 -0
- package/vendor/7zip/CPP/7zip/Archive/Zip/ZipItem.cpp +464 -0
- package/vendor/7zip/CPP/7zip/Archive/Zip/ZipItem.h +356 -0
- package/vendor/7zip/CPP/7zip/Archive/Zip/ZipOut.cpp +428 -0
- package/vendor/7zip/CPP/7zip/Archive/Zip/ZipOut.h +103 -0
- package/vendor/7zip/CPP/7zip/Archive/Zip/ZipRegister.cpp +38 -0
- package/vendor/7zip/CPP/7zip/Archive/Zip/ZipUpdate.cpp +2165 -0
- package/vendor/7zip/CPP/7zip/Archive/Zip/ZipUpdate.h +107 -0
- package/vendor/7zip/CPP/7zip/Archive/ZstdHandler.cpp +1147 -0
- package/vendor/7zip/CPP/7zip/Archive/makefile +23 -0
- package/vendor/7zip/CPP/7zip/Asm.mak +12 -0
- package/vendor/7zip/CPP/7zip/Bundles/Alone/Alone.dsp +3324 -0
- package/vendor/7zip/CPP/7zip/Bundles/Alone/Alone.dsw +29 -0
- package/vendor/7zip/CPP/7zip/Bundles/Alone/StdAfx.cpp +3 -0
- package/vendor/7zip/CPP/7zip/Bundles/Alone/StdAfx.h +11 -0
- package/vendor/7zip/CPP/7zip/Bundles/Alone/makefile +245 -0
- package/vendor/7zip/CPP/7zip/Bundles/Alone/makefile.gcc +354 -0
- package/vendor/7zip/CPP/7zip/Bundles/Alone/resource.rc +7 -0
- package/vendor/7zip/CPP/7zip/Bundles/Alone2/StdAfx.cpp +3 -0
- package/vendor/7zip/CPP/7zip/Bundles/Alone2/StdAfx.h +11 -0
- package/vendor/7zip/CPP/7zip/Bundles/Alone2/makefile +31 -0
- package/vendor/7zip/CPP/7zip/Bundles/Alone2/makefile.gcc +108 -0
- package/vendor/7zip/CPP/7zip/Bundles/Alone2/resource.rc +7 -0
- package/vendor/7zip/CPP/7zip/Bundles/Alone7z/Alone.dsp +2090 -0
- package/vendor/7zip/CPP/7zip/Bundles/Alone7z/Alone.dsw +29 -0
- package/vendor/7zip/CPP/7zip/Bundles/Alone7z/StdAfx.cpp +3 -0
- package/vendor/7zip/CPP/7zip/Bundles/Alone7z/StdAfx.h +11 -0
- package/vendor/7zip/CPP/7zip/Bundles/Alone7z/makefile +168 -0
- package/vendor/7zip/CPP/7zip/Bundles/Alone7z/makefile.gcc +276 -0
- package/vendor/7zip/CPP/7zip/Bundles/Alone7z/resource.rc +7 -0
- package/vendor/7zip/CPP/7zip/Bundles/Fm/FM.dsp +2275 -0
- package/vendor/7zip/CPP/7zip/Bundles/Fm/FM.dsw +29 -0
- package/vendor/7zip/CPP/7zip/Bundles/Fm/StdAfx.cpp +3 -0
- package/vendor/7zip/CPP/7zip/Bundles/Fm/StdAfx.h +6 -0
- package/vendor/7zip/CPP/7zip/Bundles/Fm/makefile +82 -0
- package/vendor/7zip/CPP/7zip/Bundles/Fm/resource.rc +7 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7z/StdAfx.cpp +3 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7z/StdAfx.h +11 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7z/makefile +148 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7z/resource.rc +5 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zExtract/StdAfx.cpp +3 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zExtract/StdAfx.h +11 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zExtract/makefile +116 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zExtract/resource.rc +5 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zExtractR/StdAfx.cpp +3 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zExtractR/StdAfx.h +11 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zExtractR/makefile +98 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zExtractR/resource.rc +5 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/Arc.mak +310 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/Arc_gcc.mak +395 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/Format7z.dsp +3486 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/Format7z.dsw +29 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/StdAfx.cpp +3 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/StdAfx.h +11 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/makefile +20 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/makefile.gcc +55 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/resource.rc +39 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zR/StdAfx.cpp +3 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zR/StdAfx.h +11 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zR/makefile +121 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zR/resource.rc +5 -0
- package/vendor/7zip/CPP/7zip/Bundles/LzmaCon/LzmaAlone.cpp +815 -0
- package/vendor/7zip/CPP/7zip/Bundles/LzmaCon/LzmaCon.dsp +540 -0
- package/vendor/7zip/CPP/7zip/Bundles/LzmaCon/LzmaCon.dsw +29 -0
- package/vendor/7zip/CPP/7zip/Bundles/LzmaCon/StdAfx.cpp +3 -0
- package/vendor/7zip/CPP/7zip/Bundles/LzmaCon/StdAfx.h +11 -0
- package/vendor/7zip/CPP/7zip/Bundles/LzmaCon/makefile +68 -0
- package/vendor/7zip/CPP/7zip/Bundles/LzmaCon/makefile.gcc +131 -0
- package/vendor/7zip/CPP/7zip/Bundles/LzmaCon/resource.rc +3 -0
- package/vendor/7zip/CPP/7zip/Bundles/SFXCon/7z.ico +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/SFXCon/SFXCon.dsp +1017 -0
- package/vendor/7zip/CPP/7zip/Bundles/SFXCon/SFXCon.dsw +29 -0
- package/vendor/7zip/CPP/7zip/Bundles/SFXCon/SfxCon.cpp +521 -0
- package/vendor/7zip/CPP/7zip/Bundles/SFXCon/StdAfx.cpp +3 -0
- package/vendor/7zip/CPP/7zip/Bundles/SFXCon/StdAfx.h +11 -0
- package/vendor/7zip/CPP/7zip/Bundles/SFXCon/makefile +137 -0
- package/vendor/7zip/CPP/7zip/Bundles/SFXCon/makefile.gcc +215 -0
- package/vendor/7zip/CPP/7zip/Bundles/SFXCon/resource.rc +9 -0
- package/vendor/7zip/CPP/7zip/Bundles/SFXSetup/ExtractCallbackSfx.cpp +246 -0
- package/vendor/7zip/CPP/7zip/Bundles/SFXSetup/ExtractCallbackSfx.h +83 -0
- package/vendor/7zip/CPP/7zip/Bundles/SFXSetup/ExtractEngine.cpp +135 -0
- package/vendor/7zip/CPP/7zip/Bundles/SFXSetup/ExtractEngine.h +11 -0
- package/vendor/7zip/CPP/7zip/Bundles/SFXSetup/SFXSetup.dsp +872 -0
- package/vendor/7zip/CPP/7zip/Bundles/SFXSetup/SFXSetup.dsw +29 -0
- package/vendor/7zip/CPP/7zip/Bundles/SFXSetup/SfxSetup.cpp +359 -0
- package/vendor/7zip/CPP/7zip/Bundles/SFXSetup/StdAfx.cpp +3 -0
- package/vendor/7zip/CPP/7zip/Bundles/SFXSetup/StdAfx.h +6 -0
- package/vendor/7zip/CPP/7zip/Bundles/SFXSetup/makefile +121 -0
- package/vendor/7zip/CPP/7zip/Bundles/SFXSetup/resource.h +6 -0
- package/vendor/7zip/CPP/7zip/Bundles/SFXSetup/resource.rc +16 -0
- package/vendor/7zip/CPP/7zip/Bundles/SFXSetup/setup.ico +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/SFXWin/7z.ico +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/SFXWin/SFXWin.dsp +1074 -0
- package/vendor/7zip/CPP/7zip/Bundles/SFXWin/SFXWin.dsw +29 -0
- package/vendor/7zip/CPP/7zip/Bundles/SFXWin/SfxWin.cpp +268 -0
- package/vendor/7zip/CPP/7zip/Bundles/SFXWin/StdAfx.cpp +3 -0
- package/vendor/7zip/CPP/7zip/Bundles/SFXWin/StdAfx.h +6 -0
- package/vendor/7zip/CPP/7zip/Bundles/SFXWin/makefile +159 -0
- package/vendor/7zip/CPP/7zip/Bundles/SFXWin/resource.h +1 -0
- package/vendor/7zip/CPP/7zip/Bundles/SFXWin/resource.rc +55 -0
- package/vendor/7zip/CPP/7zip/Bundles/makefile +19 -0
- package/vendor/7zip/CPP/7zip/Common/CWrappers.cpp +358 -0
- package/vendor/7zip/CPP/7zip/Common/CWrappers.h +182 -0
- package/vendor/7zip/CPP/7zip/Common/CreateCoder.cpp +548 -0
- package/vendor/7zip/CPP/7zip/Common/CreateCoder.h +200 -0
- package/vendor/7zip/CPP/7zip/Common/FilePathAutoRename.cpp +46 -0
- package/vendor/7zip/CPP/7zip/Common/FilePathAutoRename.h +10 -0
- package/vendor/7zip/CPP/7zip/Common/FileStreams.cpp +923 -0
- package/vendor/7zip/CPP/7zip/Common/FileStreams.h +205 -0
- package/vendor/7zip/CPP/7zip/Common/FilterCoder.cpp +582 -0
- package/vendor/7zip/CPP/7zip/Common/FilterCoder.h +201 -0
- package/vendor/7zip/CPP/7zip/Common/InBuffer.cpp +182 -0
- package/vendor/7zip/CPP/7zip/Common/InBuffer.h +121 -0
- package/vendor/7zip/CPP/7zip/Common/InOutTempBuffer.cpp +237 -0
- package/vendor/7zip/CPP/7zip/Common/InOutTempBuffer.h +45 -0
- package/vendor/7zip/CPP/7zip/Common/LimitedStreams.cpp +395 -0
- package/vendor/7zip/CPP/7zip/Common/LimitedStreams.h +221 -0
- package/vendor/7zip/CPP/7zip/Common/LockedStream.cpp +3 -0
- package/vendor/7zip/CPP/7zip/Common/LockedStream.h +6 -0
- package/vendor/7zip/CPP/7zip/Common/MemBlocks.cpp +215 -0
- package/vendor/7zip/CPP/7zip/Common/MemBlocks.h +72 -0
- package/vendor/7zip/CPP/7zip/Common/MethodId.cpp +3 -0
- package/vendor/7zip/CPP/7zip/Common/MethodId.h +10 -0
- package/vendor/7zip/CPP/7zip/Common/MethodProps.cpp +765 -0
- package/vendor/7zip/CPP/7zip/Common/MethodProps.h +348 -0
- package/vendor/7zip/CPP/7zip/Common/MultiOutStream.cpp +855 -0
- package/vendor/7zip/CPP/7zip/Common/MultiOutStream.h +160 -0
- package/vendor/7zip/CPP/7zip/Common/OffsetStream.cpp +37 -0
- package/vendor/7zip/CPP/7zip/Common/OffsetStream.h +22 -0
- package/vendor/7zip/CPP/7zip/Common/OutBuffer.cpp +111 -0
- package/vendor/7zip/CPP/7zip/Common/OutBuffer.h +133 -0
- package/vendor/7zip/CPP/7zip/Common/OutMemStream.cpp +158 -0
- package/vendor/7zip/CPP/7zip/Common/OutMemStream.h +104 -0
- package/vendor/7zip/CPP/7zip/Common/ProgressMt.cpp +53 -0
- package/vendor/7zip/CPP/7zip/Common/ProgressMt.h +43 -0
- package/vendor/7zip/CPP/7zip/Common/ProgressUtils.cpp +51 -0
- package/vendor/7zip/CPP/7zip/Common/ProgressUtils.h +33 -0
- package/vendor/7zip/CPP/7zip/Common/PropId.cpp +115 -0
- package/vendor/7zip/CPP/7zip/Common/RegisterArc.h +80 -0
- package/vendor/7zip/CPP/7zip/Common/RegisterCodec.h +106 -0
- package/vendor/7zip/CPP/7zip/Common/StdAfx.h +11 -0
- package/vendor/7zip/CPP/7zip/Common/StreamBinder.cpp +151 -0
- package/vendor/7zip/CPP/7zip/Common/StreamBinder.h +78 -0
- package/vendor/7zip/CPP/7zip/Common/StreamObjects.cpp +290 -0
- package/vendor/7zip/CPP/7zip/Common/StreamObjects.h +146 -0
- package/vendor/7zip/CPP/7zip/Common/StreamUtils.cpp +101 -0
- package/vendor/7zip/CPP/7zip/Common/StreamUtils.h +31 -0
- package/vendor/7zip/CPP/7zip/Common/UniqBlocks.cpp +57 -0
- package/vendor/7zip/CPP/7zip/Common/UniqBlocks.h +41 -0
- package/vendor/7zip/CPP/7zip/Common/VirtThread.cpp +47 -0
- package/vendor/7zip/CPP/7zip/Common/VirtThread.h +24 -0
- package/vendor/7zip/CPP/7zip/Compress/BZip2Const.h +71 -0
- package/vendor/7zip/CPP/7zip/Compress/BZip2Crc.cpp +28 -0
- package/vendor/7zip/CPP/7zip/Compress/BZip2Crc.h +31 -0
- package/vendor/7zip/CPP/7zip/Compress/BZip2Decoder.cpp +1777 -0
- package/vendor/7zip/CPP/7zip/Compress/BZip2Decoder.h +388 -0
- package/vendor/7zip/CPP/7zip/Compress/BZip2Encoder.cpp +1116 -0
- package/vendor/7zip/CPP/7zip/Compress/BZip2Encoder.h +273 -0
- package/vendor/7zip/CPP/7zip/Compress/BZip2Register.cpp +25 -0
- package/vendor/7zip/CPP/7zip/Compress/Bcj2Coder.cpp +867 -0
- package/vendor/7zip/CPP/7zip/Compress/Bcj2Coder.h +127 -0
- package/vendor/7zip/CPP/7zip/Compress/Bcj2Register.cpp +24 -0
- package/vendor/7zip/CPP/7zip/Compress/BcjCoder.cpp +24 -0
- package/vendor/7zip/CPP/7zip/Compress/BcjCoder.h +37 -0
- package/vendor/7zip/CPP/7zip/Compress/BcjRegister.cpp +17 -0
- package/vendor/7zip/CPP/7zip/Compress/BitlDecoder.cpp +32 -0
- package/vendor/7zip/CPP/7zip/Compress/BitlDecoder.h +225 -0
- package/vendor/7zip/CPP/7zip/Compress/BitlEncoder.h +57 -0
- package/vendor/7zip/CPP/7zip/Compress/BitmDecoder.h +106 -0
- package/vendor/7zip/CPP/7zip/Compress/BitmEncoder.h +90 -0
- package/vendor/7zip/CPP/7zip/Compress/BranchMisc.cpp +106 -0
- package/vendor/7zip/CPP/7zip/Compress/BranchMisc.h +59 -0
- package/vendor/7zip/CPP/7zip/Compress/BranchRegister.cpp +58 -0
- package/vendor/7zip/CPP/7zip/Compress/ByteSwap.cpp +91 -0
- package/vendor/7zip/CPP/7zip/Compress/Codec.def +7 -0
- package/vendor/7zip/CPP/7zip/Compress/CodecExports.cpp +378 -0
- package/vendor/7zip/CPP/7zip/Compress/CopyCoder.cpp +153 -0
- package/vendor/7zip/CPP/7zip/Compress/CopyCoder.h +34 -0
- package/vendor/7zip/CPP/7zip/Compress/CopyRegister.cpp +15 -0
- package/vendor/7zip/CPP/7zip/Compress/Deflate64Register.cpp +25 -0
- package/vendor/7zip/CPP/7zip/Compress/DeflateConst.h +131 -0
- package/vendor/7zip/CPP/7zip/Compress/DeflateDecoder.cpp +566 -0
- package/vendor/7zip/CPP/7zip/Compress/DeflateDecoder.h +154 -0
- package/vendor/7zip/CPP/7zip/Compress/DeflateEncoder.cpp +1045 -0
- package/vendor/7zip/CPP/7zip/Compress/DeflateEncoder.h +203 -0
- package/vendor/7zip/CPP/7zip/Compress/DeflateRegister.cpp +25 -0
- package/vendor/7zip/CPP/7zip/Compress/DeltaFilter.cpp +126 -0
- package/vendor/7zip/CPP/7zip/Compress/DllExports2Compress.cpp +38 -0
- package/vendor/7zip/CPP/7zip/Compress/DllExportsCompress.cpp +59 -0
- package/vendor/7zip/CPP/7zip/Compress/HuffmanDecoder.h +528 -0
- package/vendor/7zip/CPP/7zip/Compress/ImplodeDecoder.cpp +250 -0
- package/vendor/7zip/CPP/7zip/Compress/ImplodeDecoder.h +61 -0
- package/vendor/7zip/CPP/7zip/Compress/ImplodeHuffmanDecoder.cpp +3 -0
- package/vendor/7zip/CPP/7zip/Compress/ImplodeHuffmanDecoder.h +6 -0
- package/vendor/7zip/CPP/7zip/Compress/LzOutWindow.cpp +14 -0
- package/vendor/7zip/CPP/7zip/Compress/LzOutWindow.h +102 -0
- package/vendor/7zip/CPP/7zip/Compress/LzfseDecoder.cpp +950 -0
- package/vendor/7zip/CPP/7zip/Compress/LzfseDecoder.h +63 -0
- package/vendor/7zip/CPP/7zip/Compress/LzhDecoder.cpp +220 -0
- package/vendor/7zip/CPP/7zip/Compress/LzhDecoder.h +68 -0
- package/vendor/7zip/CPP/7zip/Compress/Lzma2Decoder.cpp +267 -0
- package/vendor/7zip/CPP/7zip/Compress/Lzma2Decoder.h +87 -0
- package/vendor/7zip/CPP/7zip/Compress/Lzma2Encoder.cpp +134 -0
- package/vendor/7zip/CPP/7zip/Compress/Lzma2Encoder.h +30 -0
- package/vendor/7zip/CPP/7zip/Compress/Lzma2Register.cpp +22 -0
- package/vendor/7zip/CPP/7zip/Compress/LzmaDecoder.cpp +350 -0
- package/vendor/7zip/CPP/7zip/Compress/LzmaDecoder.h +113 -0
- package/vendor/7zip/CPP/7zip/Compress/LzmaEncoder.cpp +374 -0
- package/vendor/7zip/CPP/7zip/Compress/LzmaEncoder.h +45 -0
- package/vendor/7zip/CPP/7zip/Compress/LzmaRegister.cpp +22 -0
- package/vendor/7zip/CPP/7zip/Compress/LzmsDecoder.cpp +619 -0
- package/vendor/7zip/CPP/7zip/Compress/LzmsDecoder.h +209 -0
- package/vendor/7zip/CPP/7zip/Compress/Lzx.h +61 -0
- package/vendor/7zip/CPP/7zip/Compress/LzxDecoder.cpp +1517 -0
- package/vendor/7zip/CPP/7zip/Compress/LzxDecoder.h +106 -0
- package/vendor/7zip/CPP/7zip/Compress/Mtf8.h +225 -0
- package/vendor/7zip/CPP/7zip/Compress/PpmdDecoder.cpp +219 -0
- package/vendor/7zip/CPP/7zip/Compress/PpmdDecoder.h +87 -0
- package/vendor/7zip/CPP/7zip/Compress/PpmdEncoder.cpp +193 -0
- package/vendor/7zip/CPP/7zip/Compress/PpmdEncoder.h +49 -0
- package/vendor/7zip/CPP/7zip/Compress/PpmdRegister.cpp +22 -0
- package/vendor/7zip/CPP/7zip/Compress/PpmdZip.cpp +309 -0
- package/vendor/7zip/CPP/7zip/Compress/PpmdZip.h +78 -0
- package/vendor/7zip/CPP/7zip/Compress/QuantumDecoder.cpp +355 -0
- package/vendor/7zip/CPP/7zip/Compress/QuantumDecoder.h +60 -0
- package/vendor/7zip/CPP/7zip/Compress/Rar1Decoder.cpp +518 -0
- package/vendor/7zip/CPP/7zip/Compress/Rar1Decoder.h +70 -0
- package/vendor/7zip/CPP/7zip/Compress/Rar2Decoder.cpp +472 -0
- package/vendor/7zip/CPP/7zip/Compress/Rar2Decoder.h +111 -0
- package/vendor/7zip/CPP/7zip/Compress/Rar3Decoder.cpp +939 -0
- package/vendor/7zip/CPP/7zip/Compress/Rar3Decoder.h +283 -0
- package/vendor/7zip/CPP/7zip/Compress/Rar3Vm.cpp +1153 -0
- package/vendor/7zip/CPP/7zip/Compress/Rar3Vm.h +195 -0
- package/vendor/7zip/CPP/7zip/Compress/Rar5Decoder.cpp +2060 -0
- package/vendor/7zip/CPP/7zip/Compress/Rar5Decoder.h +132 -0
- package/vendor/7zip/CPP/7zip/Compress/RarCodecsRegister.cpp +33 -0
- package/vendor/7zip/CPP/7zip/Compress/ShrinkDecoder.cpp +290 -0
- package/vendor/7zip/CPP/7zip/Compress/ShrinkDecoder.h +38 -0
- package/vendor/7zip/CPP/7zip/Compress/StdAfx.h +11 -0
- package/vendor/7zip/CPP/7zip/Compress/XpressDecoder.cpp +399 -0
- package/vendor/7zip/CPP/7zip/Compress/XpressDecoder.h +18 -0
- package/vendor/7zip/CPP/7zip/Compress/XzDecoder.cpp +151 -0
- package/vendor/7zip/CPP/7zip/Compress/XzDecoder.h +86 -0
- package/vendor/7zip/CPP/7zip/Compress/XzEncoder.cpp +243 -0
- package/vendor/7zip/CPP/7zip/Compress/XzEncoder.h +35 -0
- package/vendor/7zip/CPP/7zip/Compress/ZDecoder.cpp +392 -0
- package/vendor/7zip/CPP/7zip/Compress/ZDecoder.h +41 -0
- package/vendor/7zip/CPP/7zip/Compress/ZlibDecoder.cpp +136 -0
- package/vendor/7zip/CPP/7zip/Compress/ZlibDecoder.h +78 -0
- package/vendor/7zip/CPP/7zip/Compress/ZlibEncoder.cpp +61 -0
- package/vendor/7zip/CPP/7zip/Compress/ZlibEncoder.h +42 -0
- package/vendor/7zip/CPP/7zip/Compress/ZstdDecoder.cpp +437 -0
- package/vendor/7zip/CPP/7zip/Compress/ZstdDecoder.h +98 -0
- package/vendor/7zip/CPP/7zip/Compress/makefile +7 -0
- package/vendor/7zip/CPP/7zip/Crc.mak +8 -0
- package/vendor/7zip/CPP/7zip/Crc64.mak +8 -0
- package/vendor/7zip/CPP/7zip/Crypto/7zAes.cpp +315 -0
- package/vendor/7zip/CPP/7zip/Crypto/7zAes.h +130 -0
- package/vendor/7zip/CPP/7zip/Crypto/7zAesRegister.cpp +17 -0
- package/vendor/7zip/CPP/7zip/Crypto/Codec.def +4 -0
- package/vendor/7zip/CPP/7zip/Crypto/HmacSha1.cpp +94 -0
- package/vendor/7zip/CPP/7zip/Crypto/HmacSha1.h +31 -0
- package/vendor/7zip/CPP/7zip/Crypto/HmacSha256.cpp +53 -0
- package/vendor/7zip/CPP/7zip/Crypto/HmacSha256.h +27 -0
- package/vendor/7zip/CPP/7zip/Crypto/MyAes.cpp +277 -0
- package/vendor/7zip/CPP/7zip/Crypto/MyAes.h +122 -0
- package/vendor/7zip/CPP/7zip/Crypto/MyAesReg.cpp +29 -0
- package/vendor/7zip/CPP/7zip/Crypto/Pbkdf2HmacSha1.cpp +48 -0
- package/vendor/7zip/CPP/7zip/Crypto/Pbkdf2HmacSha1.h +19 -0
- package/vendor/7zip/CPP/7zip/Crypto/RandGen.cpp +242 -0
- package/vendor/7zip/CPP/7zip/Crypto/RandGen.h +41 -0
- package/vendor/7zip/CPP/7zip/Crypto/Rar20Crypto.cpp +130 -0
- package/vendor/7zip/CPP/7zip/Crypto/Rar20Crypto.h +54 -0
- package/vendor/7zip/CPP/7zip/Crypto/Rar5Aes.cpp +273 -0
- package/vendor/7zip/CPP/7zip/Crypto/Rar5Aes.h +97 -0
- package/vendor/7zip/CPP/7zip/Crypto/RarAes.cpp +202 -0
- package/vendor/7zip/CPP/7zip/Crypto/RarAes.h +54 -0
- package/vendor/7zip/CPP/7zip/Crypto/Sha1Cls.h +37 -0
- package/vendor/7zip/CPP/7zip/Crypto/StdAfx.h +11 -0
- package/vendor/7zip/CPP/7zip/Crypto/WzAes.cpp +231 -0
- package/vendor/7zip/CPP/7zip/Crypto/WzAes.h +161 -0
- package/vendor/7zip/CPP/7zip/Crypto/ZipCrypto.cpp +114 -0
- package/vendor/7zip/CPP/7zip/Crypto/ZipCrypto.h +80 -0
- package/vendor/7zip/CPP/7zip/Crypto/ZipStrong.cpp +265 -0
- package/vendor/7zip/CPP/7zip/Crypto/ZipStrong.h +73 -0
- package/vendor/7zip/CPP/7zip/GuiCommon.rc +119 -0
- package/vendor/7zip/CPP/7zip/Guid.txt +243 -0
- package/vendor/7zip/CPP/7zip/ICoder.h +480 -0
- package/vendor/7zip/CPP/7zip/IDecl.h +76 -0
- package/vendor/7zip/CPP/7zip/IPassword.h +54 -0
- package/vendor/7zip/CPP/7zip/IProgress.h +20 -0
- package/vendor/7zip/CPP/7zip/IStream.h +210 -0
- package/vendor/7zip/CPP/7zip/LzFindOpt.mak +7 -0
- package/vendor/7zip/CPP/7zip/LzmaDec.mak +7 -0
- package/vendor/7zip/CPP/7zip/LzmaDec_gcc.mak +14 -0
- package/vendor/7zip/CPP/7zip/MyVersion.h +2 -0
- package/vendor/7zip/CPP/7zip/MyVersionInfo.rc +2 -0
- package/vendor/7zip/CPP/7zip/PropID.h +178 -0
- package/vendor/7zip/CPP/7zip/Sha1.mak +13 -0
- package/vendor/7zip/CPP/7zip/Sha256.mak +13 -0
- package/vendor/7zip/CPP/7zip/Sort.mak +6 -0
- package/vendor/7zip/CPP/7zip/SubBuild.mak +3 -0
- package/vendor/7zip/CPP/7zip/UI/Agent/Agent.cpp +2003 -0
- package/vendor/7zip/CPP/7zip/UI/Agent/Agent.h +365 -0
- package/vendor/7zip/CPP/7zip/UI/Agent/AgentOut.cpp +776 -0
- package/vendor/7zip/CPP/7zip/UI/Agent/AgentProxy.cpp +1098 -0
- package/vendor/7zip/CPP/7zip/UI/Agent/AgentProxy.h +198 -0
- package/vendor/7zip/CPP/7zip/UI/Agent/ArchiveFolder.cpp +57 -0
- package/vendor/7zip/CPP/7zip/UI/Agent/ArchiveFolderOpen.cpp +243 -0
- package/vendor/7zip/CPP/7zip/UI/Agent/ArchiveFolderOut.cpp +457 -0
- package/vendor/7zip/CPP/7zip/UI/Agent/IFolderArchive.h +123 -0
- package/vendor/7zip/CPP/7zip/UI/Agent/StdAfx.h +11 -0
- package/vendor/7zip/CPP/7zip/UI/Agent/UpdateCallbackAgent.cpp +208 -0
- package/vendor/7zip/CPP/7zip/UI/Agent/UpdateCallbackAgent.h +22 -0
- package/vendor/7zip/CPP/7zip/UI/Client7z/Client7z.cpp +1145 -0
- package/vendor/7zip/CPP/7zip/UI/Client7z/Client7z.dsp +331 -0
- package/vendor/7zip/CPP/7zip/UI/Client7z/Client7z.dsw +29 -0
- package/vendor/7zip/CPP/7zip/UI/Client7z/StdAfx.cpp +3 -0
- package/vendor/7zip/CPP/7zip/UI/Client7z/StdAfx.h +11 -0
- package/vendor/7zip/CPP/7zip/UI/Client7z/makefile +29 -0
- package/vendor/7zip/CPP/7zip/UI/Client7z/makefile.gcc +72 -0
- package/vendor/7zip/CPP/7zip/UI/Client7z/resource.rc +3 -0
- package/vendor/7zip/CPP/7zip/UI/Common/ArchiveCommandLine.cpp +1913 -0
- package/vendor/7zip/CPP/7zip/UI/Common/ArchiveCommandLine.h +170 -0
- package/vendor/7zip/CPP/7zip/UI/Common/ArchiveExtractCallback.cpp +3243 -0
- package/vendor/7zip/CPP/7zip/UI/Common/ArchiveExtractCallback.h +640 -0
- package/vendor/7zip/CPP/7zip/UI/Common/ArchiveName.cpp +176 -0
- package/vendor/7zip/CPP/7zip/UI/Common/ArchiveName.h +16 -0
- package/vendor/7zip/CPP/7zip/UI/Common/ArchiveOpenCallback.cpp +403 -0
- package/vendor/7zip/CPP/7zip/UI/Common/ArchiveOpenCallback.h +182 -0
- package/vendor/7zip/CPP/7zip/UI/Common/Bench.cpp +5036 -0
- package/vendor/7zip/CPP/7zip/UI/Common/Bench.h +121 -0
- package/vendor/7zip/CPP/7zip/UI/Common/CompressCall.cpp +343 -0
- package/vendor/7zip/CPP/7zip/UI/Common/CompressCall.h +28 -0
- package/vendor/7zip/CPP/7zip/UI/Common/CompressCall2.cpp +327 -0
- package/vendor/7zip/CPP/7zip/UI/Common/DefaultName.cpp +37 -0
- package/vendor/7zip/CPP/7zip/UI/Common/DefaultName.h +11 -0
- package/vendor/7zip/CPP/7zip/UI/Common/DirItem.h +407 -0
- package/vendor/7zip/CPP/7zip/UI/Common/EnumDirItems.cpp +1637 -0
- package/vendor/7zip/CPP/7zip/UI/Common/EnumDirItems.h +38 -0
- package/vendor/7zip/CPP/7zip/UI/Common/ExitCode.h +27 -0
- package/vendor/7zip/CPP/7zip/UI/Common/Extract.cpp +593 -0
- package/vendor/7zip/CPP/7zip/UI/Common/Extract.h +118 -0
- package/vendor/7zip/CPP/7zip/UI/Common/ExtractMode.h +44 -0
- package/vendor/7zip/CPP/7zip/UI/Common/ExtractingFilePath.cpp +299 -0
- package/vendor/7zip/CPP/7zip/UI/Common/ExtractingFilePath.h +31 -0
- package/vendor/7zip/CPP/7zip/UI/Common/HashCalc.cpp +2273 -0
- package/vendor/7zip/CPP/7zip/UI/Common/HashCalc.h +322 -0
- package/vendor/7zip/CPP/7zip/UI/Common/IFileExtractCallback.h +112 -0
- package/vendor/7zip/CPP/7zip/UI/Common/LoadCodecs.cpp +1354 -0
- package/vendor/7zip/CPP/7zip/UI/Common/LoadCodecs.h +482 -0
- package/vendor/7zip/CPP/7zip/UI/Common/OpenArchive.cpp +3690 -0
- package/vendor/7zip/CPP/7zip/UI/Common/OpenArchive.h +469 -0
- package/vendor/7zip/CPP/7zip/UI/Common/PropIDUtils.cpp +746 -0
- package/vendor/7zip/CPP/7zip/UI/Common/PropIDUtils.h +18 -0
- package/vendor/7zip/CPP/7zip/UI/Common/Property.h +14 -0
- package/vendor/7zip/CPP/7zip/UI/Common/SetProperties.cpp +88 -0
- package/vendor/7zip/CPP/7zip/UI/Common/SetProperties.h +10 -0
- package/vendor/7zip/CPP/7zip/UI/Common/SortUtils.cpp +25 -0
- package/vendor/7zip/CPP/7zip/UI/Common/SortUtils.h +10 -0
- package/vendor/7zip/CPP/7zip/UI/Common/StdAfx.h +11 -0
- package/vendor/7zip/CPP/7zip/UI/Common/TempFiles.cpp +20 -0
- package/vendor/7zip/CPP/7zip/UI/Common/TempFiles.h +19 -0
- package/vendor/7zip/CPP/7zip/UI/Common/Update.cpp +1931 -0
- package/vendor/7zip/CPP/7zip/UI/Common/Update.h +221 -0
- package/vendor/7zip/CPP/7zip/UI/Common/UpdateAction.cpp +64 -0
- package/vendor/7zip/CPP/7zip/UI/Common/UpdateAction.h +66 -0
- package/vendor/7zip/CPP/7zip/UI/Common/UpdateCallback.cpp +1078 -0
- package/vendor/7zip/CPP/7zip/UI/Common/UpdateCallback.h +197 -0
- package/vendor/7zip/CPP/7zip/UI/Common/UpdatePair.cpp +303 -0
- package/vendor/7zip/CPP/7zip/UI/Common/UpdatePair.h +27 -0
- package/vendor/7zip/CPP/7zip/UI/Common/UpdateProduce.cpp +75 -0
- package/vendor/7zip/CPP/7zip/UI/Common/UpdateProduce.h +60 -0
- package/vendor/7zip/CPP/7zip/UI/Common/WorkDir.cpp +84 -0
- package/vendor/7zip/CPP/7zip/UI/Common/WorkDir.h +30 -0
- package/vendor/7zip/CPP/7zip/UI/Common/ZipRegistry.cpp +599 -0
- package/vendor/7zip/CPP/7zip/UI/Common/ZipRegistry.h +212 -0
- package/vendor/7zip/CPP/7zip/UI/Console/BenchCon.cpp +41 -0
- package/vendor/7zip/CPP/7zip/UI/Console/BenchCon.h +14 -0
- package/vendor/7zip/CPP/7zip/UI/Console/Console.dsp +1052 -0
- package/vendor/7zip/CPP/7zip/UI/Console/Console.dsw +29 -0
- package/vendor/7zip/CPP/7zip/UI/Console/Console.mak +45 -0
- package/vendor/7zip/CPP/7zip/UI/Console/Console.manifest +16 -0
- package/vendor/7zip/CPP/7zip/UI/Console/ConsoleClose.cpp +98 -0
- package/vendor/7zip/CPP/7zip/UI/Console/ConsoleClose.h +39 -0
- package/vendor/7zip/CPP/7zip/UI/Console/ExtractCallbackConsole.cpp +954 -0
- package/vendor/7zip/CPP/7zip/UI/Console/ExtractCallbackConsole.h +211 -0
- package/vendor/7zip/CPP/7zip/UI/Console/HashCon.cpp +426 -0
- package/vendor/7zip/CPP/7zip/UI/Console/HashCon.h +58 -0
- package/vendor/7zip/CPP/7zip/UI/Console/List.cpp +1417 -0
- package/vendor/7zip/CPP/7zip/UI/Console/List.h +42 -0
- package/vendor/7zip/CPP/7zip/UI/Console/Main.cpp +1663 -0
- package/vendor/7zip/CPP/7zip/UI/Console/MainAr.cpp +235 -0
- package/vendor/7zip/CPP/7zip/UI/Console/OpenCallbackConsole.cpp +115 -0
- package/vendor/7zip/CPP/7zip/UI/Console/OpenCallbackConsole.h +73 -0
- package/vendor/7zip/CPP/7zip/UI/Console/PercentPrinter.cpp +186 -0
- package/vendor/7zip/CPP/7zip/UI/Console/PercentPrinter.h +66 -0
- package/vendor/7zip/CPP/7zip/UI/Console/StdAfx.cpp +3 -0
- package/vendor/7zip/CPP/7zip/UI/Console/StdAfx.h +11 -0
- package/vendor/7zip/CPP/7zip/UI/Console/UpdateCallbackConsole.cpp +1012 -0
- package/vendor/7zip/CPP/7zip/UI/Console/UpdateCallbackConsole.h +148 -0
- package/vendor/7zip/CPP/7zip/UI/Console/UserInputUtils.cpp +118 -0
- package/vendor/7zip/CPP/7zip/UI/Console/UserInputUtils.h +27 -0
- package/vendor/7zip/CPP/7zip/UI/Console/makefile +68 -0
- package/vendor/7zip/CPP/7zip/UI/Console/makefile.gcc +184 -0
- package/vendor/7zip/CPP/7zip/UI/Console/resource.rc +7 -0
- package/vendor/7zip/CPP/7zip/UI/Explorer/7-zip.dll.manifest +1 -0
- package/vendor/7zip/CPP/7zip/UI/Explorer/ContextMenu.cpp +1837 -0
- package/vendor/7zip/CPP/7zip/UI/Explorer/ContextMenu.h +173 -0
- package/vendor/7zip/CPP/7zip/UI/Explorer/ContextMenuFlags.h +27 -0
- package/vendor/7zip/CPP/7zip/UI/Explorer/DllExportsExplorer.cpp +268 -0
- package/vendor/7zip/CPP/7zip/UI/Explorer/Explorer.def +9 -0
- package/vendor/7zip/CPP/7zip/UI/Explorer/Explorer.dsp +620 -0
- package/vendor/7zip/CPP/7zip/UI/Explorer/Explorer.dsw +29 -0
- package/vendor/7zip/CPP/7zip/UI/Explorer/MenuLogo.bmp +0 -0
- package/vendor/7zip/CPP/7zip/UI/Explorer/MyExplorerCommand.h +217 -0
- package/vendor/7zip/CPP/7zip/UI/Explorer/MyMessages.cpp +43 -0
- package/vendor/7zip/CPP/7zip/UI/Explorer/MyMessages.h +16 -0
- package/vendor/7zip/CPP/7zip/UI/Explorer/RegistryContextMenu.cpp +225 -0
- package/vendor/7zip/CPP/7zip/UI/Explorer/RegistryContextMenu.h +13 -0
- package/vendor/7zip/CPP/7zip/UI/Explorer/StdAfx.cpp +3 -0
- package/vendor/7zip/CPP/7zip/UI/Explorer/StdAfx.h +6 -0
- package/vendor/7zip/CPP/7zip/UI/Explorer/makefile +76 -0
- package/vendor/7zip/CPP/7zip/UI/Explorer/resource.h +15 -0
- package/vendor/7zip/CPP/7zip/UI/Explorer/resource.rc +10 -0
- package/vendor/7zip/CPP/7zip/UI/Explorer/resource2.rc +19 -0
- package/vendor/7zip/CPP/7zip/UI/Far/ExtractEngine.cpp +274 -0
- package/vendor/7zip/CPP/7zip/UI/Far/ExtractEngine.h +43 -0
- package/vendor/7zip/CPP/7zip/UI/Far/Far.cpp +588 -0
- package/vendor/7zip/CPP/7zip/UI/Far/Far.def +35 -0
- package/vendor/7zip/CPP/7zip/UI/Far/Far.dsp +831 -0
- package/vendor/7zip/CPP/7zip/UI/Far/Far.dsw +29 -0
- package/vendor/7zip/CPP/7zip/UI/Far/FarPlugin.h +560 -0
- package/vendor/7zip/CPP/7zip/UI/Far/FarUtils.cpp +523 -0
- package/vendor/7zip/CPP/7zip/UI/Far/FarUtils.h +203 -0
- package/vendor/7zip/CPP/7zip/UI/Far/Messages.h +136 -0
- package/vendor/7zip/CPP/7zip/UI/Far/OverwriteDialogFar.cpp +145 -0
- package/vendor/7zip/CPP/7zip/UI/Far/OverwriteDialogFar.h +37 -0
- package/vendor/7zip/CPP/7zip/UI/Far/Plugin.cpp +937 -0
- package/vendor/7zip/CPP/7zip/UI/Far/Plugin.h +97 -0
- package/vendor/7zip/CPP/7zip/UI/Far/PluginCommon.cpp +50 -0
- package/vendor/7zip/CPP/7zip/UI/Far/PluginDelete.cpp +144 -0
- package/vendor/7zip/CPP/7zip/UI/Far/PluginRead.cpp +301 -0
- package/vendor/7zip/CPP/7zip/UI/Far/PluginWrite.cpp +840 -0
- package/vendor/7zip/CPP/7zip/UI/Far/ProgressBox.cpp +305 -0
- package/vendor/7zip/CPP/7zip/UI/Far/ProgressBox.h +85 -0
- package/vendor/7zip/CPP/7zip/UI/Far/StdAfx.cpp +3 -0
- package/vendor/7zip/CPP/7zip/UI/Far/StdAfx.h +11 -0
- package/vendor/7zip/CPP/7zip/UI/Far/UpdateCallbackFar.cpp +327 -0
- package/vendor/7zip/CPP/7zip/UI/Far/UpdateCallbackFar.h +58 -0
- package/vendor/7zip/CPP/7zip/UI/Far/makefile +105 -0
- package/vendor/7zip/CPP/7zip/UI/Far/resource.rc +3 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/7zFM.exe.manifest +23 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/7zipLogo.ico +0 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/AboutDialog.cpp +81 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/AboutDialog.h +19 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/AboutDialog.rc +26 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/AboutDialogRes.h +8 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/Add.bmp +0 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/Add2.bmp +0 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/AltStreamsFolder.cpp +865 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/AltStreamsFolder.h +92 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/App.cpp +1004 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/App.h +314 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/AppState.h +95 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/BrowseDialog.cpp +1132 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/BrowseDialog.h +32 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/BrowseDialog.rc +25 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/BrowseDialog2.cpp +1873 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/BrowseDialog2.h +10 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/BrowseDialog2.rc +32 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/BrowseDialog2Res.h +9 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/BrowseDialogRes.h +9 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/ClassDefs.cpp +12 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/ComboDialog.cpp +64 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/ComboDialog.h +28 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/ComboDialog.rc +16 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/ComboDialogRes.h +4 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/Copy.bmp +0 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/Copy2.bmp +0 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/CopyDialog.cpp +103 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/CopyDialog.h +31 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/CopyDialog.rc +20 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/CopyDialogRes.h +8 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/Delete.bmp +0 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/Delete2.bmp +0 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/DialogSize.h +16 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/EditDialog.cpp +57 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/EditDialog.h +25 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/EditDialog.rc +15 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/EditDialogRes.h +2 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/EditPage.cpp +159 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/EditPage.h +30 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/EditPage.rc +19 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/EditPage2.rc +14 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/EditPageRes.h +15 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/EnumFormatEtc.cpp +109 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/EnumFormatEtc.h +10 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/Extract.bmp +0 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/Extract2.bmp +0 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/ExtractCallback.cpp +1284 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/ExtractCallback.h +347 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/FM.cpp +1230 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/FM.dsp +1699 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/FM.dsw +29 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/FM.ico +0 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/FM.mak +102 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/FSDrives.cpp +512 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/FSDrives.h +52 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/FSFolder.cpp +1179 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/FSFolder.h +220 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/FSFolderCopy.cpp +871 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/FileFolderPluginOpen.cpp +394 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/FileFolderPluginOpen.h +27 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/FilePlugins.cpp +78 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/FilePlugins.h +33 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/FoldersPage.cpp +172 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/FoldersPage.h +32 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/FoldersPage.rc +23 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/FoldersPage2.rc +11 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/FoldersPageRes.h +12 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/FormatUtils.cpp +28 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/FormatUtils.h +14 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/HelpUtils.cpp +78 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/HelpUtils.h +10 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/IFolder.h +187 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/Info.bmp +0 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/Info2.bmp +0 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/LangPage.cpp +359 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/LangPage.h +36 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/LangPage.rc +40 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/LangPageRes.h +9 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/LangUtils.cpp +333 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/LangUtils.h +48 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/LinkDialog.cpp +402 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/LinkDialog.h +34 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/LinkDialog.rc +38 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/LinkDialogRes.h +22 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/ListViewDialog.cpp +321 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/ListViewDialog.h +46 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/ListViewDialog.rc +14 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/ListViewDialogRes.h +2 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/MemDialog.cpp +218 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/MemDialog.h +48 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/MemDialog.rc +49 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/MemDialogRes.h +13 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/MenuPage.cpp +439 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/MenuPage.h +57 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/MenuPage.rc +24 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/MenuPage2.rc +28 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/MenuPageRes.h +15 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/MessagesDialog.cpp +76 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/MessagesDialog.h +25 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/MessagesDialog.rc +14 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/MessagesDialogRes.h +3 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/Move.bmp +0 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/Move2.bmp +0 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/MyCom2.h +46 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/MyLoadMenu.cpp +964 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/MyLoadMenu.h +40 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/MyWindowsNew.h +119 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/NetFolder.cpp +276 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/NetFolder.h +36 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/OpenCallback.cpp +86 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/OpenCallback.h +69 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/OptionsDialog.cpp +89 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/OverwriteDialog.cpp +288 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/OverwriteDialog.h +89 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/OverwriteDialog.rc +93 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/OverwriteDialogRes.h +19 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/Panel.cpp +1177 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/Panel.h +1020 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/PanelCopy.cpp +477 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/PanelCrc.cpp +422 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/PanelDrag.cpp +3006 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/PanelFolderChange.cpp +1122 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/PanelItemOpen.cpp +1836 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/PanelItems.cpp +1476 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/PanelKey.cpp +357 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/PanelListNotify.cpp +838 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/PanelMenu.cpp +1160 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/PanelOperations.cpp +533 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/PanelSelect.cpp +317 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/PanelSort.cpp +288 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/PanelSplitFile.cpp +562 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/PasswordDialog.cpp +58 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/PasswordDialog.h +28 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/PasswordDialog.rc +18 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/PasswordDialogRes.h +5 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/PluginInterface.h +32 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/PluginLoader.h +33 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/ProgramLocation.cpp +3 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/ProgramLocation.h +6 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/ProgressDialog.cpp +201 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/ProgressDialog.h +171 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/ProgressDialog.rc +12 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/ProgressDialog2.cpp +1484 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/ProgressDialog2.h +355 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/ProgressDialog2.rc +40 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/ProgressDialog2Res.h +49 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/ProgressDialog2a.rc +85 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/ProgressDialogRes.h +3 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/PropertyName.cpp +23 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/PropertyName.h +10 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/PropertyName.rc +109 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/PropertyNameRes.h +104 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/RegistryAssociations.cpp +167 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/RegistryAssociations.h +31 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/RegistryPlugins.cpp +145 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/RegistryPlugins.h +29 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/RegistryUtils.cpp +194 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/RegistryUtils.h +50 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/RootFolder.cpp +342 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/RootFolder.h +24 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/SettingsPage.cpp +453 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/SettingsPage.h +37 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/SettingsPage.rc +22 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/SettingsPage2.rc +37 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/SettingsPageRes.h +23 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/SplitDialog.cpp +114 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/SplitDialog.h +28 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/SplitDialog.rc +16 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/SplitDialogRes.h +8 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/SplitUtils.cpp +96 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/SplitUtils.h +15 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/StdAfx.cpp +3 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/StdAfx.h +67 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/StringUtils.cpp +39 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/StringUtils.h +11 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/SysIconUtils.cpp +352 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/SysIconUtils.h +65 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/SystemPage.cpp +472 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/SystemPage.h +126 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/SystemPage.rc +43 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/SystemPageRes.h +9 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/Test.bmp +0 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/Test2.bmp +0 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/TextPairs.cpp +193 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/TextPairs.h +32 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/UpdateCallback100.cpp +147 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/UpdateCallback100.h +49 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/VerCtrl.cpp +428 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/ViewSettings.cpp +315 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/ViewSettings.h +115 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/makefile +110 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/resource.h +199 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/resource.rc +296 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/resourceGui.h +25 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/resourceGui.rc +30 -0
- package/vendor/7zip/CPP/7zip/UI/GUI/7zG.exe.manifest +23 -0
- package/vendor/7zip/CPP/7zip/UI/GUI/BenchmarkDialog.cpp +1921 -0
- package/vendor/7zip/CPP/7zip/UI/GUI/BenchmarkDialog.h +15 -0
- package/vendor/7zip/CPP/7zip/UI/GUI/BenchmarkDialog.rc +288 -0
- package/vendor/7zip/CPP/7zip/UI/GUI/BenchmarkDialogRes.h +79 -0
- package/vendor/7zip/CPP/7zip/UI/GUI/CompressDialog.cpp +3821 -0
- package/vendor/7zip/CPP/7zip/UI/GUI/CompressDialog.h +483 -0
- package/vendor/7zip/CPP/7zip/UI/GUI/CompressDialog.rc +233 -0
- package/vendor/7zip/CPP/7zip/UI/GUI/CompressDialogRes.h +125 -0
- package/vendor/7zip/CPP/7zip/UI/GUI/CompressOptionsDialog.rc +79 -0
- package/vendor/7zip/CPP/7zip/UI/GUI/Extract.rc +59 -0
- package/vendor/7zip/CPP/7zip/UI/GUI/ExtractDialog.cpp +420 -0
- package/vendor/7zip/CPP/7zip/UI/GUI/ExtractDialog.h +113 -0
- package/vendor/7zip/CPP/7zip/UI/GUI/ExtractDialog.rc +98 -0
- package/vendor/7zip/CPP/7zip/UI/GUI/ExtractDialogRes.h +24 -0
- package/vendor/7zip/CPP/7zip/UI/GUI/ExtractGUI.cpp +297 -0
- package/vendor/7zip/CPP/7zip/UI/GUI/ExtractGUI.h +39 -0
- package/vendor/7zip/CPP/7zip/UI/GUI/ExtractRes.h +51 -0
- package/vendor/7zip/CPP/7zip/UI/GUI/FM.ico +0 -0
- package/vendor/7zip/CPP/7zip/UI/GUI/GUI.cpp +502 -0
- package/vendor/7zip/CPP/7zip/UI/GUI/GUI.dsp +1275 -0
- package/vendor/7zip/CPP/7zip/UI/GUI/GUI.dsw +29 -0
- package/vendor/7zip/CPP/7zip/UI/GUI/HashGUI.cpp +341 -0
- package/vendor/7zip/CPP/7zip/UI/GUI/HashGUI.h +27 -0
- package/vendor/7zip/CPP/7zip/UI/GUI/StdAfx.cpp +3 -0
- package/vendor/7zip/CPP/7zip/UI/GUI/StdAfx.h +6 -0
- package/vendor/7zip/CPP/7zip/UI/GUI/UpdateCallbackGUI.cpp +295 -0
- package/vendor/7zip/CPP/7zip/UI/GUI/UpdateCallbackGUI.h +31 -0
- package/vendor/7zip/CPP/7zip/UI/GUI/UpdateCallbackGUI2.cpp +130 -0
- package/vendor/7zip/CPP/7zip/UI/GUI/UpdateCallbackGUI2.h +53 -0
- package/vendor/7zip/CPP/7zip/UI/GUI/UpdateGUI.cpp +605 -0
- package/vendor/7zip/CPP/7zip/UI/GUI/UpdateGUI.h +33 -0
- package/vendor/7zip/CPP/7zip/UI/GUI/makefile +148 -0
- package/vendor/7zip/CPP/7zip/UI/GUI/resource.rc +26 -0
- package/vendor/7zip/CPP/7zip/UI/GUI/resource2.h +2 -0
- package/vendor/7zip/CPP/7zip/UI/GUI/resource2.rc +10 -0
- package/vendor/7zip/CPP/7zip/UI/GUI/resource3.h +10 -0
- package/vendor/7zip/CPP/7zip/UI/GUI/resource3.rc +15 -0
- package/vendor/7zip/CPP/7zip/UI/makefile +12 -0
- package/vendor/7zip/CPP/7zip/cmpl_clang.mak +3 -0
- package/vendor/7zip/CPP/7zip/cmpl_clang_arm64.mak +3 -0
- package/vendor/7zip/CPP/7zip/cmpl_clang_x64.mak +3 -0
- package/vendor/7zip/CPP/7zip/cmpl_clang_x86.mak +3 -0
- package/vendor/7zip/CPP/7zip/cmpl_gcc.mak +3 -0
- package/vendor/7zip/CPP/7zip/cmpl_gcc_arm.mak +3 -0
- package/vendor/7zip/CPP/7zip/cmpl_gcc_arm64.mak +3 -0
- package/vendor/7zip/CPP/7zip/cmpl_gcc_x64.mak +3 -0
- package/vendor/7zip/CPP/7zip/cmpl_gcc_x86.mak +3 -0
- package/vendor/7zip/CPP/7zip/cmpl_mac_arm64.mak +3 -0
- package/vendor/7zip/CPP/7zip/cmpl_mac_x64.mak +3 -0
- package/vendor/7zip/CPP/7zip/makefile +10 -0
- package/vendor/7zip/CPP/7zip/var_clang.mak +11 -0
- package/vendor/7zip/CPP/7zip/var_clang_arm64.mak +19 -0
- package/vendor/7zip/CPP/7zip/var_clang_x64.mak +11 -0
- package/vendor/7zip/CPP/7zip/var_clang_x86.mak +11 -0
- package/vendor/7zip/CPP/7zip/var_gcc.mak +12 -0
- package/vendor/7zip/CPP/7zip/var_gcc_arm.mak +34 -0
- package/vendor/7zip/CPP/7zip/var_gcc_arm64.mak +12 -0
- package/vendor/7zip/CPP/7zip/var_gcc_x64.mak +11 -0
- package/vendor/7zip/CPP/7zip/var_gcc_x86.mak +10 -0
- package/vendor/7zip/CPP/7zip/var_mac_arm64.mak +13 -0
- package/vendor/7zip/CPP/7zip/var_mac_x64.mak +13 -0
- package/vendor/7zip/CPP/7zip/warn_clang.mak +3 -0
- package/vendor/7zip/CPP/7zip/warn_clang_mac.mak +9 -0
- package/vendor/7zip/CPP/7zip/warn_gcc.mak +55 -0
- package/vendor/7zip/CPP/Build.mak +259 -0
- package/vendor/7zip/CPP/Common/AutoPtr.h +46 -0
- package/vendor/7zip/CPP/Common/CRC.cpp +7 -0
- package/vendor/7zip/CPP/Common/C_FileIO.cpp +3 -0
- package/vendor/7zip/CPP/Common/C_FileIO.h +6 -0
- package/vendor/7zip/CPP/Common/CksumReg.cpp +55 -0
- package/vendor/7zip/CPP/Common/ComTry.h +21 -0
- package/vendor/7zip/CPP/Common/CommandLineParser.cpp +231 -0
- package/vendor/7zip/CPP/Common/CommandLineParser.h +63 -0
- package/vendor/7zip/CPP/Common/Common.h +28 -0
- package/vendor/7zip/CPP/Common/Common0.h +342 -0
- package/vendor/7zip/CPP/Common/CrcReg.cpp +77 -0
- package/vendor/7zip/CPP/Common/Defs.h +16 -0
- package/vendor/7zip/CPP/Common/DynLimBuf.cpp +93 -0
- package/vendor/7zip/CPP/Common/DynLimBuf.h +41 -0
- package/vendor/7zip/CPP/Common/DynamicBuffer.h +76 -0
- package/vendor/7zip/CPP/Common/IntToString.cpp +215 -0
- package/vendor/7zip/CPP/Common/IntToString.h +54 -0
- package/vendor/7zip/CPP/Common/Lang.cpp +173 -0
- package/vendor/7zip/CPP/Common/Lang.h +30 -0
- package/vendor/7zip/CPP/Common/ListFileUtils.cpp +150 -0
- package/vendor/7zip/CPP/Common/ListFileUtils.h +18 -0
- package/vendor/7zip/CPP/Common/LzFindPrepare.cpp +7 -0
- package/vendor/7zip/CPP/Common/Md5Reg.cpp +44 -0
- package/vendor/7zip/CPP/Common/MyBuffer.h +343 -0
- package/vendor/7zip/CPP/Common/MyBuffer2.h +185 -0
- package/vendor/7zip/CPP/Common/MyCom.h +693 -0
- package/vendor/7zip/CPP/Common/MyException.h +14 -0
- package/vendor/7zip/CPP/Common/MyGuidDef.h +63 -0
- package/vendor/7zip/CPP/Common/MyInitGuid.h +57 -0
- package/vendor/7zip/CPP/Common/MyLinux.h +75 -0
- package/vendor/7zip/CPP/Common/MyMap.cpp +140 -0
- package/vendor/7zip/CPP/Common/MyMap.h +28 -0
- package/vendor/7zip/CPP/Common/MyString.cpp +1842 -0
- package/vendor/7zip/CPP/Common/MyString.h +1079 -0
- package/vendor/7zip/CPP/Common/MyTypes.h +38 -0
- package/vendor/7zip/CPP/Common/MyUnknown.h +8 -0
- package/vendor/7zip/CPP/Common/MyVector.cpp +3 -0
- package/vendor/7zip/CPP/Common/MyVector.h +772 -0
- package/vendor/7zip/CPP/Common/MyWindows.cpp +292 -0
- package/vendor/7zip/CPP/Common/MyWindows.h +325 -0
- package/vendor/7zip/CPP/Common/MyXml.cpp +349 -0
- package/vendor/7zip/CPP/Common/MyXml.h +45 -0
- package/vendor/7zip/CPP/Common/NewHandler.cpp +340 -0
- package/vendor/7zip/CPP/Common/NewHandler.h +121 -0
- package/vendor/7zip/CPP/Common/Random.cpp +28 -0
- package/vendor/7zip/CPP/Common/Random.h +14 -0
- package/vendor/7zip/CPP/Common/Sha1Prepare.cpp +7 -0
- package/vendor/7zip/CPP/Common/Sha1Reg.cpp +67 -0
- package/vendor/7zip/CPP/Common/Sha256Prepare.cpp +7 -0
- package/vendor/7zip/CPP/Common/Sha256Reg.cpp +67 -0
- package/vendor/7zip/CPP/Common/Sha3Reg.cpp +76 -0
- package/vendor/7zip/CPP/Common/Sha512Prepare.cpp +7 -0
- package/vendor/7zip/CPP/Common/Sha512Reg.cpp +83 -0
- package/vendor/7zip/CPP/Common/StdAfx.h +8 -0
- package/vendor/7zip/CPP/Common/StdInStream.cpp +98 -0
- package/vendor/7zip/CPP/Common/StdInStream.h +46 -0
- package/vendor/7zip/CPP/Common/StdOutStream.cpp +271 -0
- package/vendor/7zip/CPP/Common/StdOutStream.h +87 -0
- package/vendor/7zip/CPP/Common/StringConvert.cpp +762 -0
- package/vendor/7zip/CPP/Common/StringConvert.h +110 -0
- package/vendor/7zip/CPP/Common/StringToInt.cpp +154 -0
- package/vendor/7zip/CPP/Common/StringToInt.h +38 -0
- package/vendor/7zip/CPP/Common/TextConfig.cpp +123 -0
- package/vendor/7zip/CPP/Common/TextConfig.h +19 -0
- package/vendor/7zip/CPP/Common/UTFConvert.cpp +863 -0
- package/vendor/7zip/CPP/Common/UTFConvert.h +384 -0
- package/vendor/7zip/CPP/Common/Wildcard.cpp +789 -0
- package/vendor/7zip/CPP/Common/Wildcard.h +231 -0
- package/vendor/7zip/CPP/Common/Xxh64Reg.cpp +97 -0
- package/vendor/7zip/CPP/Common/XzCrc64Init.cpp +7 -0
- package/vendor/7zip/CPP/Common/XzCrc64Reg.cpp +39 -0
- package/vendor/7zip/CPP/Windows/COM.cpp +41 -0
- package/vendor/7zip/CPP/Windows/COM.h +86 -0
- package/vendor/7zip/CPP/Windows/Clipboard.cpp +130 -0
- package/vendor/7zip/CPP/Windows/Clipboard.h +28 -0
- package/vendor/7zip/CPP/Windows/CommonDialog.cpp +269 -0
- package/vendor/7zip/CPP/Windows/CommonDialog.h +43 -0
- package/vendor/7zip/CPP/Windows/Console.cpp +10 -0
- package/vendor/7zip/CPP/Windows/Console.h +52 -0
- package/vendor/7zip/CPP/Windows/Control/ComboBox.cpp +75 -0
- package/vendor/7zip/CPP/Windows/Control/ComboBox.h +79 -0
- package/vendor/7zip/CPP/Windows/Control/CommandBar.h +52 -0
- package/vendor/7zip/CPP/Windows/Control/Dialog.cpp +446 -0
- package/vendor/7zip/CPP/Windows/Control/Dialog.h +213 -0
- package/vendor/7zip/CPP/Windows/Control/Edit.h +19 -0
- package/vendor/7zip/CPP/Windows/Control/ImageList.cpp +10 -0
- package/vendor/7zip/CPP/Windows/Control/ImageList.h +87 -0
- package/vendor/7zip/CPP/Windows/Control/ListView.cpp +162 -0
- package/vendor/7zip/CPP/Windows/Control/ListView.h +156 -0
- package/vendor/7zip/CPP/Windows/Control/ProgressBar.h +35 -0
- package/vendor/7zip/CPP/Windows/Control/PropertyPage.cpp +165 -0
- package/vendor/7zip/CPP/Windows/Control/PropertyPage.h +50 -0
- package/vendor/7zip/CPP/Windows/Control/ReBar.h +34 -0
- package/vendor/7zip/CPP/Windows/Control/Static.h +28 -0
- package/vendor/7zip/CPP/Windows/Control/StatusBar.h +42 -0
- package/vendor/7zip/CPP/Windows/Control/StdAfx.h +11 -0
- package/vendor/7zip/CPP/Windows/Control/ToolBar.h +43 -0
- package/vendor/7zip/CPP/Windows/Control/Trackbar.h +27 -0
- package/vendor/7zip/CPP/Windows/Control/Window2.cpp +202 -0
- package/vendor/7zip/CPP/Windows/Control/Window2.h +53 -0
- package/vendor/7zip/CPP/Windows/DLL.cpp +178 -0
- package/vendor/7zip/CPP/Windows/DLL.h +103 -0
- package/vendor/7zip/CPP/Windows/ErrorMsg.cpp +133 -0
- package/vendor/7zip/CPP/Windows/ErrorMsg.h +16 -0
- package/vendor/7zip/CPP/Windows/FileDir.cpp +1388 -0
- package/vendor/7zip/CPP/Windows/FileDir.h +173 -0
- package/vendor/7zip/CPP/Windows/FileFind.cpp +1458 -0
- package/vendor/7zip/CPP/Windows/FileFind.h +345 -0
- package/vendor/7zip/CPP/Windows/FileIO.cpp +1188 -0
- package/vendor/7zip/CPP/Windows/FileIO.h +508 -0
- package/vendor/7zip/CPP/Windows/FileLink.cpp +697 -0
- package/vendor/7zip/CPP/Windows/FileMapping.cpp +12 -0
- package/vendor/7zip/CPP/Windows/FileMapping.h +66 -0
- package/vendor/7zip/CPP/Windows/FileName.cpp +911 -0
- package/vendor/7zip/CPP/Windows/FileName.h +142 -0
- package/vendor/7zip/CPP/Windows/FileSystem.cpp +187 -0
- package/vendor/7zip/CPP/Windows/FileSystem.h +31 -0
- package/vendor/7zip/CPP/Windows/Handle.h +39 -0
- package/vendor/7zip/CPP/Windows/MemoryGlobal.cpp +36 -0
- package/vendor/7zip/CPP/Windows/MemoryGlobal.h +55 -0
- package/vendor/7zip/CPP/Windows/MemoryLock.cpp +127 -0
- package/vendor/7zip/CPP/Windows/MemoryLock.h +40 -0
- package/vendor/7zip/CPP/Windows/Menu.cpp +265 -0
- package/vendor/7zip/CPP/Windows/Menu.h +170 -0
- package/vendor/7zip/CPP/Windows/NationalTime.cpp +37 -0
- package/vendor/7zip/CPP/Windows/NationalTime.h +20 -0
- package/vendor/7zip/CPP/Windows/Net.cpp +398 -0
- package/vendor/7zip/CPP/Windows/Net.h +87 -0
- package/vendor/7zip/CPP/Windows/NtCheck.h +58 -0
- package/vendor/7zip/CPP/Windows/ProcessMessages.cpp +22 -0
- package/vendor/7zip/CPP/Windows/ProcessMessages.h +12 -0
- package/vendor/7zip/CPP/Windows/ProcessUtils.cpp +102 -0
- package/vendor/7zip/CPP/Windows/ProcessUtils.h +138 -0
- package/vendor/7zip/CPP/Windows/PropVariant.cpp +393 -0
- package/vendor/7zip/CPP/Windows/PropVariant.h +173 -0
- package/vendor/7zip/CPP/Windows/PropVariantConv.cpp +274 -0
- package/vendor/7zip/CPP/Windows/PropVariantConv.h +47 -0
- package/vendor/7zip/CPP/Windows/PropVariantUtils.cpp +161 -0
- package/vendor/7zip/CPP/Windows/PropVariantUtils.h +34 -0
- package/vendor/7zip/CPP/Windows/Registry.cpp +474 -0
- package/vendor/7zip/CPP/Windows/Registry.h +96 -0
- package/vendor/7zip/CPP/Windows/ResourceString.cpp +103 -0
- package/vendor/7zip/CPP/Windows/ResourceString.h +17 -0
- package/vendor/7zip/CPP/Windows/SecurityUtils.cpp +186 -0
- package/vendor/7zip/CPP/Windows/SecurityUtils.h +154 -0
- package/vendor/7zip/CPP/Windows/Shell.cpp +839 -0
- package/vendor/7zip/CPP/Windows/Shell.h +129 -0
- package/vendor/7zip/CPP/Windows/StdAfx.h +11 -0
- package/vendor/7zip/CPP/Windows/Synchronization.cpp +87 -0
- package/vendor/7zip/CPP/Windows/Synchronization.h +386 -0
- package/vendor/7zip/CPP/Windows/System.cpp +423 -0
- package/vendor/7zip/CPP/Windows/System.h +209 -0
- package/vendor/7zip/CPP/Windows/SystemInfo.cpp +1312 -0
- package/vendor/7zip/CPP/Windows/SystemInfo.h +19 -0
- package/vendor/7zip/CPP/Windows/Thread.h +46 -0
- package/vendor/7zip/CPP/Windows/TimeUtils.cpp +467 -0
- package/vendor/7zip/CPP/Windows/TimeUtils.h +154 -0
- package/vendor/7zip/CPP/Windows/WinDefs.h +17 -0
- package/vendor/7zip/CPP/Windows/Window.cpp +179 -0
- package/vendor/7zip/CPP/Windows/Window.h +363 -0
- package/vendor/7zip/DOC/7zC.txt +187 -0
- package/vendor/7zip/DOC/7zFormat.txt +469 -0
- package/vendor/7zip/DOC/7zip.hhp +84 -0
- package/vendor/7zip/DOC/7zip.wxs +403 -0
- package/vendor/7zip/DOC/License.txt +151 -0
- package/vendor/7zip/DOC/Methods.txt +177 -0
- package/vendor/7zip/DOC/copying.txt +502 -0
- package/vendor/7zip/DOC/lzma.txt +345 -0
- package/vendor/7zip/DOC/readme.txt +299 -0
- package/vendor/7zip/DOC/src-history.txt +884 -0
- package/vendor/7zip/DOC/unRarLicense.txt +41 -0
- package/vendor/7zip/README.md +2 -0
|
@@ -0,0 +1,2060 @@
|
|
|
1
|
+
// Rar5Decoder.cpp
|
|
2
|
+
// According to unRAR license, this code may not be used to develop
|
|
3
|
+
// a program that creates RAR archives
|
|
4
|
+
|
|
5
|
+
#include "StdAfx.h"
|
|
6
|
+
|
|
7
|
+
#define DICT_SIZE_MAX ((UInt64)1 << DICT_SIZE_BITS_MAX)
|
|
8
|
+
|
|
9
|
+
// #include <emmintrin.h> // SSE2
|
|
10
|
+
// #endif
|
|
11
|
+
|
|
12
|
+
#include "../../../C/CpuArch.h"
|
|
13
|
+
#if 0
|
|
14
|
+
#include "../../../C/Bra.h"
|
|
15
|
+
#endif
|
|
16
|
+
|
|
17
|
+
#if defined(MY_CPU_ARM64)
|
|
18
|
+
#include <arm_neon.h>
|
|
19
|
+
#endif
|
|
20
|
+
|
|
21
|
+
// #define Z7_RAR5_SHOW_STAT
|
|
22
|
+
// #include <stdio.h>
|
|
23
|
+
#ifdef Z7_RAR5_SHOW_STAT
|
|
24
|
+
#include <stdio.h>
|
|
25
|
+
#endif
|
|
26
|
+
|
|
27
|
+
#include "../Common/StreamUtils.h"
|
|
28
|
+
|
|
29
|
+
#include "Rar5Decoder.h"
|
|
30
|
+
|
|
31
|
+
/*
|
|
32
|
+
Note: original-unrar claims that encoder has limitation for Distance:
|
|
33
|
+
(Distance <= MaxWinSize - MAX_INC_LZ_MATCH)
|
|
34
|
+
MAX_INC_LZ_MATCH = 0x1001 + 3;
|
|
35
|
+
*/
|
|
36
|
+
|
|
37
|
+
#define LZ_ERROR_TYPE_NO 0
|
|
38
|
+
#define LZ_ERROR_TYPE_HEADER 1
|
|
39
|
+
// #define LZ_ERROR_TYPE_SYM 1
|
|
40
|
+
#define LZ_ERROR_TYPE_DIST 2
|
|
41
|
+
|
|
42
|
+
static
|
|
43
|
+
void My_ZeroMemory(void *p, size_t size)
|
|
44
|
+
{
|
|
45
|
+
#if defined(MY_CPU_AMD64) && !defined(_M_ARM64EC) \
|
|
46
|
+
&& defined(Z7_MSC_VER_ORIGINAL) && (Z7_MSC_VER_ORIGINAL <= 1400)
|
|
47
|
+
// __stosq((UInt64 *)(void *)win, 0, size / 8);
|
|
48
|
+
/*
|
|
49
|
+
printf("\n__stosb \n");
|
|
50
|
+
#define STEP_BIG (1 << 28)
|
|
51
|
+
for (size_t i = 0; i < ((UInt64)1 << 50); i += STEP_BIG)
|
|
52
|
+
{
|
|
53
|
+
printf("\n__stosb end %p\n", (void *)i);
|
|
54
|
+
__stosb((Byte *)p + i, 0, STEP_BIG);
|
|
55
|
+
}
|
|
56
|
+
*/
|
|
57
|
+
// __stosb((Byte *)p, 0, 0);
|
|
58
|
+
__stosb((Byte *)p, 0, size);
|
|
59
|
+
#else
|
|
60
|
+
// SecureZeroMemory (win, STEP);
|
|
61
|
+
// ZeroMemory(win, STEP);
|
|
62
|
+
// memset(win, 0, STEP);
|
|
63
|
+
memset(p, 0, size);
|
|
64
|
+
#endif
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
#ifdef MY_CPU_LE_UNALIGN
|
|
70
|
+
#define Z7_RAR5_DEC_USE_UNALIGNED_COPY
|
|
71
|
+
#endif
|
|
72
|
+
|
|
73
|
+
#ifdef Z7_RAR5_DEC_USE_UNALIGNED_COPY
|
|
74
|
+
|
|
75
|
+
#define COPY_CHUNK_SIZE 16
|
|
76
|
+
|
|
77
|
+
#define COPY_CHUNK_4_2(dest, src) \
|
|
78
|
+
{ \
|
|
79
|
+
((UInt32 *)(void *)dest)[0] = ((const UInt32 *)(const void *)src)[0]; \
|
|
80
|
+
((UInt32 *)(void *)dest)[1] = ((const UInt32 *)(const void *)src)[1]; \
|
|
81
|
+
src += 4 * 2; \
|
|
82
|
+
dest += 4 * 2; \
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/* sse2 doesn't help here in GCC and CLANG.
|
|
86
|
+
so we disabled sse2 here */
|
|
87
|
+
#if 0
|
|
88
|
+
#if defined(MY_CPU_AMD64)
|
|
89
|
+
#define Z7_RAR5_DEC_USE_SSE2
|
|
90
|
+
#elif defined(MY_CPU_X86)
|
|
91
|
+
#if defined(_MSC_VER) && _MSC_VER >= 1300 && defined(_M_IX86_FP) && (_M_IX86_FP >= 2) \
|
|
92
|
+
|| defined(__SSE2__) \
|
|
93
|
+
// || 1 == 1 // for debug only
|
|
94
|
+
#define Z7_RAR5_DEC_USE_SSE2
|
|
95
|
+
#endif
|
|
96
|
+
#endif
|
|
97
|
+
#endif
|
|
98
|
+
|
|
99
|
+
#if defined(MY_CPU_ARM64)
|
|
100
|
+
|
|
101
|
+
#define COPY_OFFSET_MIN 16
|
|
102
|
+
#define COPY_CHUNK1(dest, src) \
|
|
103
|
+
{ \
|
|
104
|
+
vst1q_u8((uint8_t *)(void *)dest, \
|
|
105
|
+
vld1q_u8((const uint8_t *)(const void *)src)); \
|
|
106
|
+
src += 16; \
|
|
107
|
+
dest += 16; \
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
#define COPY_CHUNK(dest, src) \
|
|
111
|
+
{ \
|
|
112
|
+
COPY_CHUNK1(dest, src) \
|
|
113
|
+
if (dest >= lim) break; \
|
|
114
|
+
COPY_CHUNK1(dest, src) \
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
#elif defined(Z7_RAR5_DEC_USE_SSE2)
|
|
118
|
+
#include <emmintrin.h> // sse2
|
|
119
|
+
#define COPY_OFFSET_MIN 16
|
|
120
|
+
|
|
121
|
+
#define COPY_CHUNK1(dest, src) \
|
|
122
|
+
{ \
|
|
123
|
+
_mm_storeu_si128((__m128i *)(void *)dest, \
|
|
124
|
+
_mm_loadu_si128((const __m128i *)(const void *)src)); \
|
|
125
|
+
src += 16; \
|
|
126
|
+
dest += 16; \
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
#define COPY_CHUNK(dest, src) \
|
|
130
|
+
{ \
|
|
131
|
+
COPY_CHUNK1(dest, src) \
|
|
132
|
+
if (dest >= lim) break; \
|
|
133
|
+
COPY_CHUNK1(dest, src) \
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
#elif defined(MY_CPU_64BIT)
|
|
137
|
+
#define COPY_OFFSET_MIN 8
|
|
138
|
+
|
|
139
|
+
#define COPY_CHUNK(dest, src) \
|
|
140
|
+
{ \
|
|
141
|
+
((UInt64 *)(void *)dest)[0] = ((const UInt64 *)(const void *)src)[0]; \
|
|
142
|
+
src += 8 * 1; dest += 8 * 1; \
|
|
143
|
+
((UInt64 *)(void *)dest)[0] = ((const UInt64 *)(const void *)src)[0]; \
|
|
144
|
+
src += 8 * 1; dest += 8 * 1; \
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
#else
|
|
148
|
+
#define COPY_OFFSET_MIN 4
|
|
149
|
+
|
|
150
|
+
#define COPY_CHUNK(dest, src) \
|
|
151
|
+
{ \
|
|
152
|
+
COPY_CHUNK_4_2(dest, src); \
|
|
153
|
+
COPY_CHUNK_4_2(dest, src); \
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
#endif
|
|
157
|
+
#endif
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
#ifndef COPY_CHUNK_SIZE
|
|
161
|
+
#define COPY_OFFSET_MIN 4
|
|
162
|
+
#define COPY_CHUNK_SIZE 8
|
|
163
|
+
#define COPY_CHUNK_2(dest, src) \
|
|
164
|
+
{ \
|
|
165
|
+
const Byte a0 = src[0]; \
|
|
166
|
+
const Byte a1 = src[1]; \
|
|
167
|
+
dest[0] = a0; \
|
|
168
|
+
dest[1] = a1; \
|
|
169
|
+
src += 2; \
|
|
170
|
+
dest += 2; \
|
|
171
|
+
}
|
|
172
|
+
#define COPY_CHUNK(dest, src) \
|
|
173
|
+
{ \
|
|
174
|
+
COPY_CHUNK_2(dest, src) \
|
|
175
|
+
COPY_CHUNK_2(dest, src) \
|
|
176
|
+
COPY_CHUNK_2(dest, src) \
|
|
177
|
+
COPY_CHUNK_2(dest, src) \
|
|
178
|
+
}
|
|
179
|
+
#endif
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
#define COPY_CHUNKS \
|
|
183
|
+
{ \
|
|
184
|
+
Z7_PRAGMA_OPT_DISABLE_LOOP_UNROLL_VECTORIZE \
|
|
185
|
+
do { COPY_CHUNK(dest, src) } \
|
|
186
|
+
while (dest < lim); \
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
namespace NCompress {
|
|
190
|
+
namespace NRar5 {
|
|
191
|
+
|
|
192
|
+
typedef
|
|
193
|
+
#if 1
|
|
194
|
+
unsigned
|
|
195
|
+
#else
|
|
196
|
+
size_t
|
|
197
|
+
#endif
|
|
198
|
+
CLenType;
|
|
199
|
+
|
|
200
|
+
// (len != 0)
|
|
201
|
+
static
|
|
202
|
+
Z7_FORCE_INLINE
|
|
203
|
+
// Z7_ATTRIB_NO_VECTOR
|
|
204
|
+
void CopyMatch(size_t offset, Byte *dest, const Byte *src, const Byte *lim)
|
|
205
|
+
{
|
|
206
|
+
{
|
|
207
|
+
// (COPY_OFFSET_MIN >= 4)
|
|
208
|
+
if (offset >= COPY_OFFSET_MIN)
|
|
209
|
+
{
|
|
210
|
+
COPY_CHUNKS
|
|
211
|
+
// return;
|
|
212
|
+
}
|
|
213
|
+
else
|
|
214
|
+
#if (COPY_OFFSET_MIN > 4)
|
|
215
|
+
#if COPY_CHUNK_SIZE < 8
|
|
216
|
+
#error Stop_Compiling_Bad_COPY_CHUNK_SIZE
|
|
217
|
+
#endif
|
|
218
|
+
if (offset >= 4)
|
|
219
|
+
{
|
|
220
|
+
Z7_PRAGMA_OPT_DISABLE_LOOP_UNROLL_VECTORIZE
|
|
221
|
+
do
|
|
222
|
+
{
|
|
223
|
+
COPY_CHUNK_4_2(dest, src)
|
|
224
|
+
#if COPY_CHUNK_SIZE < 16
|
|
225
|
+
if (dest >= lim) break;
|
|
226
|
+
#endif
|
|
227
|
+
COPY_CHUNK_4_2(dest, src)
|
|
228
|
+
}
|
|
229
|
+
while (dest < lim);
|
|
230
|
+
// return;
|
|
231
|
+
}
|
|
232
|
+
else
|
|
233
|
+
#endif
|
|
234
|
+
{
|
|
235
|
+
// (offset < 4)
|
|
236
|
+
const unsigned b0 = src[0];
|
|
237
|
+
if (offset < 2)
|
|
238
|
+
{
|
|
239
|
+
#if defined(Z7_RAR5_DEC_USE_UNALIGNED_COPY) && (COPY_CHUNK_SIZE == 16)
|
|
240
|
+
#if defined(MY_CPU_64BIT)
|
|
241
|
+
{
|
|
242
|
+
const UInt64 v64 = (UInt64)b0 * 0x0101010101010101;
|
|
243
|
+
Z7_PRAGMA_OPT_DISABLE_LOOP_UNROLL_VECTORIZE
|
|
244
|
+
do
|
|
245
|
+
{
|
|
246
|
+
((UInt64 *)(void *)dest)[0] = v64;
|
|
247
|
+
((UInt64 *)(void *)dest)[1] = v64;
|
|
248
|
+
dest += 16;
|
|
249
|
+
}
|
|
250
|
+
while (dest < lim);
|
|
251
|
+
}
|
|
252
|
+
#else
|
|
253
|
+
{
|
|
254
|
+
UInt32 v = b0;
|
|
255
|
+
v |= v << 8;
|
|
256
|
+
v |= v << 16;
|
|
257
|
+
do
|
|
258
|
+
{
|
|
259
|
+
((UInt32 *)(void *)dest)[0] = v;
|
|
260
|
+
((UInt32 *)(void *)dest)[1] = v;
|
|
261
|
+
dest += 8;
|
|
262
|
+
((UInt32 *)(void *)dest)[0] = v;
|
|
263
|
+
((UInt32 *)(void *)dest)[1] = v;
|
|
264
|
+
dest += 8;
|
|
265
|
+
}
|
|
266
|
+
while (dest < lim);
|
|
267
|
+
}
|
|
268
|
+
#endif
|
|
269
|
+
#else
|
|
270
|
+
do
|
|
271
|
+
{
|
|
272
|
+
dest[0] = (Byte)b0;
|
|
273
|
+
dest[1] = (Byte)b0;
|
|
274
|
+
dest += 2;
|
|
275
|
+
dest[0] = (Byte)b0;
|
|
276
|
+
dest[1] = (Byte)b0;
|
|
277
|
+
dest += 2;
|
|
278
|
+
}
|
|
279
|
+
while (dest < lim);
|
|
280
|
+
#endif
|
|
281
|
+
}
|
|
282
|
+
else if (offset == 2)
|
|
283
|
+
{
|
|
284
|
+
const Byte b1 = src[1];
|
|
285
|
+
{
|
|
286
|
+
do
|
|
287
|
+
{
|
|
288
|
+
dest[0] = (Byte)b0;
|
|
289
|
+
dest[1] = b1;
|
|
290
|
+
dest += 2;
|
|
291
|
+
}
|
|
292
|
+
while (dest < lim);
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
else // (offset == 3)
|
|
296
|
+
{
|
|
297
|
+
const Byte b1 = src[1];
|
|
298
|
+
const Byte b2 = src[2];
|
|
299
|
+
do
|
|
300
|
+
{
|
|
301
|
+
dest[0] = (Byte)b0;
|
|
302
|
+
dest[1] = b1;
|
|
303
|
+
dest[2] = b2;
|
|
304
|
+
dest += 3;
|
|
305
|
+
}
|
|
306
|
+
while (dest < lim);
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
static const size_t kInputBufSize = 1 << 20;
|
|
313
|
+
static const UInt32 k_Filter_BlockSize_MAX = 1 << 22;
|
|
314
|
+
static const unsigned k_Filter_AfterPad_Size = 64;
|
|
315
|
+
|
|
316
|
+
#ifdef Z7_RAR5_SHOW_STAT
|
|
317
|
+
static const unsigned kNumStats1 = 10;
|
|
318
|
+
static const unsigned kNumStats2 = (1 << 12) + 16;
|
|
319
|
+
static UInt32 g_stats1[kNumStats1];
|
|
320
|
+
static UInt32 g_stats2[kNumStats1][kNumStats2];
|
|
321
|
+
#endif
|
|
322
|
+
|
|
323
|
+
#if 1
|
|
324
|
+
MY_ALIGN(32)
|
|
325
|
+
// DICT_SIZE_BITS_MAX-1 are required
|
|
326
|
+
static const Byte k_LenPlusTable[DICT_SIZE_BITS_MAX] =
|
|
327
|
+
{ 0,0,0,0,0,0,0,1,1,1,1,1,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3 };
|
|
328
|
+
#endif
|
|
329
|
+
|
|
330
|
+
|
|
331
|
+
|
|
332
|
+
class CBitDecoder
|
|
333
|
+
{
|
|
334
|
+
public:
|
|
335
|
+
const Byte *_buf;
|
|
336
|
+
const Byte *_bufCheck_Block; // min(ptr for _blockEnd, _bufCheck)
|
|
337
|
+
unsigned _bitPos; // = [0 ... 7]
|
|
338
|
+
bool _wasFinished;
|
|
339
|
+
bool _minorError;
|
|
340
|
+
unsigned _blockEndBits7; // = [0 ... 7] : the number of additional bits in (_blockEnd) poisition.
|
|
341
|
+
HRESULT _hres;
|
|
342
|
+
const Byte *_bufCheck; // relaxed limit (16 bytes before real end of input data in buffer)
|
|
343
|
+
Byte *_bufLim; // end if input data
|
|
344
|
+
Byte *_bufBase;
|
|
345
|
+
ISequentialInStream *_stream;
|
|
346
|
+
|
|
347
|
+
UInt64 _processedSize;
|
|
348
|
+
UInt64 _blockEnd; // absolute end of current block
|
|
349
|
+
// but it doesn't include additional _blockEndBits7 [0 ... 7] bits
|
|
350
|
+
|
|
351
|
+
Z7_FORCE_INLINE
|
|
352
|
+
void CopyFrom(const CBitDecoder &a)
|
|
353
|
+
{
|
|
354
|
+
_buf = a._buf;
|
|
355
|
+
_bufCheck_Block = a._bufCheck_Block;
|
|
356
|
+
_bitPos = a._bitPos;
|
|
357
|
+
_wasFinished = a._wasFinished;
|
|
358
|
+
_blockEndBits7 = a._blockEndBits7;
|
|
359
|
+
_bufCheck = a._bufCheck;
|
|
360
|
+
_bufLim = a._bufLim;
|
|
361
|
+
_bufBase = a._bufBase;
|
|
362
|
+
|
|
363
|
+
_processedSize = a._processedSize;
|
|
364
|
+
_blockEnd = a._blockEnd;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
Z7_FORCE_INLINE
|
|
368
|
+
void RestoreFrom2(const CBitDecoder &a)
|
|
369
|
+
{
|
|
370
|
+
_buf = a._buf;
|
|
371
|
+
_bitPos = a._bitPos;
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
Z7_FORCE_INLINE
|
|
375
|
+
void SetCheck_forBlock()
|
|
376
|
+
{
|
|
377
|
+
_bufCheck_Block = _bufCheck;
|
|
378
|
+
if (_bufCheck > _buf)
|
|
379
|
+
{
|
|
380
|
+
const UInt64 processed = GetProcessedSize_Round();
|
|
381
|
+
if (_blockEnd < processed)
|
|
382
|
+
_bufCheck_Block = _buf;
|
|
383
|
+
else
|
|
384
|
+
{
|
|
385
|
+
const UInt64 delta = _blockEnd - processed;
|
|
386
|
+
if ((size_t)(_bufCheck - _buf) > delta)
|
|
387
|
+
_bufCheck_Block = _buf + (size_t)delta;
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
Z7_FORCE_INLINE
|
|
393
|
+
bool IsBlockOverRead() const
|
|
394
|
+
{
|
|
395
|
+
const UInt64 v = GetProcessedSize_Round();
|
|
396
|
+
if (v < _blockEnd) return false;
|
|
397
|
+
if (v > _blockEnd) return true;
|
|
398
|
+
return _bitPos > _blockEndBits7;
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
/*
|
|
402
|
+
CBitDecoder() throw():
|
|
403
|
+
_buf(0),
|
|
404
|
+
_bufLim(0),
|
|
405
|
+
_bufBase(0),
|
|
406
|
+
_stream(0),
|
|
407
|
+
_processedSize(0),
|
|
408
|
+
_wasFinished(false)
|
|
409
|
+
{}
|
|
410
|
+
*/
|
|
411
|
+
|
|
412
|
+
Z7_FORCE_INLINE
|
|
413
|
+
void Init() throw()
|
|
414
|
+
{
|
|
415
|
+
_blockEnd = 0;
|
|
416
|
+
_blockEndBits7 = 0;
|
|
417
|
+
|
|
418
|
+
_bitPos = 0;
|
|
419
|
+
_processedSize = 0;
|
|
420
|
+
_buf = _bufBase;
|
|
421
|
+
_bufLim = _bufBase;
|
|
422
|
+
_bufCheck = _buf;
|
|
423
|
+
_bufCheck_Block = _buf;
|
|
424
|
+
_wasFinished = false;
|
|
425
|
+
_minorError = false;
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
void Prepare2() throw();
|
|
429
|
+
|
|
430
|
+
Z7_FORCE_INLINE
|
|
431
|
+
void Prepare() throw()
|
|
432
|
+
{
|
|
433
|
+
if (_buf >= _bufCheck)
|
|
434
|
+
Prepare2();
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
Z7_FORCE_INLINE
|
|
438
|
+
bool ExtraBitsWereRead() const
|
|
439
|
+
{
|
|
440
|
+
return _buf >= _bufLim && (_buf > _bufLim || _bitPos != 0);
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
Z7_FORCE_INLINE bool InputEofError() const { return ExtraBitsWereRead(); }
|
|
444
|
+
|
|
445
|
+
Z7_FORCE_INLINE unsigned GetProcessedBits7() const { return _bitPos; }
|
|
446
|
+
Z7_FORCE_INLINE UInt64 GetProcessedSize_Round() const { return _processedSize + (size_t)(_buf - _bufBase); }
|
|
447
|
+
Z7_FORCE_INLINE UInt64 GetProcessedSize() const { return _processedSize + (size_t)(_buf - _bufBase) + ((_bitPos + 7) >> 3); }
|
|
448
|
+
|
|
449
|
+
Z7_FORCE_INLINE
|
|
450
|
+
void AlignToByte()
|
|
451
|
+
{
|
|
452
|
+
if (_bitPos != 0)
|
|
453
|
+
{
|
|
454
|
+
#if 1
|
|
455
|
+
// optional check of unused bits for strict checking:
|
|
456
|
+
// original-unrar doesn't check it:
|
|
457
|
+
const unsigned b = (unsigned)*_buf << _bitPos;
|
|
458
|
+
if (b & 0xff)
|
|
459
|
+
_minorError = true;
|
|
460
|
+
#endif
|
|
461
|
+
_buf++;
|
|
462
|
+
_bitPos = 0;
|
|
463
|
+
}
|
|
464
|
+
// _buf += (_bitPos + 7) >> 3;
|
|
465
|
+
// _bitPos = 0;
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
Z7_FORCE_INLINE
|
|
469
|
+
Byte ReadByte_InAligned()
|
|
470
|
+
{
|
|
471
|
+
return *_buf++;
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
Z7_FORCE_INLINE
|
|
475
|
+
UInt32 GetValue(unsigned numBits) const
|
|
476
|
+
{
|
|
477
|
+
// 0 < numBits <= 17 : supported values
|
|
478
|
+
#if defined(Z7_CPU_FAST_BSWAP_SUPPORTED) && defined(MY_CPU_LE_UNALIGN)
|
|
479
|
+
UInt32 v = GetBe32(_buf);
|
|
480
|
+
#if 1
|
|
481
|
+
return (v >> (32 - numBits - _bitPos)) & ((1u << numBits) - 1);
|
|
482
|
+
#else
|
|
483
|
+
return (v << _bitPos) >> (32 - numBits);
|
|
484
|
+
#endif
|
|
485
|
+
#else
|
|
486
|
+
UInt32 v = ((UInt32)_buf[0] << 16) | ((UInt32)_buf[1] << 8) | (UInt32)_buf[2];
|
|
487
|
+
v >>= 24 - numBits - _bitPos;
|
|
488
|
+
return v & ((1 << numBits) - 1);
|
|
489
|
+
#endif
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
Z7_FORCE_INLINE
|
|
493
|
+
UInt32 GetValue_InHigh32bits() const
|
|
494
|
+
{
|
|
495
|
+
// 0 < numBits <= 17 : supported vales
|
|
496
|
+
#if defined(Z7_CPU_FAST_BSWAP_SUPPORTED) && defined(MY_CPU_LE_UNALIGN)
|
|
497
|
+
return GetBe32(_buf) << _bitPos;
|
|
498
|
+
#else
|
|
499
|
+
const UInt32 v = ((UInt32)_buf[0] << 16) | ((UInt32)_buf[1] << 8) | (UInt32)_buf[2];
|
|
500
|
+
return v << (_bitPos + 8);
|
|
501
|
+
#endif
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
|
|
505
|
+
Z7_FORCE_INLINE
|
|
506
|
+
void MovePos(unsigned numBits)
|
|
507
|
+
{
|
|
508
|
+
numBits += _bitPos;
|
|
509
|
+
_buf += numBits >> 3;
|
|
510
|
+
_bitPos = numBits & 7;
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
|
|
514
|
+
Z7_FORCE_INLINE
|
|
515
|
+
UInt32 ReadBits9(unsigned numBits)
|
|
516
|
+
{
|
|
517
|
+
const Byte *buf = _buf;
|
|
518
|
+
UInt32 v = ((UInt32)buf[0] << 8) | (UInt32)buf[1];
|
|
519
|
+
v &= (UInt32)0xFFFF >> _bitPos;
|
|
520
|
+
numBits += _bitPos;
|
|
521
|
+
v >>= 16 - numBits;
|
|
522
|
+
_buf = buf + (numBits >> 3);
|
|
523
|
+
_bitPos = numBits & 7;
|
|
524
|
+
return v;
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
Z7_FORCE_INLINE
|
|
528
|
+
UInt32 ReadBits_9fix(unsigned numBits)
|
|
529
|
+
{
|
|
530
|
+
const Byte *buf = _buf;
|
|
531
|
+
UInt32 v = ((UInt32)buf[0] << 8) | (UInt32)buf[1];
|
|
532
|
+
const UInt32 mask = (1u << numBits) - 1;
|
|
533
|
+
numBits += _bitPos;
|
|
534
|
+
v >>= 16 - numBits;
|
|
535
|
+
_buf = buf + (numBits >> 3);
|
|
536
|
+
_bitPos = numBits & 7;
|
|
537
|
+
return v & mask;
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
#if 1 && defined(MY_CPU_SIZEOF_POINTER) && (MY_CPU_SIZEOF_POINTER == 8)
|
|
541
|
+
#define Z7_RAR5_USE_64BIT
|
|
542
|
+
#endif
|
|
543
|
+
|
|
544
|
+
#ifdef Z7_RAR5_USE_64BIT
|
|
545
|
+
#define MAX_DICT_LOG (sizeof(size_t) / 8 * 5 + 31)
|
|
546
|
+
#else
|
|
547
|
+
#define MAX_DICT_LOG 31
|
|
548
|
+
#endif
|
|
549
|
+
|
|
550
|
+
#ifdef Z7_RAR5_USE_64BIT
|
|
551
|
+
|
|
552
|
+
Z7_FORCE_INLINE
|
|
553
|
+
size_t ReadBits_Big(unsigned numBits, UInt64 v)
|
|
554
|
+
{
|
|
555
|
+
const UInt64 mask = ((UInt64)1 << numBits) - 1;
|
|
556
|
+
numBits += _bitPos;
|
|
557
|
+
const Byte *buf = _buf;
|
|
558
|
+
// UInt64 v = GetBe64(buf);
|
|
559
|
+
v >>= 64 - numBits;
|
|
560
|
+
_buf = buf + (numBits >> 3);
|
|
561
|
+
_bitPos = numBits & 7;
|
|
562
|
+
return (size_t)(v & mask);
|
|
563
|
+
}
|
|
564
|
+
#define ReadBits_Big25 ReadBits_Big
|
|
565
|
+
|
|
566
|
+
#else
|
|
567
|
+
|
|
568
|
+
// (numBits <= 25) for 32-bit mode
|
|
569
|
+
Z7_FORCE_INLINE
|
|
570
|
+
size_t ReadBits_Big25(unsigned numBits, UInt32 v)
|
|
571
|
+
{
|
|
572
|
+
const UInt32 mask = ((UInt32)1 << numBits) - 1;
|
|
573
|
+
numBits += _bitPos;
|
|
574
|
+
v >>= 32 - numBits;
|
|
575
|
+
_buf += numBits >> 3;
|
|
576
|
+
_bitPos = numBits & 7;
|
|
577
|
+
return v & mask;
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
// numBits != 0
|
|
581
|
+
Z7_FORCE_INLINE
|
|
582
|
+
size_t ReadBits_Big(unsigned numBits, UInt32 v)
|
|
583
|
+
{
|
|
584
|
+
const Byte *buf = _buf;
|
|
585
|
+
// UInt32 v = GetBe32(buf);
|
|
586
|
+
#if 0
|
|
587
|
+
const UInt32 mask = ((UInt32)1 << numBits) - 1;
|
|
588
|
+
numBits += _bitPos;
|
|
589
|
+
if (numBits > 32)
|
|
590
|
+
{
|
|
591
|
+
v <<= numBits - 32;
|
|
592
|
+
v |= (UInt32)buf[4] >> (40 - numBits);
|
|
593
|
+
}
|
|
594
|
+
else
|
|
595
|
+
v >>= 32 - numBits;
|
|
596
|
+
_buf = buf + (numBits >> 3);
|
|
597
|
+
_bitPos = numBits & 7;
|
|
598
|
+
return v & mask;
|
|
599
|
+
#else
|
|
600
|
+
v <<= _bitPos;
|
|
601
|
+
v |= (UInt32)buf[4] >> (8 - _bitPos);
|
|
602
|
+
v >>= 32 - numBits;
|
|
603
|
+
numBits += _bitPos;
|
|
604
|
+
_buf = buf + (numBits >> 3);
|
|
605
|
+
_bitPos = numBits & 7;
|
|
606
|
+
return v;
|
|
607
|
+
#endif
|
|
608
|
+
}
|
|
609
|
+
#endif
|
|
610
|
+
};
|
|
611
|
+
|
|
612
|
+
|
|
613
|
+
static const unsigned kLookaheadSize = 16;
|
|
614
|
+
static const unsigned kInputBufferPadZone = kLookaheadSize;
|
|
615
|
+
|
|
616
|
+
Z7_NO_INLINE
|
|
617
|
+
void CBitDecoder::Prepare2() throw()
|
|
618
|
+
{
|
|
619
|
+
if (_buf > _bufLim)
|
|
620
|
+
return;
|
|
621
|
+
|
|
622
|
+
size_t rem = (size_t)(_bufLim - _buf);
|
|
623
|
+
if (rem != 0)
|
|
624
|
+
memmove(_bufBase, _buf, rem);
|
|
625
|
+
|
|
626
|
+
_bufLim = _bufBase + rem;
|
|
627
|
+
_processedSize += (size_t)(_buf - _bufBase);
|
|
628
|
+
_buf = _bufBase;
|
|
629
|
+
|
|
630
|
+
// we do not look ahead more than 16 bytes before limit checks.
|
|
631
|
+
|
|
632
|
+
if (!_wasFinished)
|
|
633
|
+
{
|
|
634
|
+
while (rem <= kLookaheadSize)
|
|
635
|
+
{
|
|
636
|
+
UInt32 processed = (UInt32)(kInputBufSize - rem);
|
|
637
|
+
// processed = 33; // for debug
|
|
638
|
+
_hres = _stream->Read(_bufLim, processed, &processed);
|
|
639
|
+
_bufLim += processed;
|
|
640
|
+
rem += processed;
|
|
641
|
+
if (processed == 0 || _hres != S_OK)
|
|
642
|
+
{
|
|
643
|
+
_wasFinished = true;
|
|
644
|
+
// if (_hres != S_OK) throw CInBufferException(result);
|
|
645
|
+
break;
|
|
646
|
+
}
|
|
647
|
+
}
|
|
648
|
+
}
|
|
649
|
+
|
|
650
|
+
// we always fill pad zone here.
|
|
651
|
+
// so we don't need to call Prepare2() if (_wasFinished == true)
|
|
652
|
+
memset(_bufLim, 0xFF, kLookaheadSize);
|
|
653
|
+
|
|
654
|
+
if (rem < kLookaheadSize)
|
|
655
|
+
{
|
|
656
|
+
_bufCheck = _buf;
|
|
657
|
+
// memset(_bufLim, 0xFF, kLookaheadSize - rem);
|
|
658
|
+
}
|
|
659
|
+
else
|
|
660
|
+
_bufCheck = _bufLim - kLookaheadSize;
|
|
661
|
+
|
|
662
|
+
SetCheck_forBlock();
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
|
|
666
|
+
enum FilterType
|
|
667
|
+
{
|
|
668
|
+
FILTER_DELTA = 0,
|
|
669
|
+
FILTER_E8,
|
|
670
|
+
FILTER_E8E9,
|
|
671
|
+
FILTER_ARM
|
|
672
|
+
};
|
|
673
|
+
|
|
674
|
+
static const size_t kWriteStep = (size_t)1 << 18;
|
|
675
|
+
// (size_t)1 << 22; // original-unrar
|
|
676
|
+
|
|
677
|
+
// Original unRAR claims that maximum possible filter block size is (1 << 16) now,
|
|
678
|
+
// and (1 << 17) is minimum win size required to support filter.
|
|
679
|
+
// Original unRAR uses (1u << 18) for "extra safety and possible filter area size expansion"
|
|
680
|
+
// We can use any win size, but we use same (1u << 18) for compatibility
|
|
681
|
+
// with WinRar
|
|
682
|
+
|
|
683
|
+
// static const unsigned kWinSize_Log_Min = 17;
|
|
684
|
+
static const size_t kWinSize_Min = 1u << 18;
|
|
685
|
+
|
|
686
|
+
CDecoder::CDecoder():
|
|
687
|
+
_isSolid(false),
|
|
688
|
+
_is_v7(false),
|
|
689
|
+
_wasInit(false),
|
|
690
|
+
// _dictSizeLog(0),
|
|
691
|
+
_dictSize(kWinSize_Min),
|
|
692
|
+
_window(NULL),
|
|
693
|
+
_winPos(0),
|
|
694
|
+
_winSize(0),
|
|
695
|
+
_dictSize_forCheck(0),
|
|
696
|
+
_lzSize(0),
|
|
697
|
+
_lzEnd(0),
|
|
698
|
+
_writtenFileSize(0),
|
|
699
|
+
_filters(NULL),
|
|
700
|
+
_winSize_Allocated(0),
|
|
701
|
+
_inputBuf(NULL)
|
|
702
|
+
{
|
|
703
|
+
#if 1
|
|
704
|
+
memcpy(m_LenPlusTable, k_LenPlusTable, sizeof(k_LenPlusTable));
|
|
705
|
+
#endif
|
|
706
|
+
// printf("\nsizeof(CDecoder) == %d\n", sizeof(CDecoder));
|
|
707
|
+
}
|
|
708
|
+
|
|
709
|
+
CDecoder::~CDecoder()
|
|
710
|
+
{
|
|
711
|
+
#ifdef Z7_RAR5_SHOW_STAT
|
|
712
|
+
printf("\n%4d :", 0);
|
|
713
|
+
for (unsigned k = 0; k < kNumStats1; k++)
|
|
714
|
+
printf(" %8u", (unsigned)g_stats1[k]);
|
|
715
|
+
printf("\n");
|
|
716
|
+
for (unsigned i = 0; i < kNumStats2; i++)
|
|
717
|
+
{
|
|
718
|
+
printf("\n%4d :", i);
|
|
719
|
+
for (unsigned k = 0; k < kNumStats1; k++)
|
|
720
|
+
printf(" %8u", (unsigned)g_stats2[k][i]);
|
|
721
|
+
}
|
|
722
|
+
printf("\n");
|
|
723
|
+
#endif
|
|
724
|
+
|
|
725
|
+
#define Z7_RAR_FREE_WINDOW ::BigFree(_window);
|
|
726
|
+
|
|
727
|
+
Z7_RAR_FREE_WINDOW
|
|
728
|
+
z7_AlignedFree(_inputBuf);
|
|
729
|
+
z7_AlignedFree(_filters);
|
|
730
|
+
}
|
|
731
|
+
|
|
732
|
+
Z7_NO_INLINE
|
|
733
|
+
void CDecoder::DeleteUnusedFilters()
|
|
734
|
+
{
|
|
735
|
+
if (_numUnusedFilters != 0)
|
|
736
|
+
{
|
|
737
|
+
// printf("\nDeleteUnusedFilters _numFilters = %6u\n", _numFilters);
|
|
738
|
+
const unsigned n = _numFilters - _numUnusedFilters;
|
|
739
|
+
_numFilters = n;
|
|
740
|
+
memmove(_filters, _filters + _numUnusedFilters, n * sizeof(CFilter));
|
|
741
|
+
_numUnusedFilters = 0;
|
|
742
|
+
}
|
|
743
|
+
}
|
|
744
|
+
|
|
745
|
+
|
|
746
|
+
Z7_NO_INLINE
|
|
747
|
+
HRESULT CDecoder::WriteData(const Byte *data, size_t size)
|
|
748
|
+
{
|
|
749
|
+
HRESULT res = S_OK;
|
|
750
|
+
if (!_unpackSize_Defined || _writtenFileSize < _unpackSize)
|
|
751
|
+
{
|
|
752
|
+
size_t cur = size;
|
|
753
|
+
if (_unpackSize_Defined)
|
|
754
|
+
{
|
|
755
|
+
const UInt64 rem = _unpackSize - _writtenFileSize;
|
|
756
|
+
if (cur > rem)
|
|
757
|
+
cur = (size_t)rem;
|
|
758
|
+
}
|
|
759
|
+
res = WriteStream(_outStream, data, cur);
|
|
760
|
+
if (res != S_OK)
|
|
761
|
+
_writeError = true;
|
|
762
|
+
}
|
|
763
|
+
_writtenFileSize += size;
|
|
764
|
+
return res;
|
|
765
|
+
}
|
|
766
|
+
|
|
767
|
+
|
|
768
|
+
#if defined(MY_CPU_SIZEOF_POINTER) \
|
|
769
|
+
&& ( MY_CPU_SIZEOF_POINTER == 4 \
|
|
770
|
+
|| MY_CPU_SIZEOF_POINTER == 8)
|
|
771
|
+
#define BR_CONV_USE_OPT_PC_PTR
|
|
772
|
+
#endif
|
|
773
|
+
|
|
774
|
+
#ifdef BR_CONV_USE_OPT_PC_PTR
|
|
775
|
+
#define BR_PC_INIT(lim_back) pc -= (UInt32)(SizeT)data;
|
|
776
|
+
#define BR_PC_GET (pc + (UInt32)(SizeT)data)
|
|
777
|
+
#else
|
|
778
|
+
#define BR_PC_INIT(lim_back) pc += (UInt32)dataSize - (lim_back);
|
|
779
|
+
#define BR_PC_GET (pc - (UInt32)(SizeT)(data_lim - data))
|
|
780
|
+
#endif
|
|
781
|
+
|
|
782
|
+
#ifdef MY_CPU_LE_UNALIGN
|
|
783
|
+
#define Z7_RAR5_FILTER_USE_LE_UNALIGN
|
|
784
|
+
#endif
|
|
785
|
+
|
|
786
|
+
#ifdef Z7_RAR5_FILTER_USE_LE_UNALIGN
|
|
787
|
+
#define RAR_E8_FILT(mask) \
|
|
788
|
+
{ \
|
|
789
|
+
for (;;) \
|
|
790
|
+
{ UInt32 v; \
|
|
791
|
+
do { \
|
|
792
|
+
v = GetUi32(data) ^ (UInt32)0xe8e8e8e8; \
|
|
793
|
+
data += 4; \
|
|
794
|
+
if ((v & ((UInt32)(mask) << (8 * 0))) == 0) { data -= 3; break; } \
|
|
795
|
+
if ((v & ((UInt32)(mask) << (8 * 1))) == 0) { data -= 2; break; } \
|
|
796
|
+
if ((v & ((UInt32)(mask) << (8 * 2))) == 0) { data -= 1; break; } } \
|
|
797
|
+
while((v & ((UInt32)(mask) << (8 * 3)))); \
|
|
798
|
+
if (data > data_lim) break; \
|
|
799
|
+
const UInt32 offset = BR_PC_GET & (kFileSize - 1); \
|
|
800
|
+
const UInt32 addr = GetUi32(data); \
|
|
801
|
+
data += 4; \
|
|
802
|
+
if (addr < kFileSize) \
|
|
803
|
+
SetUi32(data - 4, addr - offset) \
|
|
804
|
+
else if (addr > ~offset) /* if (addr > ((UInt32)0xFFFFFFFF - offset)) */ \
|
|
805
|
+
SetUi32(data - 4, addr + kFileSize) \
|
|
806
|
+
} \
|
|
807
|
+
}
|
|
808
|
+
#else
|
|
809
|
+
#define RAR_E8_FILT(get_byte) \
|
|
810
|
+
{ \
|
|
811
|
+
for (;;) \
|
|
812
|
+
{ \
|
|
813
|
+
if ((get_byte) != 0xe8) \
|
|
814
|
+
if ((get_byte) != 0xe8) \
|
|
815
|
+
if ((get_byte) != 0xe8) \
|
|
816
|
+
if ((get_byte) != 0xe8) \
|
|
817
|
+
continue; \
|
|
818
|
+
{ if (data > data_lim) break; \
|
|
819
|
+
const UInt32 offset = BR_PC_GET & (kFileSize - 1); \
|
|
820
|
+
const UInt32 addr = GetUi32(data); \
|
|
821
|
+
data += 4; \
|
|
822
|
+
if (addr < kFileSize) \
|
|
823
|
+
SetUi32(data - 4, addr - offset) \
|
|
824
|
+
else if (addr > ~offset) /* if (addr > ((UInt32)0xFFFFFFFF - offset)) */ \
|
|
825
|
+
SetUi32(data - 4, addr + kFileSize) \
|
|
826
|
+
} \
|
|
827
|
+
} \
|
|
828
|
+
}
|
|
829
|
+
#endif
|
|
830
|
+
|
|
831
|
+
HRESULT CDecoder::ExecuteFilter(const CFilter &f)
|
|
832
|
+
{
|
|
833
|
+
Byte *data = _filterSrc;
|
|
834
|
+
UInt32 dataSize = f.Size;
|
|
835
|
+
// printf("\nType = %d offset = %9d size = %5d", f.Type, (unsigned)(f.Start - _lzFileStart), dataSize);
|
|
836
|
+
|
|
837
|
+
if (f.Type == FILTER_DELTA)
|
|
838
|
+
{
|
|
839
|
+
// static unsigned g1 = 0, g2 = 0; g1 += dataSize;
|
|
840
|
+
// if (g2++ % 100 == 0) printf("DELTA num %8u, size %8u MiB, channels = %2u curSize=%8u\n", g2, (g1 >> 20), f.Channels, dataSize);
|
|
841
|
+
_filterDst.AllocAtLeast_max((size_t)dataSize, k_Filter_BlockSize_MAX);
|
|
842
|
+
if (!_filterDst.IsAllocated())
|
|
843
|
+
return E_OUTOFMEMORY;
|
|
844
|
+
|
|
845
|
+
Byte *dest = _filterDst;
|
|
846
|
+
const unsigned numChannels = f.Channels;
|
|
847
|
+
unsigned curChannel = 0;
|
|
848
|
+
do
|
|
849
|
+
{
|
|
850
|
+
Byte prevByte = 0;
|
|
851
|
+
Byte *dest2 = dest + curChannel;
|
|
852
|
+
const Byte *dest_lim = dest + dataSize;
|
|
853
|
+
for (; dest2 < dest_lim; dest2 += numChannels)
|
|
854
|
+
*dest2 = (prevByte = (Byte)(prevByte - *data++));
|
|
855
|
+
}
|
|
856
|
+
while (++curChannel != numChannels);
|
|
857
|
+
// return WriteData(dest, dataSize);
|
|
858
|
+
data = dest;
|
|
859
|
+
}
|
|
860
|
+
else if (f.Type < FILTER_ARM)
|
|
861
|
+
{
|
|
862
|
+
// FILTER_E8 or FILTER_E8E9
|
|
863
|
+
if (dataSize > 4)
|
|
864
|
+
{
|
|
865
|
+
UInt32 pc = (UInt32)(f.Start - _lzFileStart);
|
|
866
|
+
const UInt32 kFileSize = (UInt32)1 << 24;
|
|
867
|
+
const Byte *data_lim = data + dataSize - 4;
|
|
868
|
+
BR_PC_INIT(4) // because (data_lim) was moved back for 4 bytes
|
|
869
|
+
data[dataSize] = 0xe8;
|
|
870
|
+
if (f.Type == FILTER_E8)
|
|
871
|
+
{
|
|
872
|
+
// static unsigned g1 = 0; g1 += dataSize; printf("\n FILTER_E8 %u", (g1 >> 20));
|
|
873
|
+
#ifdef Z7_RAR5_FILTER_USE_LE_UNALIGN
|
|
874
|
+
RAR_E8_FILT (0xff)
|
|
875
|
+
#else
|
|
876
|
+
RAR_E8_FILT (*data++)
|
|
877
|
+
#endif
|
|
878
|
+
}
|
|
879
|
+
else
|
|
880
|
+
{
|
|
881
|
+
// static unsigned g1 = 0; g1 += dataSize; printf("\n FILTER_E8_E9 %u", (g1 >> 20));
|
|
882
|
+
#ifdef Z7_RAR5_FILTER_USE_LE_UNALIGN
|
|
883
|
+
RAR_E8_FILT (0xfe)
|
|
884
|
+
#else
|
|
885
|
+
RAR_E8_FILT (*data++ & 0xfe)
|
|
886
|
+
#endif
|
|
887
|
+
}
|
|
888
|
+
}
|
|
889
|
+
data = _filterSrc;
|
|
890
|
+
}
|
|
891
|
+
else if (f.Type == FILTER_ARM)
|
|
892
|
+
{
|
|
893
|
+
UInt32 pc = (UInt32)(f.Start - _lzFileStart);
|
|
894
|
+
#if 0
|
|
895
|
+
// z7_BranchConv_ARM_Dec expects that (fileOffset & 3) == 0;
|
|
896
|
+
// but even if (fileOffset & 3) then current code
|
|
897
|
+
// in z7_BranchConv_ARM_Dec works same way as unrar's code still.
|
|
898
|
+
z7_BranchConv_ARM_Dec(data, dataSize, pc - 8);
|
|
899
|
+
#else
|
|
900
|
+
dataSize &= ~(UInt32)3;
|
|
901
|
+
if (dataSize)
|
|
902
|
+
{
|
|
903
|
+
Byte *data_lim = data + dataSize;
|
|
904
|
+
data_lim[3] = 0xeb;
|
|
905
|
+
BR_PC_INIT(0)
|
|
906
|
+
pc -= 4; // because (data) will point to next instruction
|
|
907
|
+
for (;;) // do
|
|
908
|
+
{
|
|
909
|
+
data += 4;
|
|
910
|
+
if (data[-1] != 0xeb)
|
|
911
|
+
continue;
|
|
912
|
+
if (data > data_lim)
|
|
913
|
+
break;
|
|
914
|
+
{
|
|
915
|
+
UInt32 v = GetUi32a(data - 4) - (BR_PC_GET >> 2);
|
|
916
|
+
v &= 0x00ffffff;
|
|
917
|
+
v |= 0xeb000000;
|
|
918
|
+
SetUi32a(data - 4, v)
|
|
919
|
+
}
|
|
920
|
+
}
|
|
921
|
+
}
|
|
922
|
+
#endif
|
|
923
|
+
data = _filterSrc;
|
|
924
|
+
}
|
|
925
|
+
else
|
|
926
|
+
{
|
|
927
|
+
_unsupportedFilter = true;
|
|
928
|
+
My_ZeroMemory(data, dataSize);
|
|
929
|
+
// return S_OK; // unrar
|
|
930
|
+
}
|
|
931
|
+
// return WriteData(_filterSrc, (size_t)f.Size);
|
|
932
|
+
return WriteData(data, (size_t)f.Size);
|
|
933
|
+
}
|
|
934
|
+
|
|
935
|
+
|
|
936
|
+
HRESULT CDecoder::WriteBuf()
|
|
937
|
+
{
|
|
938
|
+
DeleteUnusedFilters();
|
|
939
|
+
const UInt64 lzSize = _lzSize + _winPos;
|
|
940
|
+
|
|
941
|
+
for (unsigned i = 0; i < _numFilters;)
|
|
942
|
+
{
|
|
943
|
+
const size_t lzAvail = (size_t)(lzSize - _lzWritten);
|
|
944
|
+
if (lzAvail == 0)
|
|
945
|
+
break;
|
|
946
|
+
// (lzAvail != 0)
|
|
947
|
+
const CFilter &f = _filters[i];
|
|
948
|
+
const UInt64 blockStart = f.Start;
|
|
949
|
+
if (blockStart > _lzWritten)
|
|
950
|
+
{
|
|
951
|
+
const UInt64 rem = blockStart - _lzWritten;
|
|
952
|
+
// (rem != 0)
|
|
953
|
+
size_t size = lzAvail;
|
|
954
|
+
if (size > rem)
|
|
955
|
+
size = (size_t)rem;
|
|
956
|
+
// (size != 0)
|
|
957
|
+
RINOK(WriteData(_window + _winPos - lzAvail, size))
|
|
958
|
+
_lzWritten += size;
|
|
959
|
+
continue;
|
|
960
|
+
}
|
|
961
|
+
|
|
962
|
+
// (blockStart <= _lzWritten)
|
|
963
|
+
const UInt32 blockSize = f.Size;
|
|
964
|
+
size_t offset = (size_t)(_lzWritten - blockStart);
|
|
965
|
+
if (offset == 0)
|
|
966
|
+
{
|
|
967
|
+
_filterSrc.AllocAtLeast_max(
|
|
968
|
+
(size_t)blockSize + k_Filter_AfterPad_Size,
|
|
969
|
+
k_Filter_BlockSize_MAX + k_Filter_AfterPad_Size);
|
|
970
|
+
if (!_filterSrc.IsAllocated())
|
|
971
|
+
return E_OUTOFMEMORY;
|
|
972
|
+
}
|
|
973
|
+
|
|
974
|
+
const size_t blockRem = (size_t)blockSize - offset;
|
|
975
|
+
size_t size = lzAvail;
|
|
976
|
+
if (size > blockRem)
|
|
977
|
+
size = blockRem;
|
|
978
|
+
memcpy(_filterSrc + offset, _window + _winPos - lzAvail, size);
|
|
979
|
+
_lzWritten += size;
|
|
980
|
+
offset += size;
|
|
981
|
+
if (offset != blockSize)
|
|
982
|
+
return S_OK;
|
|
983
|
+
|
|
984
|
+
_numUnusedFilters = ++i;
|
|
985
|
+
RINOK(ExecuteFilter(f))
|
|
986
|
+
}
|
|
987
|
+
|
|
988
|
+
DeleteUnusedFilters();
|
|
989
|
+
if (_numFilters)
|
|
990
|
+
return S_OK;
|
|
991
|
+
const size_t lzAvail = (size_t)(lzSize - _lzWritten);
|
|
992
|
+
RINOK(WriteData(_window + _winPos - lzAvail, lzAvail))
|
|
993
|
+
_lzWritten += lzAvail;
|
|
994
|
+
return S_OK;
|
|
995
|
+
}
|
|
996
|
+
|
|
997
|
+
|
|
998
|
+
Z7_NO_INLINE
|
|
999
|
+
static UInt32 ReadUInt32(CBitDecoder &bi)
|
|
1000
|
+
{
|
|
1001
|
+
const unsigned numBits = (unsigned)bi.ReadBits_9fix(2) * 8 + 8;
|
|
1002
|
+
UInt32 v = 0;
|
|
1003
|
+
unsigned i = 0;
|
|
1004
|
+
do
|
|
1005
|
+
{
|
|
1006
|
+
v += (UInt32)bi.ReadBits_9fix(8) << i;
|
|
1007
|
+
i += 8;
|
|
1008
|
+
}
|
|
1009
|
+
while (i != numBits);
|
|
1010
|
+
return v;
|
|
1011
|
+
}
|
|
1012
|
+
|
|
1013
|
+
|
|
1014
|
+
static const unsigned MAX_UNPACK_FILTERS = 8192;
|
|
1015
|
+
|
|
1016
|
+
HRESULT CDecoder::AddFilter(CBitDecoder &_bitStream)
|
|
1017
|
+
{
|
|
1018
|
+
DeleteUnusedFilters();
|
|
1019
|
+
|
|
1020
|
+
if (_numFilters >= MAX_UNPACK_FILTERS)
|
|
1021
|
+
{
|
|
1022
|
+
RINOK(WriteBuf())
|
|
1023
|
+
DeleteUnusedFilters();
|
|
1024
|
+
if (_numFilters >= MAX_UNPACK_FILTERS)
|
|
1025
|
+
{
|
|
1026
|
+
_unsupportedFilter = true;
|
|
1027
|
+
InitFilters();
|
|
1028
|
+
}
|
|
1029
|
+
}
|
|
1030
|
+
|
|
1031
|
+
_bitStream.Prepare();
|
|
1032
|
+
|
|
1033
|
+
CFilter f;
|
|
1034
|
+
const UInt32 blockStart = ReadUInt32(_bitStream);
|
|
1035
|
+
f.Size = ReadUInt32(_bitStream);
|
|
1036
|
+
|
|
1037
|
+
if (f.Size > k_Filter_BlockSize_MAX)
|
|
1038
|
+
{
|
|
1039
|
+
_unsupportedFilter = true;
|
|
1040
|
+
f.Size = 0; // unrar 5.5.5
|
|
1041
|
+
}
|
|
1042
|
+
|
|
1043
|
+
f.Type = (Byte)_bitStream.ReadBits_9fix(3);
|
|
1044
|
+
f.Channels = 0;
|
|
1045
|
+
if (f.Type == FILTER_DELTA)
|
|
1046
|
+
f.Channels = (Byte)(_bitStream.ReadBits_9fix(5) + 1);
|
|
1047
|
+
f.Start = _lzSize + _winPos + blockStart;
|
|
1048
|
+
|
|
1049
|
+
#if 0
|
|
1050
|
+
static unsigned z_cnt = 0; if (z_cnt++ % 100 == 0)
|
|
1051
|
+
printf ("\nFilter %7u : %4u : %8p, st=%8x, size=%8x, type=%u ch=%2u",
|
|
1052
|
+
z_cnt, (unsigned)_filters.Size(), (void *)(size_t)(_lzSize + _winPos),
|
|
1053
|
+
(unsigned)blockStart, (unsigned)f.Size, (unsigned)f.Type, (unsigned)f.Channels);
|
|
1054
|
+
#endif
|
|
1055
|
+
|
|
1056
|
+
if (f.Start < _filterEnd)
|
|
1057
|
+
_unsupportedFilter = true;
|
|
1058
|
+
else
|
|
1059
|
+
{
|
|
1060
|
+
_filterEnd = f.Start + f.Size;
|
|
1061
|
+
if (f.Size != 0)
|
|
1062
|
+
{
|
|
1063
|
+
if (!_filters)
|
|
1064
|
+
{
|
|
1065
|
+
_filters = (CFilter *)z7_AlignedAlloc(MAX_UNPACK_FILTERS * sizeof(CFilter));
|
|
1066
|
+
if (!_filters)
|
|
1067
|
+
return E_OUTOFMEMORY;
|
|
1068
|
+
}
|
|
1069
|
+
// printf("\n_numFilters = %6u\n", _numFilters);
|
|
1070
|
+
const unsigned i = _numFilters++;
|
|
1071
|
+
_filters[i] = f;
|
|
1072
|
+
}
|
|
1073
|
+
}
|
|
1074
|
+
|
|
1075
|
+
return S_OK;
|
|
1076
|
+
}
|
|
1077
|
+
|
|
1078
|
+
|
|
1079
|
+
#define RIF(x) { if (!(x)) return S_FALSE; }
|
|
1080
|
+
|
|
1081
|
+
#if 1
|
|
1082
|
+
#define PRINT_CNT(name, skip)
|
|
1083
|
+
#else
|
|
1084
|
+
#define PRINT_CNT(name, skip) \
|
|
1085
|
+
{ static unsigned g_cnt = 0; if (g_cnt++ % skip == 0) printf("\n%16s: %8u", name, g_cnt); }
|
|
1086
|
+
#endif
|
|
1087
|
+
|
|
1088
|
+
HRESULT CDecoder::ReadTables(CBitDecoder &_bitStream)
|
|
1089
|
+
{
|
|
1090
|
+
if (_progress)
|
|
1091
|
+
{
|
|
1092
|
+
const UInt64 packSize = _bitStream.GetProcessedSize();
|
|
1093
|
+
if (packSize - _progress_Pack >= (1u << 24)
|
|
1094
|
+
|| _writtenFileSize - _progress_Unpack >= (1u << 26))
|
|
1095
|
+
{
|
|
1096
|
+
_progress_Pack = packSize;
|
|
1097
|
+
_progress_Unpack = _writtenFileSize;
|
|
1098
|
+
RINOK(_progress->SetRatioInfo(&_progress_Pack, &_writtenFileSize))
|
|
1099
|
+
}
|
|
1100
|
+
// printf("\ntable read pos=%p packSize=%p _writtenFileSize = %p\n", (size_t)_winPos, (size_t)packSize, (size_t)_writtenFileSize);
|
|
1101
|
+
}
|
|
1102
|
+
|
|
1103
|
+
// _bitStream is aligned already
|
|
1104
|
+
_bitStream.Prepare();
|
|
1105
|
+
{
|
|
1106
|
+
const unsigned flags = _bitStream.ReadByte_InAligned();
|
|
1107
|
+
/* ((flags & 20) == 0) in all rar archives now,
|
|
1108
|
+
but (flags & 20) flag can be used as some decoding hint in future versions of original rar.
|
|
1109
|
+
So we ignore that bit here. */
|
|
1110
|
+
unsigned checkSum = _bitStream.ReadByte_InAligned();
|
|
1111
|
+
checkSum ^= flags;
|
|
1112
|
+
const unsigned num = (flags >> 3) & 3;
|
|
1113
|
+
if (num >= 3)
|
|
1114
|
+
return S_FALSE;
|
|
1115
|
+
UInt32 blockSize = _bitStream.ReadByte_InAligned();
|
|
1116
|
+
checkSum ^= blockSize;
|
|
1117
|
+
if (num != 0)
|
|
1118
|
+
{
|
|
1119
|
+
{
|
|
1120
|
+
const unsigned b = _bitStream.ReadByte_InAligned();
|
|
1121
|
+
checkSum ^= b;
|
|
1122
|
+
blockSize += (UInt32)b << 8;
|
|
1123
|
+
}
|
|
1124
|
+
if (num > 1)
|
|
1125
|
+
{
|
|
1126
|
+
const unsigned b = _bitStream.ReadByte_InAligned();
|
|
1127
|
+
checkSum ^= b;
|
|
1128
|
+
blockSize += (UInt32)b << 16;
|
|
1129
|
+
}
|
|
1130
|
+
}
|
|
1131
|
+
if (checkSum != 0x5A)
|
|
1132
|
+
return S_FALSE;
|
|
1133
|
+
unsigned blockSizeBits7 = (flags & 7) + 1;
|
|
1134
|
+
blockSize += (UInt32)(blockSizeBits7 >> 3);
|
|
1135
|
+
if (blockSize == 0)
|
|
1136
|
+
{
|
|
1137
|
+
// it's error in data stream
|
|
1138
|
+
// but original-unrar ignores that error
|
|
1139
|
+
_bitStream._minorError = true;
|
|
1140
|
+
#if 1
|
|
1141
|
+
// we ignore that error as original-unrar:
|
|
1142
|
+
blockSizeBits7 = 0;
|
|
1143
|
+
blockSize = 1;
|
|
1144
|
+
#else
|
|
1145
|
+
// we can stop decoding:
|
|
1146
|
+
return S_FALSE;
|
|
1147
|
+
#endif
|
|
1148
|
+
}
|
|
1149
|
+
blockSize--;
|
|
1150
|
+
blockSizeBits7 &= 7;
|
|
1151
|
+
PRINT_CNT("Blocks", 100)
|
|
1152
|
+
/*
|
|
1153
|
+
{
|
|
1154
|
+
static unsigned g_prev = 0;
|
|
1155
|
+
static unsigned g_cnt = 0;
|
|
1156
|
+
unsigned proc = unsigned(_winPos);
|
|
1157
|
+
if (g_cnt++ % 100 == 0) printf(" c_size = %8u ", blockSize);
|
|
1158
|
+
if (g_cnt++ % 100 == 1) printf(" unp_size = %8u", proc - g_prev);
|
|
1159
|
+
g_prev = proc;
|
|
1160
|
+
}
|
|
1161
|
+
*/
|
|
1162
|
+
_bitStream._blockEndBits7 = blockSizeBits7;
|
|
1163
|
+
_bitStream._blockEnd = _bitStream.GetProcessedSize_Round() + blockSize;
|
|
1164
|
+
_bitStream.SetCheck_forBlock();
|
|
1165
|
+
_isLastBlock = ((flags & 0x40) != 0);
|
|
1166
|
+
if ((flags & 0x80) == 0)
|
|
1167
|
+
{
|
|
1168
|
+
if (!_tableWasFilled)
|
|
1169
|
+
// if (blockSize != 0 || blockSizeBits7 != 0)
|
|
1170
|
+
if (blockSize + blockSizeBits7 != 0)
|
|
1171
|
+
return S_FALSE;
|
|
1172
|
+
return S_OK;
|
|
1173
|
+
}
|
|
1174
|
+
_tableWasFilled = false;
|
|
1175
|
+
}
|
|
1176
|
+
|
|
1177
|
+
PRINT_CNT("Tables", 100);
|
|
1178
|
+
|
|
1179
|
+
const unsigned kLevelTableSize = 20;
|
|
1180
|
+
const unsigned k_NumHufTableBits_Level = 6;
|
|
1181
|
+
NHuffman::CDecoder256<kNumHufBits, kLevelTableSize, k_NumHufTableBits_Level> m_LevelDecoder;
|
|
1182
|
+
const unsigned kTablesSizesSum_MAX = kMainTableSize + kDistTableSize_MAX + kAlignTableSize + kLenTableSize;
|
|
1183
|
+
Byte lens[kTablesSizesSum_MAX];
|
|
1184
|
+
{
|
|
1185
|
+
// (kLevelTableSize + 16 < kTablesSizesSum). So we use lens[] array for (Level) table
|
|
1186
|
+
// Byte lens2[kLevelTableSize + 16];
|
|
1187
|
+
unsigned i = 0;
|
|
1188
|
+
do
|
|
1189
|
+
{
|
|
1190
|
+
if (_bitStream._buf >= _bitStream._bufCheck_Block)
|
|
1191
|
+
{
|
|
1192
|
+
_bitStream.Prepare();
|
|
1193
|
+
if (_bitStream.IsBlockOverRead())
|
|
1194
|
+
return S_FALSE;
|
|
1195
|
+
}
|
|
1196
|
+
const unsigned len = (unsigned)_bitStream.ReadBits_9fix(4);
|
|
1197
|
+
if (len == 15)
|
|
1198
|
+
{
|
|
1199
|
+
unsigned num = (unsigned)_bitStream.ReadBits_9fix(4);
|
|
1200
|
+
if (num != 0)
|
|
1201
|
+
{
|
|
1202
|
+
num += 2;
|
|
1203
|
+
num += i;
|
|
1204
|
+
// we are allowed to overwrite to lens[] for extra 16 bytes after kLevelTableSize
|
|
1205
|
+
#if 0
|
|
1206
|
+
if (num > kLevelTableSize)
|
|
1207
|
+
{
|
|
1208
|
+
// we ignore this error as original-unrar
|
|
1209
|
+
num = kLevelTableSize;
|
|
1210
|
+
// return S_FALSE;
|
|
1211
|
+
}
|
|
1212
|
+
#endif
|
|
1213
|
+
do
|
|
1214
|
+
lens[i++] = 0;
|
|
1215
|
+
while (i < num);
|
|
1216
|
+
continue;
|
|
1217
|
+
}
|
|
1218
|
+
}
|
|
1219
|
+
lens[i++] = (Byte)len;
|
|
1220
|
+
}
|
|
1221
|
+
while (i < kLevelTableSize);
|
|
1222
|
+
if (_bitStream.IsBlockOverRead())
|
|
1223
|
+
return S_FALSE;
|
|
1224
|
+
RIF(m_LevelDecoder.Build(lens, NHuffman::k_BuildMode_Full))
|
|
1225
|
+
}
|
|
1226
|
+
|
|
1227
|
+
unsigned i = 0;
|
|
1228
|
+
const unsigned tableSize = _is_v7 ?
|
|
1229
|
+
kTablesSizesSum_MAX :
|
|
1230
|
+
kTablesSizesSum_MAX - kExtraDistSymbols_v7;
|
|
1231
|
+
do
|
|
1232
|
+
{
|
|
1233
|
+
if (_bitStream._buf >= _bitStream._bufCheck_Block)
|
|
1234
|
+
{
|
|
1235
|
+
// if (_bitStream._buf >= _bitStream._bufCheck)
|
|
1236
|
+
_bitStream.Prepare();
|
|
1237
|
+
if (_bitStream.IsBlockOverRead())
|
|
1238
|
+
return S_FALSE;
|
|
1239
|
+
}
|
|
1240
|
+
const unsigned sym = m_LevelDecoder.DecodeFull(&_bitStream);
|
|
1241
|
+
if (sym < 16)
|
|
1242
|
+
lens[i++] = (Byte)sym;
|
|
1243
|
+
#if 0
|
|
1244
|
+
else if (sym > kLevelTableSize)
|
|
1245
|
+
return S_FALSE;
|
|
1246
|
+
#endif
|
|
1247
|
+
else
|
|
1248
|
+
{
|
|
1249
|
+
unsigned num = ((sym /* - 16 */) & 1) * 4;
|
|
1250
|
+
num += num + 3 + (unsigned)_bitStream.ReadBits9(num + 3);
|
|
1251
|
+
num += i;
|
|
1252
|
+
if (num > tableSize)
|
|
1253
|
+
{
|
|
1254
|
+
// we ignore this error as original-unrar
|
|
1255
|
+
num = tableSize;
|
|
1256
|
+
// return S_FALSE;
|
|
1257
|
+
}
|
|
1258
|
+
unsigned v = 0;
|
|
1259
|
+
if (sym < 16 + 2)
|
|
1260
|
+
{
|
|
1261
|
+
if (i == 0)
|
|
1262
|
+
return S_FALSE;
|
|
1263
|
+
v = lens[(size_t)i - 1];
|
|
1264
|
+
}
|
|
1265
|
+
do
|
|
1266
|
+
lens[i++] = (Byte)v;
|
|
1267
|
+
while (i < num);
|
|
1268
|
+
}
|
|
1269
|
+
}
|
|
1270
|
+
while (i < tableSize);
|
|
1271
|
+
|
|
1272
|
+
if (_bitStream.IsBlockOverRead())
|
|
1273
|
+
return S_FALSE;
|
|
1274
|
+
if (_bitStream.InputEofError())
|
|
1275
|
+
return S_FALSE;
|
|
1276
|
+
|
|
1277
|
+
/* We suppose that original-rar encoder can create only two cases for Huffman:
|
|
1278
|
+
1) Empty Huffman tree (if num_used_symbols == 0)
|
|
1279
|
+
2) Full Huffman tree (if num_used_symbols != 0)
|
|
1280
|
+
Usually the block contains at least one symbol for m_MainDecoder.
|
|
1281
|
+
So original-rar-encoder creates full Huffman tree for m_MainDecoder.
|
|
1282
|
+
But we suppose that (num_used_symbols == 0) is possible for m_MainDecoder,
|
|
1283
|
+
because file must be finished with (_isLastBlock) flag,
|
|
1284
|
+
even if there are no symbols in m_MainDecoder.
|
|
1285
|
+
So we use k_BuildMode_Full_or_Empty for m_MainDecoder.
|
|
1286
|
+
*/
|
|
1287
|
+
const NHuffman::enum_BuildMode buildMode = NHuffman::
|
|
1288
|
+
k_BuildMode_Full_or_Empty; // strict check
|
|
1289
|
+
// k_BuildMode_Partial; // non-strict check (ignore errors)
|
|
1290
|
+
|
|
1291
|
+
RIF(m_MainDecoder.Build(&lens[0], buildMode))
|
|
1292
|
+
if (!_is_v7)
|
|
1293
|
+
{
|
|
1294
|
+
#if 1
|
|
1295
|
+
/* we use this manual loop to avoid compiler BUG.
|
|
1296
|
+
GCC 4.9.2 compiler has BUG with overlapping memmove() to right in local array. */
|
|
1297
|
+
Byte *dest = lens + kMainTableSize + kDistTableSize_v6 +
|
|
1298
|
+
kAlignTableSize + kLenTableSize - 1;
|
|
1299
|
+
unsigned num = kAlignTableSize + kLenTableSize;
|
|
1300
|
+
do
|
|
1301
|
+
{
|
|
1302
|
+
dest[kExtraDistSymbols_v7] = dest[0];
|
|
1303
|
+
dest--;
|
|
1304
|
+
}
|
|
1305
|
+
while (--num);
|
|
1306
|
+
#else
|
|
1307
|
+
memmove(lens + kMainTableSize + kDistTableSize_v6 + kExtraDistSymbols_v7,
|
|
1308
|
+
lens + kMainTableSize + kDistTableSize_v6,
|
|
1309
|
+
kAlignTableSize + kLenTableSize);
|
|
1310
|
+
#endif
|
|
1311
|
+
memset(lens + kMainTableSize + kDistTableSize_v6, 0, kExtraDistSymbols_v7);
|
|
1312
|
+
}
|
|
1313
|
+
|
|
1314
|
+
RIF(m_DistDecoder.Build(&lens[kMainTableSize], buildMode))
|
|
1315
|
+
RIF( m_LenDecoder.Build(&lens[kMainTableSize
|
|
1316
|
+
+ kDistTableSize_MAX + kAlignTableSize], buildMode))
|
|
1317
|
+
|
|
1318
|
+
_useAlignBits = false;
|
|
1319
|
+
for (i = 0; i < kAlignTableSize; i++)
|
|
1320
|
+
if (lens[kMainTableSize + kDistTableSize_MAX + (size_t)i] != kNumAlignBits)
|
|
1321
|
+
{
|
|
1322
|
+
RIF(m_AlignDecoder.Build(&lens[kMainTableSize + kDistTableSize_MAX], buildMode))
|
|
1323
|
+
_useAlignBits = true;
|
|
1324
|
+
break;
|
|
1325
|
+
}
|
|
1326
|
+
|
|
1327
|
+
_tableWasFilled = true;
|
|
1328
|
+
return S_OK;
|
|
1329
|
+
}
|
|
1330
|
+
|
|
1331
|
+
static inline CLenType SlotToLen(CBitDecoder &_bitStream, CLenType slot)
|
|
1332
|
+
{
|
|
1333
|
+
const unsigned numBits = ((unsigned)slot >> 2) - 1;
|
|
1334
|
+
return ((4 | (slot & 3)) << numBits) + (CLenType)_bitStream.ReadBits9(numBits);
|
|
1335
|
+
}
|
|
1336
|
+
|
|
1337
|
+
|
|
1338
|
+
static const unsigned kSymbolRep = 258;
|
|
1339
|
+
static const unsigned kMaxMatchLen = 0x1001 + 3;
|
|
1340
|
+
|
|
1341
|
+
enum enum_exit_type
|
|
1342
|
+
{
|
|
1343
|
+
Z7_RAR_EXIT_TYPE_NONE,
|
|
1344
|
+
Z7_RAR_EXIT_TYPE_ADD_FILTER
|
|
1345
|
+
};
|
|
1346
|
+
|
|
1347
|
+
|
|
1348
|
+
#define LZ_RESTORE \
|
|
1349
|
+
{ \
|
|
1350
|
+
_reps[0] = rep0; \
|
|
1351
|
+
_winPos = (size_t)(winPos - _window); \
|
|
1352
|
+
_buf_Res = _bitStream._buf; \
|
|
1353
|
+
_bitPos_Res = _bitStream._bitPos; \
|
|
1354
|
+
}
|
|
1355
|
+
|
|
1356
|
+
#define LZ_LOOP_BREAK_OK { break; }
|
|
1357
|
+
// #define LZ_LOOP_BREAK_ERROR { _lzError = LZ_ERROR_TYPE_SYM; break; }
|
|
1358
|
+
// #define LZ_LOOP_BREAK_ERROR { LZ_RESTORE; return S_FALSE; }
|
|
1359
|
+
#define LZ_LOOP_BREAK_ERROR { goto decode_error; }
|
|
1360
|
+
// goto decode_error; }
|
|
1361
|
+
// #define LZ_LOOP_BREAK_ERROR { break; }
|
|
1362
|
+
|
|
1363
|
+
#define Z7_RAR_HUFF_DECODE_CHECK_break(sym, huf, kNumTableBits, bitStream) \
|
|
1364
|
+
Z7_HUFF_DECODE_CHECK(sym, huf, kNumHufBits, kNumTableBits, bitStream, { LZ_LOOP_BREAK_ERROR })
|
|
1365
|
+
|
|
1366
|
+
|
|
1367
|
+
/*
|
|
1368
|
+
DecodeLZ2() will stop decoding if it reaches limit when (_winPos >= _limit)
|
|
1369
|
+
at return:
|
|
1370
|
+
(_winPos < _limit + kMaxMatchLen)
|
|
1371
|
+
also it can write up to (COPY_CHUNK_SIZE - 1) additional junk bytes after (_winPos).
|
|
1372
|
+
*/
|
|
1373
|
+
HRESULT CDecoder::DecodeLZ2(const CBitDecoder &bitStream) throw()
|
|
1374
|
+
{
|
|
1375
|
+
#if 0
|
|
1376
|
+
Byte k_LenPlusTable_LOC[DICT_SIZE_BITS_MAX];
|
|
1377
|
+
memcpy(k_LenPlusTable_LOC, k_LenPlusTable, sizeof(k_LenPlusTable));
|
|
1378
|
+
#endif
|
|
1379
|
+
|
|
1380
|
+
PRINT_CNT("DecodeLZ2", 2000);
|
|
1381
|
+
|
|
1382
|
+
CBitDecoder _bitStream;
|
|
1383
|
+
_bitStream.CopyFrom(bitStream);
|
|
1384
|
+
// _bitStream._stream = _inStream;
|
|
1385
|
+
// _bitStream._bufBase = _inputBuf;
|
|
1386
|
+
// _bitStream.Init();
|
|
1387
|
+
|
|
1388
|
+
// _reps[*] can be larger than _winSize, if _winSize was reduced in solid stream.
|
|
1389
|
+
size_t rep0 = _reps[0];
|
|
1390
|
+
// size_t rep1 = _reps[1];
|
|
1391
|
+
// Byte *win = _window;
|
|
1392
|
+
Byte *winPos = _window + _winPos;
|
|
1393
|
+
const Byte *limit = _window + _limit;
|
|
1394
|
+
_exitType = Z7_RAR_EXIT_TYPE_NONE;
|
|
1395
|
+
|
|
1396
|
+
for (;;)
|
|
1397
|
+
{
|
|
1398
|
+
if (winPos >= limit)
|
|
1399
|
+
LZ_LOOP_BREAK_OK
|
|
1400
|
+
// (winPos < limit)
|
|
1401
|
+
if (_bitStream._buf >= _bitStream._bufCheck_Block)
|
|
1402
|
+
{
|
|
1403
|
+
if (_bitStream.InputEofError())
|
|
1404
|
+
LZ_LOOP_BREAK_OK
|
|
1405
|
+
if (_bitStream._buf >= _bitStream._bufCheck)
|
|
1406
|
+
{
|
|
1407
|
+
if (!_bitStream._wasFinished)
|
|
1408
|
+
LZ_LOOP_BREAK_OK
|
|
1409
|
+
// _bitStream._wasFinished == true
|
|
1410
|
+
// we don't need Prepare() here, because all data was read
|
|
1411
|
+
// and PadZone (16 bytes) after data was filled.
|
|
1412
|
+
}
|
|
1413
|
+
const UInt64 processed = _bitStream.GetProcessedSize_Round();
|
|
1414
|
+
// some cases are error, but the caller will process such error cases.
|
|
1415
|
+
if (processed >= _bitStream._blockEnd &&
|
|
1416
|
+
(processed > _bitStream._blockEnd
|
|
1417
|
+
|| _bitStream.GetProcessedBits7() >= _bitStream._blockEndBits7))
|
|
1418
|
+
LZ_LOOP_BREAK_OK
|
|
1419
|
+
// that check is not required, but it can help, if there is BUG in another code
|
|
1420
|
+
if (!_tableWasFilled)
|
|
1421
|
+
LZ_LOOP_BREAK_ERROR
|
|
1422
|
+
}
|
|
1423
|
+
|
|
1424
|
+
#if 0
|
|
1425
|
+
const unsigned sym = m_MainDecoder.Decode(&_bitStream);
|
|
1426
|
+
#else
|
|
1427
|
+
unsigned sym;
|
|
1428
|
+
Z7_RAR_HUFF_DECODE_CHECK_break(sym, &m_MainDecoder, k_NumHufTableBits_Main, &_bitStream)
|
|
1429
|
+
#endif
|
|
1430
|
+
|
|
1431
|
+
if (sym < 256)
|
|
1432
|
+
{
|
|
1433
|
+
*winPos++ = (Byte)sym;
|
|
1434
|
+
// _lzSize++;
|
|
1435
|
+
continue;
|
|
1436
|
+
}
|
|
1437
|
+
|
|
1438
|
+
CLenType len;
|
|
1439
|
+
|
|
1440
|
+
if (sym < kSymbolRep + kNumReps)
|
|
1441
|
+
{
|
|
1442
|
+
if (sym >= kSymbolRep)
|
|
1443
|
+
{
|
|
1444
|
+
if (sym != kSymbolRep)
|
|
1445
|
+
{
|
|
1446
|
+
size_t dist = _reps[1];
|
|
1447
|
+
_reps[1] = rep0;
|
|
1448
|
+
rep0 = dist;
|
|
1449
|
+
if (sym >= kSymbolRep + 2)
|
|
1450
|
+
{
|
|
1451
|
+
#if 1
|
|
1452
|
+
rep0 = _reps[(size_t)sym - kSymbolRep];
|
|
1453
|
+
_reps[(size_t)sym - kSymbolRep] = _reps[2];
|
|
1454
|
+
_reps[2] = dist;
|
|
1455
|
+
#else
|
|
1456
|
+
if (sym != kSymbolRep + 2)
|
|
1457
|
+
{
|
|
1458
|
+
rep0 = _reps[3];
|
|
1459
|
+
_reps[3] = _reps[2];
|
|
1460
|
+
_reps[2] = dist;
|
|
1461
|
+
}
|
|
1462
|
+
else
|
|
1463
|
+
{
|
|
1464
|
+
rep0 = _reps[2];
|
|
1465
|
+
_reps[2] = dist;
|
|
1466
|
+
}
|
|
1467
|
+
#endif
|
|
1468
|
+
}
|
|
1469
|
+
}
|
|
1470
|
+
#if 0
|
|
1471
|
+
len = m_LenDecoder.Decode(&_bitStream);
|
|
1472
|
+
if (len >= kLenTableSize)
|
|
1473
|
+
LZ_LOOP_BREAK_ERROR
|
|
1474
|
+
#else
|
|
1475
|
+
Z7_RAR_HUFF_DECODE_CHECK_break(len, &m_LenDecoder, k_NumHufTableBits_Len, &_bitStream)
|
|
1476
|
+
#endif
|
|
1477
|
+
if (len >= 8)
|
|
1478
|
+
len = SlotToLen(_bitStream, len);
|
|
1479
|
+
len += 2;
|
|
1480
|
+
// _lastLen = (UInt32)len;
|
|
1481
|
+
}
|
|
1482
|
+
else if (sym != 256)
|
|
1483
|
+
{
|
|
1484
|
+
len = (CLenType)_lastLen;
|
|
1485
|
+
if (len == 0)
|
|
1486
|
+
{
|
|
1487
|
+
// we ignore (_lastLen == 0) case, like original-unrar.
|
|
1488
|
+
// that case can mean error in stream.
|
|
1489
|
+
// lzError = true;
|
|
1490
|
+
// return S_FALSE;
|
|
1491
|
+
continue;
|
|
1492
|
+
}
|
|
1493
|
+
}
|
|
1494
|
+
else
|
|
1495
|
+
{
|
|
1496
|
+
_exitType = Z7_RAR_EXIT_TYPE_ADD_FILTER;
|
|
1497
|
+
LZ_LOOP_BREAK_OK
|
|
1498
|
+
}
|
|
1499
|
+
}
|
|
1500
|
+
#if 0
|
|
1501
|
+
else if (sym >= kMainTableSize)
|
|
1502
|
+
LZ_LOOP_BREAK_ERROR
|
|
1503
|
+
#endif
|
|
1504
|
+
else
|
|
1505
|
+
{
|
|
1506
|
+
_reps[3] = _reps[2];
|
|
1507
|
+
_reps[2] = _reps[1];
|
|
1508
|
+
_reps[1] = rep0;
|
|
1509
|
+
len = sym - (kSymbolRep + kNumReps);
|
|
1510
|
+
if (len >= 8)
|
|
1511
|
+
len = SlotToLen(_bitStream, len);
|
|
1512
|
+
len += 2;
|
|
1513
|
+
// _lastLen = (UInt32)len;
|
|
1514
|
+
|
|
1515
|
+
#if 0
|
|
1516
|
+
rep0 = (UInt32)m_DistDecoder.Decode(&_bitStream);
|
|
1517
|
+
#else
|
|
1518
|
+
Z7_RAR_HUFF_DECODE_CHECK_break(rep0, &m_DistDecoder, k_NumHufTableBits_Dist, &_bitStream)
|
|
1519
|
+
#endif
|
|
1520
|
+
|
|
1521
|
+
if (rep0 >= 4)
|
|
1522
|
+
{
|
|
1523
|
+
#if 0
|
|
1524
|
+
if (rep0 >= kDistTableSize_MAX)
|
|
1525
|
+
LZ_LOOP_BREAK_ERROR
|
|
1526
|
+
#endif
|
|
1527
|
+
const unsigned numBits = ((unsigned)rep0 - 2) >> 1;
|
|
1528
|
+
rep0 = (2 | (rep0 & 1)) << numBits;
|
|
1529
|
+
|
|
1530
|
+
const Byte *buf = _bitStream._buf;
|
|
1531
|
+
#ifdef Z7_RAR5_USE_64BIT
|
|
1532
|
+
const UInt64 v = GetBe64(buf);
|
|
1533
|
+
#else
|
|
1534
|
+
const UInt32 v = GetBe32(buf);
|
|
1535
|
+
#endif
|
|
1536
|
+
|
|
1537
|
+
// _lastLen = (UInt32)len;
|
|
1538
|
+
if (numBits < kNumAlignBits)
|
|
1539
|
+
{
|
|
1540
|
+
rep0 += // _bitStream.ReadBits9(numBits);
|
|
1541
|
+
_bitStream.ReadBits_Big25(numBits, v);
|
|
1542
|
+
}
|
|
1543
|
+
else
|
|
1544
|
+
{
|
|
1545
|
+
#if !defined(MY_CPU_AMD64)
|
|
1546
|
+
len += k_LenPlusTable[numBits];
|
|
1547
|
+
#elif 0
|
|
1548
|
+
len += k_LenPlusTable_LOC[numBits];
|
|
1549
|
+
#elif 1
|
|
1550
|
+
len += m_LenPlusTable[numBits];
|
|
1551
|
+
#elif 1 && defined(MY_CPU_64BIT) && defined(MY_CPU_AMD64)
|
|
1552
|
+
// len += (unsigned)((UInt64)0xfffffffeaa554000 >> (numBits * 2)) & 3;
|
|
1553
|
+
len += (unsigned)((UInt64)0xfffffffffeaa5540 >> (numBits * 2 - 8)) & 3;
|
|
1554
|
+
#elif 1
|
|
1555
|
+
len += 3;
|
|
1556
|
+
len -= (unsigned)(numBits - 7) >> (sizeof(unsigned) * 8 - 1);
|
|
1557
|
+
len -= (unsigned)(numBits - 12) >> (sizeof(unsigned) * 8 - 1);
|
|
1558
|
+
len -= (unsigned)(numBits - 17) >> (sizeof(unsigned) * 8 - 1);
|
|
1559
|
+
#elif 1
|
|
1560
|
+
len += 3;
|
|
1561
|
+
len -= (0x155aabf >> (numBits - 4) >> (numBits - 4)) & 3;
|
|
1562
|
+
#elif 1
|
|
1563
|
+
len += (numBits >= 7);
|
|
1564
|
+
len += (numBits >= 12);
|
|
1565
|
+
len += (numBits >= 17);
|
|
1566
|
+
#endif
|
|
1567
|
+
// _lastLen = (UInt32)len;
|
|
1568
|
+
if (_useAlignBits)
|
|
1569
|
+
{
|
|
1570
|
+
// if (numBits > kNumAlignBits)
|
|
1571
|
+
rep0 += (_bitStream.ReadBits_Big25(numBits - kNumAlignBits, v) << kNumAlignBits);
|
|
1572
|
+
#if 0
|
|
1573
|
+
const unsigned a = m_AlignDecoder.Decode(&_bitStream);
|
|
1574
|
+
if (a >= kAlignTableSize)
|
|
1575
|
+
LZ_LOOP_BREAK_ERROR
|
|
1576
|
+
#else
|
|
1577
|
+
unsigned a;
|
|
1578
|
+
Z7_RAR_HUFF_DECODE_CHECK_break(a, &m_AlignDecoder, k_NumHufTableBits_Align, &_bitStream)
|
|
1579
|
+
#endif
|
|
1580
|
+
rep0 += a;
|
|
1581
|
+
}
|
|
1582
|
+
else
|
|
1583
|
+
rep0 += _bitStream.ReadBits_Big(numBits, v);
|
|
1584
|
+
#ifndef Z7_RAR5_USE_64BIT
|
|
1585
|
+
if (numBits >= 30) // we don't want 32-bit overflow case
|
|
1586
|
+
rep0 = (size_t)0 - 1 - 1;
|
|
1587
|
+
#endif
|
|
1588
|
+
}
|
|
1589
|
+
}
|
|
1590
|
+
rep0++;
|
|
1591
|
+
}
|
|
1592
|
+
|
|
1593
|
+
{
|
|
1594
|
+
_lastLen = (UInt32)len;
|
|
1595
|
+
// len != 0
|
|
1596
|
+
|
|
1597
|
+
#ifdef Z7_RAR5_SHOW_STAT
|
|
1598
|
+
{
|
|
1599
|
+
size_t index = rep0;
|
|
1600
|
+
if (index >= kNumStats1)
|
|
1601
|
+
index = kNumStats1 - 1;
|
|
1602
|
+
g_stats1[index]++;
|
|
1603
|
+
g_stats2[index][len]++;
|
|
1604
|
+
}
|
|
1605
|
+
#endif
|
|
1606
|
+
|
|
1607
|
+
Byte *dest = winPos;
|
|
1608
|
+
winPos += len;
|
|
1609
|
+
if (rep0 <= _dictSize_forCheck)
|
|
1610
|
+
{
|
|
1611
|
+
const Byte *src;
|
|
1612
|
+
const size_t winPos_temp = (size_t)(dest - _window);
|
|
1613
|
+
if (rep0 > winPos_temp)
|
|
1614
|
+
{
|
|
1615
|
+
if (_lzSize == 0)
|
|
1616
|
+
goto error_dist;
|
|
1617
|
+
size_t back = rep0 - winPos_temp;
|
|
1618
|
+
// STAT_INC(g_NumOver)
|
|
1619
|
+
src = dest + (_winSize - rep0);
|
|
1620
|
+
if (back < len)
|
|
1621
|
+
{
|
|
1622
|
+
// len -= (CLenType)back;
|
|
1623
|
+
Z7_PRAGMA_OPT_DISABLE_LOOP_UNROLL_VECTORIZE
|
|
1624
|
+
do
|
|
1625
|
+
*dest++ = *src++;
|
|
1626
|
+
while (--back);
|
|
1627
|
+
src = dest - rep0;
|
|
1628
|
+
}
|
|
1629
|
+
}
|
|
1630
|
+
else
|
|
1631
|
+
src = dest - rep0;
|
|
1632
|
+
CopyMatch(rep0, dest, src, winPos);
|
|
1633
|
+
continue;
|
|
1634
|
+
}
|
|
1635
|
+
|
|
1636
|
+
error_dist:
|
|
1637
|
+
// LZ_LOOP_BREAK_ERROR;
|
|
1638
|
+
_lzError = LZ_ERROR_TYPE_DIST;
|
|
1639
|
+
do
|
|
1640
|
+
*dest++ = 0;
|
|
1641
|
+
while (dest < winPos);
|
|
1642
|
+
continue;
|
|
1643
|
+
}
|
|
1644
|
+
}
|
|
1645
|
+
|
|
1646
|
+
LZ_RESTORE
|
|
1647
|
+
return S_OK;
|
|
1648
|
+
|
|
1649
|
+
#if 1
|
|
1650
|
+
decode_error:
|
|
1651
|
+
/*
|
|
1652
|
+
if (_bitStream._hres != S_OK)
|
|
1653
|
+
return _bitStream._hres;
|
|
1654
|
+
*/
|
|
1655
|
+
LZ_RESTORE
|
|
1656
|
+
return S_FALSE;
|
|
1657
|
+
#endif
|
|
1658
|
+
}
|
|
1659
|
+
|
|
1660
|
+
|
|
1661
|
+
|
|
1662
|
+
/*
|
|
1663
|
+
input conditions:
|
|
1664
|
+
_winPos < _winSize
|
|
1665
|
+
return:
|
|
1666
|
+
_winPos < _winSize is expected, if (return_res == S_OK)
|
|
1667
|
+
_winPos >= _winSize is possible in (return_res != S_OK)
|
|
1668
|
+
*/
|
|
1669
|
+
HRESULT CDecoder::DecodeLZ()
|
|
1670
|
+
{
|
|
1671
|
+
CBitDecoder _bitStream;
|
|
1672
|
+
_bitStream._stream = _inStream;
|
|
1673
|
+
_bitStream._bufBase = _inputBuf;
|
|
1674
|
+
_bitStream.Init();
|
|
1675
|
+
|
|
1676
|
+
// _reps[*] can be larger than _winSize, if _winSize was reduced in solid stream.
|
|
1677
|
+
size_t winPos = _winPos;
|
|
1678
|
+
Byte *win = _window;
|
|
1679
|
+
size_t limit;
|
|
1680
|
+
{
|
|
1681
|
+
size_t rem = _winSize - winPos;
|
|
1682
|
+
if (rem > kWriteStep)
|
|
1683
|
+
rem = kWriteStep;
|
|
1684
|
+
limit = winPos + rem;
|
|
1685
|
+
}
|
|
1686
|
+
|
|
1687
|
+
for (;;)
|
|
1688
|
+
{
|
|
1689
|
+
if (winPos >= limit)
|
|
1690
|
+
{
|
|
1691
|
+
_winPos = winPos < _winSize ? winPos : _winSize;
|
|
1692
|
+
// _winPos == min(winPos, _winSize)
|
|
1693
|
+
// we will not write data after _winSize
|
|
1694
|
+
RINOK(WriteBuf())
|
|
1695
|
+
if (_unpackSize_Defined && _writtenFileSize > _unpackSize)
|
|
1696
|
+
break; // return S_FALSE;
|
|
1697
|
+
const size_t wp = _winPos;
|
|
1698
|
+
size_t rem = _winSize - wp;
|
|
1699
|
+
if (rem == 0)
|
|
1700
|
+
{
|
|
1701
|
+
_lzSize += wp;
|
|
1702
|
+
winPos -= wp;
|
|
1703
|
+
// (winPos < kMaxMatchLen < _winSize)
|
|
1704
|
+
// so memmove is not required here
|
|
1705
|
+
if (winPos)
|
|
1706
|
+
memcpy(win, win + _winSize, winPos);
|
|
1707
|
+
limit = _winSize;
|
|
1708
|
+
if (limit >= kWriteStep)
|
|
1709
|
+
{
|
|
1710
|
+
limit = kWriteStep;
|
|
1711
|
+
continue;
|
|
1712
|
+
}
|
|
1713
|
+
rem = _winSize - winPos;
|
|
1714
|
+
}
|
|
1715
|
+
if (rem > kWriteStep)
|
|
1716
|
+
rem = kWriteStep;
|
|
1717
|
+
limit = winPos + rem;
|
|
1718
|
+
continue;
|
|
1719
|
+
}
|
|
1720
|
+
|
|
1721
|
+
// (winPos < limit)
|
|
1722
|
+
|
|
1723
|
+
if (_bitStream._buf >= _bitStream._bufCheck_Block)
|
|
1724
|
+
{
|
|
1725
|
+
_winPos = winPos;
|
|
1726
|
+
if (_bitStream.InputEofError())
|
|
1727
|
+
break; // return S_FALSE;
|
|
1728
|
+
_bitStream.Prepare();
|
|
1729
|
+
|
|
1730
|
+
const UInt64 processed = _bitStream.GetProcessedSize_Round();
|
|
1731
|
+
if (processed >= _bitStream._blockEnd)
|
|
1732
|
+
{
|
|
1733
|
+
if (processed > _bitStream._blockEnd)
|
|
1734
|
+
break; // return S_FALSE;
|
|
1735
|
+
{
|
|
1736
|
+
const unsigned bits7 = _bitStream.GetProcessedBits7();
|
|
1737
|
+
if (bits7 >= _bitStream._blockEndBits7)
|
|
1738
|
+
{
|
|
1739
|
+
if (bits7 > _bitStream._blockEndBits7)
|
|
1740
|
+
{
|
|
1741
|
+
#if 1
|
|
1742
|
+
// we ignore thar error as original unrar
|
|
1743
|
+
_bitStream._minorError = true;
|
|
1744
|
+
#else
|
|
1745
|
+
break; // return S_FALSE;
|
|
1746
|
+
#endif
|
|
1747
|
+
}
|
|
1748
|
+
_bitStream.AlignToByte();
|
|
1749
|
+
// if (!_bitStream.AlignToByte()) break;
|
|
1750
|
+
if (_isLastBlock)
|
|
1751
|
+
{
|
|
1752
|
+
if (_bitStream.InputEofError())
|
|
1753
|
+
break;
|
|
1754
|
+
/*
|
|
1755
|
+
// packSize can be 15 bytes larger for encrypted archive
|
|
1756
|
+
if (_packSize_Defined && _packSize < _bitStream.GetProcessedSize())
|
|
1757
|
+
break;
|
|
1758
|
+
*/
|
|
1759
|
+
if (_bitStream._minorError)
|
|
1760
|
+
return S_FALSE;
|
|
1761
|
+
return _bitStream._hres;
|
|
1762
|
+
// break;
|
|
1763
|
+
}
|
|
1764
|
+
RINOK(ReadTables(_bitStream))
|
|
1765
|
+
continue;
|
|
1766
|
+
}
|
|
1767
|
+
}
|
|
1768
|
+
}
|
|
1769
|
+
|
|
1770
|
+
// end of block was not reached.
|
|
1771
|
+
// so we must decode more symbols
|
|
1772
|
+
// that check is not required, but it can help, if there is BUG in another code
|
|
1773
|
+
if (!_tableWasFilled)
|
|
1774
|
+
break; // return S_FALSE;
|
|
1775
|
+
}
|
|
1776
|
+
|
|
1777
|
+
_limit = limit;
|
|
1778
|
+
_winPos = winPos;
|
|
1779
|
+
RINOK(DecodeLZ2(_bitStream))
|
|
1780
|
+
_bitStream._buf = _buf_Res;
|
|
1781
|
+
_bitStream._bitPos = _bitPos_Res;
|
|
1782
|
+
|
|
1783
|
+
winPos = _winPos;
|
|
1784
|
+
if (_exitType == Z7_RAR_EXIT_TYPE_ADD_FILTER)
|
|
1785
|
+
{
|
|
1786
|
+
RINOK(AddFilter(_bitStream))
|
|
1787
|
+
continue;
|
|
1788
|
+
}
|
|
1789
|
+
}
|
|
1790
|
+
|
|
1791
|
+
_winPos = winPos;
|
|
1792
|
+
|
|
1793
|
+
if (_bitStream._hres != S_OK)
|
|
1794
|
+
return _bitStream._hres;
|
|
1795
|
+
|
|
1796
|
+
return S_FALSE;
|
|
1797
|
+
}
|
|
1798
|
+
|
|
1799
|
+
|
|
1800
|
+
|
|
1801
|
+
HRESULT CDecoder::CodeReal()
|
|
1802
|
+
{
|
|
1803
|
+
_unsupportedFilter = false;
|
|
1804
|
+
_writeError = false;
|
|
1805
|
+
/*
|
|
1806
|
+
if (!_isSolid || !_wasInit)
|
|
1807
|
+
{
|
|
1808
|
+
_wasInit = true;
|
|
1809
|
+
// _lzSize = 0;
|
|
1810
|
+
_lzWritten = 0;
|
|
1811
|
+
_winPos = 0;
|
|
1812
|
+
for (unsigned i = 0; i < kNumReps; i++)
|
|
1813
|
+
_reps[i] = (size_t)0 - 1;
|
|
1814
|
+
_lastLen = 0;
|
|
1815
|
+
_tableWasFilled = false;
|
|
1816
|
+
}
|
|
1817
|
+
*/
|
|
1818
|
+
_isLastBlock = false;
|
|
1819
|
+
|
|
1820
|
+
InitFilters();
|
|
1821
|
+
|
|
1822
|
+
_filterEnd = 0;
|
|
1823
|
+
_writtenFileSize = 0;
|
|
1824
|
+
const UInt64 lzSize = _lzSize + _winPos;
|
|
1825
|
+
_lzFileStart = lzSize;
|
|
1826
|
+
_lzWritten = lzSize;
|
|
1827
|
+
|
|
1828
|
+
HRESULT res = DecodeLZ();
|
|
1829
|
+
|
|
1830
|
+
HRESULT res2 = S_OK;
|
|
1831
|
+
if (!_writeError && res != E_OUTOFMEMORY)
|
|
1832
|
+
res2 = WriteBuf();
|
|
1833
|
+
/*
|
|
1834
|
+
if (res == S_OK)
|
|
1835
|
+
if (InputEofError())
|
|
1836
|
+
res = S_FALSE;
|
|
1837
|
+
*/
|
|
1838
|
+
if (res == S_OK)
|
|
1839
|
+
{
|
|
1840
|
+
// _solidAllowed = true;
|
|
1841
|
+
res = res2;
|
|
1842
|
+
}
|
|
1843
|
+
if (res == S_OK && _unpackSize_Defined && _writtenFileSize != _unpackSize)
|
|
1844
|
+
return S_FALSE;
|
|
1845
|
+
return res;
|
|
1846
|
+
}
|
|
1847
|
+
|
|
1848
|
+
|
|
1849
|
+
|
|
1850
|
+
Z7_COM7F_IMF(CDecoder::Code(ISequentialInStream *inStream, ISequentialOutStream *outStream,
|
|
1851
|
+
const UInt64 * /* inSize */, const UInt64 *outSize, ICompressProgressInfo *progress))
|
|
1852
|
+
{
|
|
1853
|
+
_lzError = LZ_ERROR_TYPE_NO;
|
|
1854
|
+
/*
|
|
1855
|
+
if file is soild, but decoding of previous file was not finished,
|
|
1856
|
+
we still try to decode new file.
|
|
1857
|
+
We need correct huffman table at starting block.
|
|
1858
|
+
And rar encoder probably writes huffman table at start block, if file is big.
|
|
1859
|
+
So we have good chance to get correct huffman table in some file after corruption.
|
|
1860
|
+
Also we try to recover window by filling zeros, if previous file
|
|
1861
|
+
was decoded to smaller size than required.
|
|
1862
|
+
But if filling size is big, we do full reset of window instead.
|
|
1863
|
+
*/
|
|
1864
|
+
#define Z7_RAR_RECOVER_SOLID_LIMIT (1 << 20)
|
|
1865
|
+
// #define Z7_RAR_RECOVER_SOLID_LIMIT 0 // do not fill zeros
|
|
1866
|
+
{
|
|
1867
|
+
// if (_winPos > 100) _winPos -= 100; // for debug: corruption
|
|
1868
|
+
const UInt64 lzSize = _lzSize + _winPos;
|
|
1869
|
+
/*
|
|
1870
|
+
if previous file was decoded with error or for some another cases, then
|
|
1871
|
+
(lzSize > _lzEnd) is possible
|
|
1872
|
+
(_winPos > _winSize) is possible
|
|
1873
|
+
(_winPos < _winSize + kMaxMatchLen)
|
|
1874
|
+
*/
|
|
1875
|
+
if (!_window
|
|
1876
|
+
|| !_isSolid
|
|
1877
|
+
|| !_wasInit
|
|
1878
|
+
|| (lzSize < _lzEnd
|
|
1879
|
+
#if Z7_RAR_RECOVER_SOLID_LIMIT != 0
|
|
1880
|
+
&& lzSize + Z7_RAR_RECOVER_SOLID_LIMIT < _lzEnd
|
|
1881
|
+
#endif
|
|
1882
|
+
))
|
|
1883
|
+
{
|
|
1884
|
+
if (_isSolid)
|
|
1885
|
+
_lzError = LZ_ERROR_TYPE_HEADER;
|
|
1886
|
+
_lzSize = 0;
|
|
1887
|
+
// _lzEnd = 0; // it will be set later
|
|
1888
|
+
// _lzWritten = 0; // it will be set later
|
|
1889
|
+
_winPos = 0;
|
|
1890
|
+
for (unsigned i = 0; i < kNumReps; i++)
|
|
1891
|
+
_reps[i] = (size_t)0 - 1;
|
|
1892
|
+
_lastLen = 0;
|
|
1893
|
+
_tableWasFilled = false;
|
|
1894
|
+
_wasInit = true;
|
|
1895
|
+
}
|
|
1896
|
+
else
|
|
1897
|
+
{
|
|
1898
|
+
const size_t ws = _winSize;
|
|
1899
|
+
if (_winPos >= ws)
|
|
1900
|
+
{
|
|
1901
|
+
// we must normalize (_winPos) and data in _window,
|
|
1902
|
+
_winPos -= ws;
|
|
1903
|
+
_lzSize += ws;
|
|
1904
|
+
// (_winPos < kMaxMatchLen < _winSize)
|
|
1905
|
+
// if (_window)
|
|
1906
|
+
memcpy(_window, _window + ws, _winPos); // memmove is not required here
|
|
1907
|
+
}
|
|
1908
|
+
|
|
1909
|
+
#if Z7_RAR_RECOVER_SOLID_LIMIT != 0
|
|
1910
|
+
if (lzSize < _lzEnd)
|
|
1911
|
+
{
|
|
1912
|
+
#if 0
|
|
1913
|
+
return S_FALSE;
|
|
1914
|
+
#else
|
|
1915
|
+
// we can report that recovering was made:
|
|
1916
|
+
// _lzError = LZ_ERROR_TYPE_HEADER;
|
|
1917
|
+
// We write zeros to area after corruption:
|
|
1918
|
+
// if (_window)
|
|
1919
|
+
{
|
|
1920
|
+
UInt64 rem = _lzEnd - lzSize;
|
|
1921
|
+
if (rem >= ws)
|
|
1922
|
+
{
|
|
1923
|
+
My_ZeroMemory(_window, ws);
|
|
1924
|
+
_lzSize = ws;
|
|
1925
|
+
_winPos = 0;
|
|
1926
|
+
}
|
|
1927
|
+
else
|
|
1928
|
+
{
|
|
1929
|
+
// rem < _winSize
|
|
1930
|
+
// _winPos <= ws
|
|
1931
|
+
const size_t cur = ws - _winPos;
|
|
1932
|
+
if (cur <= rem)
|
|
1933
|
+
{
|
|
1934
|
+
rem -= cur;
|
|
1935
|
+
My_ZeroMemory(_window + _winPos, cur);
|
|
1936
|
+
_lzSize = ws;
|
|
1937
|
+
_winPos = 0;
|
|
1938
|
+
}
|
|
1939
|
+
My_ZeroMemory(_window + _winPos, (size_t)rem);
|
|
1940
|
+
_winPos += (size_t)rem;
|
|
1941
|
+
}
|
|
1942
|
+
}
|
|
1943
|
+
// else return S_FALSE;
|
|
1944
|
+
#endif
|
|
1945
|
+
}
|
|
1946
|
+
}
|
|
1947
|
+
#endif
|
|
1948
|
+
}
|
|
1949
|
+
|
|
1950
|
+
// _winPos < _winSize
|
|
1951
|
+
// we don't want _lzSize overflow
|
|
1952
|
+
if (_lzSize >= DICT_SIZE_MAX)
|
|
1953
|
+
_lzSize = DICT_SIZE_MAX;
|
|
1954
|
+
_lzEnd = _lzSize + _winPos;
|
|
1955
|
+
// _lzSize <= DICT_SIZE_MAX
|
|
1956
|
+
// _lzEnd < DICT_SIZE_MAX + _winSize
|
|
1957
|
+
|
|
1958
|
+
size_t newSize = _dictSize;
|
|
1959
|
+
if (newSize < kWinSize_Min)
|
|
1960
|
+
newSize = kWinSize_Min;
|
|
1961
|
+
|
|
1962
|
+
_unpackSize = 0;
|
|
1963
|
+
_unpackSize_Defined = (outSize != NULL);
|
|
1964
|
+
if (_unpackSize_Defined)
|
|
1965
|
+
_unpackSize = *outSize;
|
|
1966
|
+
|
|
1967
|
+
if ((Int64)_unpackSize >= 0)
|
|
1968
|
+
_lzEnd += _unpackSize; // known end after current file
|
|
1969
|
+
else
|
|
1970
|
+
_lzEnd = 0; // unknown end
|
|
1971
|
+
|
|
1972
|
+
if (_isSolid && _window)
|
|
1973
|
+
{
|
|
1974
|
+
// If dictionary was decreased in solid, we use old dictionary.
|
|
1975
|
+
if (newSize > _dictSize_forCheck)
|
|
1976
|
+
{
|
|
1977
|
+
// If dictionary was increased in solid, we don't want grow.
|
|
1978
|
+
return S_FALSE; // E_OUTOFMEMORY
|
|
1979
|
+
}
|
|
1980
|
+
// (newSize <= _dictSize_forCheck)
|
|
1981
|
+
}
|
|
1982
|
+
else
|
|
1983
|
+
{
|
|
1984
|
+
// !_isSolid || !_window
|
|
1985
|
+
_dictSize_forCheck = newSize;
|
|
1986
|
+
{
|
|
1987
|
+
size_t newSize_small = newSize;
|
|
1988
|
+
const size_t k_Win_AlignSize = 1u << 18;
|
|
1989
|
+
/* here we add (1 << 7) instead of (COPY_CHUNK_SIZE - 1), because
|
|
1990
|
+
we want to get same (_winSize) for different COPY_CHUNK_SIZE values. */
|
|
1991
|
+
// newSize += (COPY_CHUNK_SIZE - 1) + (k_Win_AlignSize - 1); // for debug : we can get smallest (_winSize)
|
|
1992
|
+
newSize += (1 << 7) + k_Win_AlignSize;
|
|
1993
|
+
newSize &= ~(size_t)(k_Win_AlignSize - 1);
|
|
1994
|
+
if (newSize < newSize_small)
|
|
1995
|
+
return E_OUTOFMEMORY;
|
|
1996
|
+
}
|
|
1997
|
+
// (!_isSolid || !_window)
|
|
1998
|
+
const size_t allocSize = newSize + kMaxMatchLen + 64;
|
|
1999
|
+
if (allocSize < newSize)
|
|
2000
|
+
return E_OUTOFMEMORY;
|
|
2001
|
+
if (!_window || allocSize > _winSize_Allocated)
|
|
2002
|
+
{
|
|
2003
|
+
Z7_RAR_FREE_WINDOW
|
|
2004
|
+
_window = NULL;
|
|
2005
|
+
_winSize_Allocated = 0;
|
|
2006
|
+
Byte *win = (Byte *)::BigAlloc(allocSize);
|
|
2007
|
+
if (!win)
|
|
2008
|
+
return E_OUTOFMEMORY;
|
|
2009
|
+
_window = win;
|
|
2010
|
+
_winSize_Allocated = allocSize;
|
|
2011
|
+
}
|
|
2012
|
+
_winSize = newSize;
|
|
2013
|
+
}
|
|
2014
|
+
|
|
2015
|
+
if (!_inputBuf)
|
|
2016
|
+
{
|
|
2017
|
+
_inputBuf = (Byte *)z7_AlignedAlloc(kInputBufSize + kInputBufferPadZone);
|
|
2018
|
+
if (!_inputBuf)
|
|
2019
|
+
return E_OUTOFMEMORY;
|
|
2020
|
+
}
|
|
2021
|
+
|
|
2022
|
+
_inStream = inStream;
|
|
2023
|
+
_outStream = outStream;
|
|
2024
|
+
_progress = progress;
|
|
2025
|
+
_progress_Pack = 0;
|
|
2026
|
+
_progress_Unpack = 0;
|
|
2027
|
+
|
|
2028
|
+
const HRESULT res = CodeReal();
|
|
2029
|
+
|
|
2030
|
+
if (res != S_OK)
|
|
2031
|
+
return res;
|
|
2032
|
+
// _lzError = LZ_ERROR_TYPE_HEADER; // for debug
|
|
2033
|
+
if (_lzError)
|
|
2034
|
+
return S_FALSE;
|
|
2035
|
+
if (_unsupportedFilter)
|
|
2036
|
+
return E_NOTIMPL;
|
|
2037
|
+
return S_OK;
|
|
2038
|
+
}
|
|
2039
|
+
|
|
2040
|
+
|
|
2041
|
+
Z7_COM7F_IMF(CDecoder::SetDecoderProperties2(const Byte *data, UInt32 size))
|
|
2042
|
+
{
|
|
2043
|
+
if (size != 2)
|
|
2044
|
+
return E_INVALIDARG;
|
|
2045
|
+
const unsigned pow = data[0];
|
|
2046
|
+
const unsigned b1 = data[1];
|
|
2047
|
+
const unsigned frac = b1 >> 3;
|
|
2048
|
+
// unsigned pow = 15 + 8;
|
|
2049
|
+
// unsigned frac = 1;
|
|
2050
|
+
if (pow + ((frac + 31) >> 5) > MAX_DICT_LOG - 17)
|
|
2051
|
+
// if (frac + (pow << 8) >= ((8 * 2 + 7) << 5) + 8 / 8)
|
|
2052
|
+
return E_NOTIMPL;
|
|
2053
|
+
_dictSize = (size_t)(frac + 32) << (pow + 12);
|
|
2054
|
+
_isSolid = (b1 & 1) != 0;
|
|
2055
|
+
_is_v7 = (b1 & 2) != 0;
|
|
2056
|
+
// printf("\ndict size = %p\n", (void *)(size_t)_dictSize);
|
|
2057
|
+
return S_OK;
|
|
2058
|
+
}
|
|
2059
|
+
|
|
2060
|
+
}}
|