7zip-native 0.0.0-stage → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +293 -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 +528 -0
- package/dist/index.d.cts +63 -0
- package/dist/index.d.mts +63 -0
- package/dist/index.d.ts +63 -0
- package/dist/index.mjs +524 -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/darwin-arm64/7zip_native.node +0 -0
- package/prebuilds/darwin-arm64/lib7z.dylib +0 -0
- package/prebuilds/darwin-x64/7zip_native.node +0 -0
- package/prebuilds/darwin-x64/lib7z.dylib +0 -0
- package/prebuilds/linux-arm/7z.so +0 -0
- package/prebuilds/linux-arm/7zip_native.node +0 -0
- package/prebuilds/linux-arm64/7z.so +0 -0
- package/prebuilds/linux-arm64/7zip_native.node +0 -0
- package/prebuilds/linux-ia32/7z.so +0 -0
- package/prebuilds/linux-ia32/7zip_native.node +0 -0
- package/prebuilds/linux-x64/7z.so +0 -0
- package/prebuilds/linux-x64/7zip_native.node +0 -0
- package/prebuilds/win32-arm64/7z.dll +0 -0
- package/prebuilds/win32-arm64/7zip_native.node +0 -0
- package/prebuilds/win32-x64/7z.dll +0 -0
- package/prebuilds/win32-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,1701 @@
|
|
|
1
|
+
/* 7zArcIn.c -- 7z Input functions
|
|
2
|
+
: Igor Pavlov : Public domain */
|
|
3
|
+
|
|
4
|
+
#include "Precomp.h"
|
|
5
|
+
|
|
6
|
+
#include <string.h>
|
|
7
|
+
|
|
8
|
+
#include "7z.h"
|
|
9
|
+
#include "7zBuf.h"
|
|
10
|
+
#include "7zCrc.h"
|
|
11
|
+
#include "CpuArch.h"
|
|
12
|
+
|
|
13
|
+
#define MY_ALLOC(T, p, size, alloc) \
|
|
14
|
+
{ if ((p = (T *)ISzAlloc_Alloc(alloc, (size_t)(size) * sizeof(T))) == NULL) return SZ_ERROR_MEM; }
|
|
15
|
+
|
|
16
|
+
#define MY_ALLOC_ZE(T, p, size, alloc) \
|
|
17
|
+
{ if ((size) == 0) p = NULL; else MY_ALLOC(T, p, size, alloc) }
|
|
18
|
+
|
|
19
|
+
#define MY_ALLOC_AND_CPY(to, size, from, alloc) \
|
|
20
|
+
{ MY_ALLOC(Byte, to, size, alloc); memcpy(to, from, size); }
|
|
21
|
+
|
|
22
|
+
#define MY_ALLOC_ZE_AND_CPY(to, size, from, alloc) \
|
|
23
|
+
{ if ((size) == 0) to = NULL; else { MY_ALLOC_AND_CPY(to, size, from, alloc) } }
|
|
24
|
+
|
|
25
|
+
enum EIdEnum
|
|
26
|
+
{
|
|
27
|
+
k7zIdEnd,
|
|
28
|
+
k7zIdHeader,
|
|
29
|
+
k7zIdArchiveProperties,
|
|
30
|
+
k7zIdAdditionalStreamsInfo,
|
|
31
|
+
k7zIdMainStreamsInfo,
|
|
32
|
+
k7zIdFilesInfo,
|
|
33
|
+
k7zIdPackInfo,
|
|
34
|
+
k7zIdUnpackInfo,
|
|
35
|
+
k7zIdSubStreamsInfo,
|
|
36
|
+
k7zIdSize,
|
|
37
|
+
k7zIdCRC,
|
|
38
|
+
k7zIdFolder,
|
|
39
|
+
k7zIdCodersUnpackSize,
|
|
40
|
+
k7zIdNumUnpackStream,
|
|
41
|
+
k7zIdEmptyStream,
|
|
42
|
+
k7zIdEmptyFile,
|
|
43
|
+
k7zIdAnti,
|
|
44
|
+
k7zIdName,
|
|
45
|
+
k7zIdCTime,
|
|
46
|
+
k7zIdATime,
|
|
47
|
+
k7zIdMTime,
|
|
48
|
+
k7zIdWinAttrib,
|
|
49
|
+
k7zIdComment,
|
|
50
|
+
k7zIdEncodedHeader,
|
|
51
|
+
k7zIdStartPos,
|
|
52
|
+
k7zIdDummy
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
const Byte k7zSignature[k7zSignatureSize] = {'7', 'z', 0xBC, 0xAF, 0x27, 0x1C};
|
|
56
|
+
|
|
57
|
+
#define SzBitUi32s_INIT(p) { (p)->Defs = NULL; (p)->Vals = NULL; }
|
|
58
|
+
|
|
59
|
+
Z7_FORCE_INLINE
|
|
60
|
+
static SRes SzBitUi32s_Alloc(CSzBitUi32s *p, size_t num, ISzAllocPtr alloc)
|
|
61
|
+
{
|
|
62
|
+
if (num == 0)
|
|
63
|
+
{
|
|
64
|
+
p->Defs = NULL;
|
|
65
|
+
p->Vals = NULL;
|
|
66
|
+
}
|
|
67
|
+
else
|
|
68
|
+
{
|
|
69
|
+
MY_ALLOC(Byte, p->Defs, (num + 7) >> 3, alloc)
|
|
70
|
+
MY_ALLOC(UInt32, p->Vals, num, alloc)
|
|
71
|
+
}
|
|
72
|
+
return SZ_OK;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
Z7_FORCE_INLINE
|
|
76
|
+
static void SzBitUi32s_Free(CSzBitUi32s *p, ISzAllocPtr alloc)
|
|
77
|
+
{
|
|
78
|
+
ISzAlloc_Free(alloc, p->Defs); p->Defs = NULL;
|
|
79
|
+
ISzAlloc_Free(alloc, p->Vals); p->Vals = NULL;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
#define SzBitUi64s_INIT(p) { (p)->Defs = NULL; (p)->Vals = NULL; }
|
|
83
|
+
|
|
84
|
+
Z7_FORCE_INLINE
|
|
85
|
+
static void SzBitUi64s_Free(CSzBitUi64s *p, ISzAllocPtr alloc)
|
|
86
|
+
{
|
|
87
|
+
ISzAlloc_Free(alloc, p->Defs); p->Defs = NULL;
|
|
88
|
+
ISzAlloc_Free(alloc, p->Vals); p->Vals = NULL;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
Z7_NO_INLINE
|
|
92
|
+
static void SzAr_Init(CSzAr *p)
|
|
93
|
+
{
|
|
94
|
+
p->NumPackStreams = 0;
|
|
95
|
+
p->NumFolders = 0;
|
|
96
|
+
|
|
97
|
+
p->PackPositions = NULL;
|
|
98
|
+
SzBitUi32s_INIT(&p->FolderCRCs)
|
|
99
|
+
|
|
100
|
+
p->FoCodersOffsets = NULL;
|
|
101
|
+
p->FoStartPackStreamIndex = NULL;
|
|
102
|
+
p->FoToCoderUnpackSizes = NULL;
|
|
103
|
+
p->FoToMainUnpackSizeIndex = NULL;
|
|
104
|
+
p->CoderUnpackSizes = NULL;
|
|
105
|
+
|
|
106
|
+
p->CodersData = NULL;
|
|
107
|
+
|
|
108
|
+
p->RangeLimit = 0;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
Z7_NO_INLINE
|
|
112
|
+
static void SzAr_Free(CSzAr *p, ISzAllocPtr alloc)
|
|
113
|
+
{
|
|
114
|
+
ISzAlloc_Free(alloc, p->PackPositions);
|
|
115
|
+
SzBitUi32s_Free(&p->FolderCRCs, alloc);
|
|
116
|
+
ISzAlloc_Free(alloc, p->FoCodersOffsets);
|
|
117
|
+
ISzAlloc_Free(alloc, p->FoStartPackStreamIndex);
|
|
118
|
+
ISzAlloc_Free(alloc, p->FoToCoderUnpackSizes);
|
|
119
|
+
ISzAlloc_Free(alloc, p->FoToMainUnpackSizeIndex);
|
|
120
|
+
ISzAlloc_Free(alloc, p->CoderUnpackSizes);
|
|
121
|
+
ISzAlloc_Free(alloc, p->CodersData);
|
|
122
|
+
|
|
123
|
+
SzAr_Init(p);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
Z7_NO_INLINE
|
|
127
|
+
void SzArEx_Init(CSzArEx *p)
|
|
128
|
+
{
|
|
129
|
+
SzAr_Init(&p->db);
|
|
130
|
+
|
|
131
|
+
p->NumFiles = 0;
|
|
132
|
+
p->dataPos = 0;
|
|
133
|
+
|
|
134
|
+
p->UnpackPositions = NULL;
|
|
135
|
+
p->IsDirs = NULL;
|
|
136
|
+
|
|
137
|
+
p->FolderToFile = NULL;
|
|
138
|
+
p->FileToFolder = NULL;
|
|
139
|
+
|
|
140
|
+
p->FileNameOffsets = NULL;
|
|
141
|
+
p->FileNames = NULL;
|
|
142
|
+
|
|
143
|
+
SzBitUi32s_INIT(&p->CRCs)
|
|
144
|
+
SzBitUi32s_INIT(&p->Attribs)
|
|
145
|
+
// SzBitUi32s_INIT(&p->Parents)
|
|
146
|
+
SzBitUi64s_INIT(&p->MTime)
|
|
147
|
+
SzBitUi64s_INIT(&p->CTime)
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
Z7_NO_INLINE
|
|
151
|
+
void SzArEx_Free(CSzArEx *p, ISzAllocPtr alloc)
|
|
152
|
+
{
|
|
153
|
+
ISzAlloc_Free(alloc, p->UnpackPositions);
|
|
154
|
+
ISzAlloc_Free(alloc, p->IsDirs);
|
|
155
|
+
|
|
156
|
+
ISzAlloc_Free(alloc, p->FolderToFile);
|
|
157
|
+
ISzAlloc_Free(alloc, p->FileToFolder);
|
|
158
|
+
|
|
159
|
+
ISzAlloc_Free(alloc, p->FileNameOffsets);
|
|
160
|
+
ISzAlloc_Free(alloc, p->FileNames);
|
|
161
|
+
|
|
162
|
+
SzBitUi32s_Free(&p->CRCs, alloc);
|
|
163
|
+
SzBitUi32s_Free(&p->Attribs, alloc);
|
|
164
|
+
// SzBitUi32s_Free(&p->Parents, alloc);
|
|
165
|
+
SzBitUi64s_Free(&p->MTime, alloc);
|
|
166
|
+
SzBitUi64s_Free(&p->CTime, alloc);
|
|
167
|
+
|
|
168
|
+
SzAr_Free(&p->db, alloc);
|
|
169
|
+
SzArEx_Init(p);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
#define SzData_CLEAR(p) { (p)->Data = NULL; (p)->Size = 0; }
|
|
174
|
+
|
|
175
|
+
#define SZ_READ_BYTE_SD_NOCHECK(_sd_, dest) \
|
|
176
|
+
(_sd_)->Size--; dest = *(_sd_)->Data++;
|
|
177
|
+
|
|
178
|
+
#define SZ_READ_BYTE_SD(_sd_, dest) \
|
|
179
|
+
if ((_sd_)->Size == 0) return SZ_ERROR_ARCHIVE; \
|
|
180
|
+
SZ_READ_BYTE_SD_NOCHECK(_sd_, dest)
|
|
181
|
+
|
|
182
|
+
#define SZ_READ_BYTE(dest) SZ_READ_BYTE_SD(sd, dest)
|
|
183
|
+
|
|
184
|
+
#define SZ_READ_BYTE_2(dest) \
|
|
185
|
+
if (sd.Size == 0) return SZ_ERROR_ARCHIVE; \
|
|
186
|
+
sd.Size--; dest = *sd.Data++;
|
|
187
|
+
|
|
188
|
+
#define SKIP_DATA(sd, size) { sd->Size -= (size_t)(size); sd->Data += (size_t)(size); }
|
|
189
|
+
#define SKIP_DATA2(sd, size) { sd.Size -= (size_t)(size); sd.Data += (size_t)(size); }
|
|
190
|
+
|
|
191
|
+
static Z7_NO_INLINE SRes ReadNumber(CSzData *sd, UInt64 *value)
|
|
192
|
+
{
|
|
193
|
+
unsigned firstByte, mask, i, v;
|
|
194
|
+
|
|
195
|
+
SZ_READ_BYTE(firstByte)
|
|
196
|
+
if ((firstByte & 0x80) == 0)
|
|
197
|
+
{
|
|
198
|
+
*value = firstByte;
|
|
199
|
+
return SZ_OK;
|
|
200
|
+
}
|
|
201
|
+
SZ_READ_BYTE(v)
|
|
202
|
+
if ((firstByte & 0x40) == 0)
|
|
203
|
+
{
|
|
204
|
+
*value = (((UInt32)firstByte & 0x3F) << 8) | v;
|
|
205
|
+
return SZ_OK;
|
|
206
|
+
}
|
|
207
|
+
SZ_READ_BYTE(mask)
|
|
208
|
+
*value = v | ((UInt32)mask << 8);
|
|
209
|
+
mask = 0x20;
|
|
210
|
+
for (i = 2 * 8; i < 8 * 8; i += 8)
|
|
211
|
+
{
|
|
212
|
+
unsigned b;
|
|
213
|
+
if ((firstByte & mask) == 0)
|
|
214
|
+
{
|
|
215
|
+
const UInt64 highPart = (unsigned)firstByte & (unsigned)(mask - 1);
|
|
216
|
+
*value |= (highPart << i);
|
|
217
|
+
return SZ_OK;
|
|
218
|
+
}
|
|
219
|
+
mask >>= 1;
|
|
220
|
+
SZ_READ_BYTE(b)
|
|
221
|
+
*value |= ((UInt64)b << i);
|
|
222
|
+
}
|
|
223
|
+
return SZ_OK;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
static Z7_NO_INLINE SRes SzReadNumber32(CSzData *sd, UInt32 *value)
|
|
228
|
+
{
|
|
229
|
+
unsigned firstByte;
|
|
230
|
+
UInt64 value64;
|
|
231
|
+
if (sd->Size == 0)
|
|
232
|
+
return SZ_ERROR_ARCHIVE;
|
|
233
|
+
firstByte = *sd->Data;
|
|
234
|
+
if ((firstByte & 0x80) == 0)
|
|
235
|
+
{
|
|
236
|
+
*value = firstByte;
|
|
237
|
+
sd->Data++;
|
|
238
|
+
sd->Size--;
|
|
239
|
+
return SZ_OK;
|
|
240
|
+
}
|
|
241
|
+
RINOK(ReadNumber(sd, &value64))
|
|
242
|
+
if (value64 >= (UInt32)0x80000000 - 1)
|
|
243
|
+
return SZ_ERROR_UNSUPPORTED;
|
|
244
|
+
if (value64 >= ((UInt64)(1) << ((sizeof(size_t) - 1) * 8 + 4)))
|
|
245
|
+
return SZ_ERROR_UNSUPPORTED;
|
|
246
|
+
*value = (UInt32)value64;
|
|
247
|
+
return SZ_OK;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
#define ReadID(sd, value) ReadNumber(sd, value)
|
|
251
|
+
|
|
252
|
+
Z7_NO_INLINE
|
|
253
|
+
static SRes SkipData(CSzData *sd)
|
|
254
|
+
{
|
|
255
|
+
UInt64 size;
|
|
256
|
+
RINOK(ReadNumber(sd, &size))
|
|
257
|
+
if (size > sd->Size)
|
|
258
|
+
return SZ_ERROR_ARCHIVE;
|
|
259
|
+
SKIP_DATA(sd, size)
|
|
260
|
+
return SZ_OK;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
Z7_NO_INLINE
|
|
264
|
+
static SRes WaitId(CSzData *sd, UInt32 id)
|
|
265
|
+
{
|
|
266
|
+
for (;;)
|
|
267
|
+
{
|
|
268
|
+
UInt64 type;
|
|
269
|
+
RINOK(ReadID(sd, &type))
|
|
270
|
+
if (type == id)
|
|
271
|
+
return SZ_OK;
|
|
272
|
+
if (type == k7zIdEnd)
|
|
273
|
+
return SZ_ERROR_ARCHIVE;
|
|
274
|
+
RINOK(SkipData(sd))
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
|
|
279
|
+
Z7_NO_INLINE
|
|
280
|
+
static UInt32 CountDefinedBits(const Byte *bits, UInt32 numItems)
|
|
281
|
+
{
|
|
282
|
+
unsigned b = 0;
|
|
283
|
+
unsigned m = 0;
|
|
284
|
+
UInt32 sum = 0;
|
|
285
|
+
for (; numItems != 0; numItems--)
|
|
286
|
+
{
|
|
287
|
+
if (m == 0)
|
|
288
|
+
{
|
|
289
|
+
b = *bits++;
|
|
290
|
+
m = 8;
|
|
291
|
+
}
|
|
292
|
+
m--;
|
|
293
|
+
sum += (UInt32)((b >> m) & 1);
|
|
294
|
+
}
|
|
295
|
+
return sum;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
static Z7_NO_INLINE SRes ReadBitVector(CSzData *sd, size_t numItems, Byte **v, ISzAllocPtr alloc)
|
|
299
|
+
{
|
|
300
|
+
Byte allAreDefined;
|
|
301
|
+
Byte *v2;
|
|
302
|
+
const size_t numBytes = (numItems + 7) >> 3;
|
|
303
|
+
*v = NULL;
|
|
304
|
+
SZ_READ_BYTE(allAreDefined)
|
|
305
|
+
if (numBytes == 0)
|
|
306
|
+
return SZ_OK;
|
|
307
|
+
if (allAreDefined == 0)
|
|
308
|
+
{
|
|
309
|
+
if (numBytes > sd->Size)
|
|
310
|
+
return SZ_ERROR_ARCHIVE;
|
|
311
|
+
MY_ALLOC_AND_CPY(*v, numBytes, sd->Data, alloc)
|
|
312
|
+
SKIP_DATA(sd, numBytes)
|
|
313
|
+
return SZ_OK;
|
|
314
|
+
}
|
|
315
|
+
MY_ALLOC(Byte, *v, numBytes, alloc)
|
|
316
|
+
v2 = *v;
|
|
317
|
+
memset(v2, 0xFF, (size_t)numBytes);
|
|
318
|
+
{
|
|
319
|
+
const unsigned numBits = (unsigned)numItems & 7;
|
|
320
|
+
if (numBits)
|
|
321
|
+
v2[(size_t)numBytes - 1] = (Byte)(0xff00u >> numBits);
|
|
322
|
+
}
|
|
323
|
+
return SZ_OK;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
static Z7_NO_INLINE SRes ReadUi32s(CSzData *sd2, size_t numItems, CSzBitUi32s *crcs, ISzAllocPtr alloc)
|
|
327
|
+
{
|
|
328
|
+
size_t i;
|
|
329
|
+
const Byte *data;
|
|
330
|
+
size_t size;
|
|
331
|
+
UInt32 *vals;
|
|
332
|
+
const Byte *defs;
|
|
333
|
+
MY_ALLOC_ZE(UInt32, vals, numItems, alloc)
|
|
334
|
+
crcs->Vals = vals;
|
|
335
|
+
defs = crcs->Defs;
|
|
336
|
+
data = sd2->Data;
|
|
337
|
+
size = sd2->Size;
|
|
338
|
+
for (i = 0; i < numItems; i++)
|
|
339
|
+
if (SzBitArray_Check(defs, i))
|
|
340
|
+
{
|
|
341
|
+
if (size < 4)
|
|
342
|
+
return SZ_ERROR_ARCHIVE;
|
|
343
|
+
size -= 4;
|
|
344
|
+
vals[i] = GetUi32(data);
|
|
345
|
+
data += 4;
|
|
346
|
+
}
|
|
347
|
+
else
|
|
348
|
+
vals[i] = 0;
|
|
349
|
+
sd2->Data = data;
|
|
350
|
+
sd2->Size = size;
|
|
351
|
+
return SZ_OK;
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
static SRes ReadBitUi32s(CSzData *sd, size_t numItems, CSzBitUi32s *crcs, ISzAllocPtr alloc)
|
|
355
|
+
{
|
|
356
|
+
if (crcs->Defs)
|
|
357
|
+
return SZ_ERROR_ARCHIVE;
|
|
358
|
+
RINOK(ReadBitVector(sd, numItems, &crcs->Defs, alloc))
|
|
359
|
+
return ReadUi32s(sd, numItems, crcs, alloc);
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
Z7_NO_INLINE
|
|
363
|
+
static SRes SkipBitUi32s(CSzData *sd, UInt32 numItems)
|
|
364
|
+
{
|
|
365
|
+
Byte allAreDefined;
|
|
366
|
+
UInt32 numDefined = numItems;
|
|
367
|
+
SZ_READ_BYTE(allAreDefined)
|
|
368
|
+
if (!allAreDefined)
|
|
369
|
+
{
|
|
370
|
+
const size_t numBytes = (numItems + 7) >> 3;
|
|
371
|
+
if (numBytes > sd->Size)
|
|
372
|
+
return SZ_ERROR_ARCHIVE;
|
|
373
|
+
numDefined = CountDefinedBits(sd->Data, numItems);
|
|
374
|
+
SKIP_DATA(sd, numBytes)
|
|
375
|
+
}
|
|
376
|
+
if (numDefined > (sd->Size >> 2))
|
|
377
|
+
return SZ_ERROR_ARCHIVE;
|
|
378
|
+
SKIP_DATA(sd, (size_t)numDefined * 4)
|
|
379
|
+
return SZ_OK;
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
static SRes ReadPackInfo(CSzAr *p, CSzData *sd, ISzAllocPtr alloc)
|
|
383
|
+
{
|
|
384
|
+
RINOK(SzReadNumber32(sd, &p->NumPackStreams))
|
|
385
|
+
RINOK(WaitId(sd, k7zIdSize))
|
|
386
|
+
{
|
|
387
|
+
UInt64 *packPositions;
|
|
388
|
+
UInt64 sum;
|
|
389
|
+
size_t num = (size_t)p->NumPackStreams + 1;
|
|
390
|
+
MY_ALLOC(UInt64, packPositions, num, alloc)
|
|
391
|
+
p->PackPositions = packPositions;
|
|
392
|
+
sum = 0;
|
|
393
|
+
for (;;)
|
|
394
|
+
{
|
|
395
|
+
UInt64 packSize;
|
|
396
|
+
*packPositions++ = sum;
|
|
397
|
+
if (--num == 0)
|
|
398
|
+
break;
|
|
399
|
+
RINOK(ReadNumber(sd, &packSize))
|
|
400
|
+
sum += packSize;
|
|
401
|
+
if (sum < packSize)
|
|
402
|
+
return SZ_ERROR_ARCHIVE;
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
for (;;)
|
|
406
|
+
{
|
|
407
|
+
UInt64 type;
|
|
408
|
+
RINOK(ReadID(sd, &type))
|
|
409
|
+
if (type == k7zIdEnd)
|
|
410
|
+
return SZ_OK;
|
|
411
|
+
if (type == k7zIdCRC)
|
|
412
|
+
{
|
|
413
|
+
/* CRC of packed streams is unused now */
|
|
414
|
+
RINOK(SkipBitUi32s(sd, p->NumPackStreams))
|
|
415
|
+
continue;
|
|
416
|
+
}
|
|
417
|
+
RINOK(SkipData(sd))
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
|
|
422
|
+
#define k_NumCodersStreams_in_Folder_MAX (SZ_NUM_BONDS_IN_FOLDER_MAX + SZ_NUM_PACK_STREAMS_IN_FOLDER_MAX)
|
|
423
|
+
|
|
424
|
+
SRes SzGetNextFolderItem(CSzFolder *f, CSzData *sd)
|
|
425
|
+
{
|
|
426
|
+
UInt32 numCoders, i, numInStreams = 0;
|
|
427
|
+
const Byte * const dataStart = sd->Data;
|
|
428
|
+
|
|
429
|
+
// f->NumCoders = 0;
|
|
430
|
+
// f->NumBonds = 0;
|
|
431
|
+
// f->NumPackStreams = 0;
|
|
432
|
+
f->UnpackStream = 0;
|
|
433
|
+
|
|
434
|
+
RINOK(SzReadNumber32(sd, &numCoders))
|
|
435
|
+
if (numCoders == 0 || numCoders > SZ_NUM_CODERS_IN_FOLDER_MAX)
|
|
436
|
+
return SZ_ERROR_UNSUPPORTED;
|
|
437
|
+
f->NumCoders = numCoders;
|
|
438
|
+
|
|
439
|
+
for (i = 0; i < numCoders; i++)
|
|
440
|
+
{
|
|
441
|
+
Byte mainByte;
|
|
442
|
+
CSzCoderInfo *coder;
|
|
443
|
+
{
|
|
444
|
+
unsigned idSize, j;
|
|
445
|
+
UInt64 id;
|
|
446
|
+
const Byte *data;
|
|
447
|
+
|
|
448
|
+
if (!sd->Size)
|
|
449
|
+
return SZ_ERROR_ARCHIVE;
|
|
450
|
+
sd->Size--;
|
|
451
|
+
data = sd->Data;
|
|
452
|
+
mainByte = *data++;
|
|
453
|
+
if (mainByte & 0xC0)
|
|
454
|
+
return SZ_ERROR_UNSUPPORTED;
|
|
455
|
+
idSize = mainByte & 0xF;
|
|
456
|
+
if (idSize > sizeof(id))
|
|
457
|
+
return SZ_ERROR_UNSUPPORTED;
|
|
458
|
+
if (idSize > sd->Size)
|
|
459
|
+
return SZ_ERROR_ARCHIVE;
|
|
460
|
+
sd->Size -= idSize;
|
|
461
|
+
id = 0;
|
|
462
|
+
for (j = 0; j < idSize; j++)
|
|
463
|
+
id = (id << 8) | *data++;
|
|
464
|
+
sd->Data = data;
|
|
465
|
+
if (id > (UInt32)0xFFFFFFFF)
|
|
466
|
+
return SZ_ERROR_UNSUPPORTED;
|
|
467
|
+
coder = f->Coders + i;
|
|
468
|
+
coder->MethodID = (UInt32)id;
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
coder->NumStreams = 1;
|
|
472
|
+
coder->PropsOffset = 0;
|
|
473
|
+
coder->PropsSize = 0;
|
|
474
|
+
|
|
475
|
+
if (mainByte & 0x10)
|
|
476
|
+
{
|
|
477
|
+
UInt32 numStreams;
|
|
478
|
+
RINOK(SzReadNumber32(sd, &numStreams))
|
|
479
|
+
if (numStreams > k_NumCodersStreams_in_Folder_MAX)
|
|
480
|
+
return SZ_ERROR_UNSUPPORTED;
|
|
481
|
+
coder->NumStreams = (Byte)numStreams;
|
|
482
|
+
RINOK(SzReadNumber32(sd, &numStreams))
|
|
483
|
+
if (numStreams != 1)
|
|
484
|
+
return SZ_ERROR_UNSUPPORTED;
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
numInStreams += coder->NumStreams;
|
|
488
|
+
if (numInStreams > k_NumCodersStreams_in_Folder_MAX)
|
|
489
|
+
return SZ_ERROR_UNSUPPORTED;
|
|
490
|
+
|
|
491
|
+
if (mainByte & 0x20)
|
|
492
|
+
{
|
|
493
|
+
UInt32 propsSize;
|
|
494
|
+
RINOK(SzReadNumber32(sd, &propsSize))
|
|
495
|
+
if (propsSize > sd->Size)
|
|
496
|
+
return SZ_ERROR_ARCHIVE;
|
|
497
|
+
if (propsSize >= 0x80)
|
|
498
|
+
return SZ_ERROR_UNSUPPORTED;
|
|
499
|
+
coder->PropsOffset = (size_t)(sd->Data - dataStart);
|
|
500
|
+
coder->PropsSize = (Byte)propsSize;
|
|
501
|
+
sd->Data += (size_t)propsSize;
|
|
502
|
+
sd->Size -= (size_t)propsSize;
|
|
503
|
+
}
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
{
|
|
507
|
+
Byte streamUsed[k_NumCodersStreams_in_Folder_MAX];
|
|
508
|
+
UInt32 numBonds, numPackStreams;
|
|
509
|
+
|
|
510
|
+
numBonds = numCoders - 1;
|
|
511
|
+
if (numInStreams < numBonds)
|
|
512
|
+
return SZ_ERROR_ARCHIVE;
|
|
513
|
+
if (numBonds > SZ_NUM_BONDS_IN_FOLDER_MAX)
|
|
514
|
+
return SZ_ERROR_UNSUPPORTED;
|
|
515
|
+
f->NumBonds = numBonds;
|
|
516
|
+
|
|
517
|
+
numPackStreams = numInStreams - numBonds;
|
|
518
|
+
if (numPackStreams > SZ_NUM_PACK_STREAMS_IN_FOLDER_MAX)
|
|
519
|
+
return SZ_ERROR_UNSUPPORTED;
|
|
520
|
+
f->NumPackStreams = numPackStreams;
|
|
521
|
+
|
|
522
|
+
for (i = 0; i < Z7_ARRAY_SIZE(streamUsed); i++) // numInStreams
|
|
523
|
+
streamUsed[i] = False;
|
|
524
|
+
|
|
525
|
+
if (numBonds)
|
|
526
|
+
{
|
|
527
|
+
Byte coderUsed[SZ_NUM_CODERS_IN_FOLDER_MAX];
|
|
528
|
+
for (i = 0; i < Z7_ARRAY_SIZE(coderUsed); i++) // numCoders
|
|
529
|
+
coderUsed[i] = False;
|
|
530
|
+
|
|
531
|
+
for (i = 0; i < numBonds; i++)
|
|
532
|
+
{
|
|
533
|
+
CSzBond *bp = f->Bonds + i;
|
|
534
|
+
|
|
535
|
+
RINOK(SzReadNumber32(sd, &bp->InIndex))
|
|
536
|
+
if (bp->InIndex >= numInStreams || streamUsed[bp->InIndex])
|
|
537
|
+
return SZ_ERROR_ARCHIVE;
|
|
538
|
+
streamUsed[bp->InIndex] = True;
|
|
539
|
+
|
|
540
|
+
RINOK(SzReadNumber32(sd, &bp->OutIndex))
|
|
541
|
+
if (bp->OutIndex >= numCoders || coderUsed[bp->OutIndex])
|
|
542
|
+
return SZ_ERROR_ARCHIVE;
|
|
543
|
+
coderUsed[bp->OutIndex] = True;
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
for (i = 0;;)
|
|
547
|
+
{
|
|
548
|
+
if (!coderUsed[i])
|
|
549
|
+
break;
|
|
550
|
+
if (++i == numCoders)
|
|
551
|
+
return SZ_ERROR_ARCHIVE;
|
|
552
|
+
}
|
|
553
|
+
f->UnpackStream = i;
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
if (numPackStreams == 1)
|
|
557
|
+
{
|
|
558
|
+
for (i = 0;; i++)
|
|
559
|
+
{
|
|
560
|
+
if (i == numInStreams)
|
|
561
|
+
return SZ_ERROR_ARCHIVE;
|
|
562
|
+
if (!streamUsed[i])
|
|
563
|
+
break;
|
|
564
|
+
}
|
|
565
|
+
f->PackStreams[0] = i;
|
|
566
|
+
}
|
|
567
|
+
else
|
|
568
|
+
for (i = 0; i < numPackStreams; i++)
|
|
569
|
+
{
|
|
570
|
+
UInt32 index;
|
|
571
|
+
RINOK(SzReadNumber32(sd, &index))
|
|
572
|
+
if (index >= numInStreams || streamUsed[index])
|
|
573
|
+
return SZ_ERROR_ARCHIVE;
|
|
574
|
+
streamUsed[index] = True;
|
|
575
|
+
f->PackStreams[i] = index;
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
return SZ_OK;
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
|
|
582
|
+
static SRes SkipNumbers(CSzData *sd2, UInt32 num)
|
|
583
|
+
{
|
|
584
|
+
const Byte *data = sd2->Data;
|
|
585
|
+
size_t size = sd2->Size;
|
|
586
|
+
for (; num != 0; num--)
|
|
587
|
+
{
|
|
588
|
+
unsigned firstByte;
|
|
589
|
+
unsigned i;
|
|
590
|
+
if (size == 0)
|
|
591
|
+
return SZ_ERROR_ARCHIVE;
|
|
592
|
+
firstByte = *data;
|
|
593
|
+
for (i = 1; firstByte & 0x80; i++)
|
|
594
|
+
firstByte <<= 1;
|
|
595
|
+
if (size < i)
|
|
596
|
+
return SZ_ERROR_ARCHIVE;
|
|
597
|
+
size -= i;
|
|
598
|
+
data += i;
|
|
599
|
+
}
|
|
600
|
+
sd2->Data = data;
|
|
601
|
+
sd2->Size = size;
|
|
602
|
+
return SZ_OK;
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
|
|
606
|
+
#define k_Scan_NumCoders_MAX 64
|
|
607
|
+
#define k_Scan_NumCodersStreams_in_Folder_MAX 64
|
|
608
|
+
|
|
609
|
+
static SRes ReadUnpackInfo(CSzAr *p, CSzData *sd2, const UInt32 numFoldersMax,
|
|
610
|
+
const CBuf *tempBufs, UInt32 numTempBufs, ISzAllocPtr alloc)
|
|
611
|
+
{
|
|
612
|
+
CSzData sd;
|
|
613
|
+
UInt32 fo, numFolders, numCodersOutStreams, packStreamIndex;
|
|
614
|
+
const Byte *startBufPtr;
|
|
615
|
+
Byte external;
|
|
616
|
+
|
|
617
|
+
RINOK(WaitId(sd2, k7zIdFolder))
|
|
618
|
+
|
|
619
|
+
RINOK(SzReadNumber32(sd2, &numFolders))
|
|
620
|
+
if (numFolders > numFoldersMax)
|
|
621
|
+
return SZ_ERROR_UNSUPPORTED;
|
|
622
|
+
p->NumFolders = numFolders;
|
|
623
|
+
|
|
624
|
+
SZ_READ_BYTE_SD(sd2, external)
|
|
625
|
+
if (external == 0)
|
|
626
|
+
sd = *sd2;
|
|
627
|
+
else
|
|
628
|
+
{
|
|
629
|
+
UInt32 index;
|
|
630
|
+
RINOK(SzReadNumber32(sd2, &index))
|
|
631
|
+
if (index >= numTempBufs)
|
|
632
|
+
return SZ_ERROR_ARCHIVE;
|
|
633
|
+
sd.Data = tempBufs[index].data;
|
|
634
|
+
sd.Size = tempBufs[index].size;
|
|
635
|
+
}
|
|
636
|
+
|
|
637
|
+
MY_ALLOC(size_t, p->FoCodersOffsets, (size_t)numFolders + 1, alloc)
|
|
638
|
+
MY_ALLOC(UInt32, p->FoStartPackStreamIndex, (size_t)numFolders + 1, alloc)
|
|
639
|
+
MY_ALLOC(UInt32, p->FoToCoderUnpackSizes, (size_t)numFolders + 1, alloc)
|
|
640
|
+
MY_ALLOC_ZE(Byte, p->FoToMainUnpackSizeIndex, (size_t)numFolders, alloc)
|
|
641
|
+
|
|
642
|
+
startBufPtr = sd.Data;
|
|
643
|
+
|
|
644
|
+
packStreamIndex = 0;
|
|
645
|
+
numCodersOutStreams = 0;
|
|
646
|
+
|
|
647
|
+
for (fo = 0; fo < numFolders; fo++)
|
|
648
|
+
{
|
|
649
|
+
UInt32 numCoders, ci, numInStreams = 0;
|
|
650
|
+
|
|
651
|
+
p->FoCodersOffsets[fo] = (size_t)(sd.Data - startBufPtr);
|
|
652
|
+
|
|
653
|
+
RINOK(SzReadNumber32(&sd, &numCoders))
|
|
654
|
+
if (numCoders == 0 || numCoders > k_Scan_NumCoders_MAX)
|
|
655
|
+
return SZ_ERROR_UNSUPPORTED;
|
|
656
|
+
|
|
657
|
+
for (ci = 0; ci < numCoders; ci++)
|
|
658
|
+
{
|
|
659
|
+
Byte mainByte;
|
|
660
|
+
unsigned idSize;
|
|
661
|
+
UInt32 coderInStreams;
|
|
662
|
+
|
|
663
|
+
SZ_READ_BYTE_2(mainByte)
|
|
664
|
+
if ((mainByte & 0xC0) != 0)
|
|
665
|
+
return SZ_ERROR_UNSUPPORTED;
|
|
666
|
+
idSize = (mainByte & 0xF);
|
|
667
|
+
if (idSize > 8)
|
|
668
|
+
return SZ_ERROR_UNSUPPORTED;
|
|
669
|
+
if (idSize > sd.Size)
|
|
670
|
+
return SZ_ERROR_ARCHIVE;
|
|
671
|
+
SKIP_DATA2(sd, idSize)
|
|
672
|
+
|
|
673
|
+
coderInStreams = 1;
|
|
674
|
+
|
|
675
|
+
if ((mainByte & 0x10) != 0)
|
|
676
|
+
{
|
|
677
|
+
UInt32 coderOutStreams;
|
|
678
|
+
RINOK(SzReadNumber32(&sd, &coderInStreams))
|
|
679
|
+
RINOK(SzReadNumber32(&sd, &coderOutStreams))
|
|
680
|
+
if (coderInStreams > k_Scan_NumCodersStreams_in_Folder_MAX || coderOutStreams != 1)
|
|
681
|
+
return SZ_ERROR_UNSUPPORTED;
|
|
682
|
+
}
|
|
683
|
+
|
|
684
|
+
numInStreams += coderInStreams;
|
|
685
|
+
|
|
686
|
+
if ((mainByte & 0x20) != 0)
|
|
687
|
+
{
|
|
688
|
+
UInt32 propsSize;
|
|
689
|
+
RINOK(SzReadNumber32(&sd, &propsSize))
|
|
690
|
+
if (propsSize > sd.Size)
|
|
691
|
+
return SZ_ERROR_ARCHIVE;
|
|
692
|
+
SKIP_DATA2(sd, propsSize)
|
|
693
|
+
}
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
{
|
|
697
|
+
UInt32 indexOfMainStream = 0;
|
|
698
|
+
UInt32 numPackStreams = 1;
|
|
699
|
+
|
|
700
|
+
if (numCoders != 1 || numInStreams != 1)
|
|
701
|
+
{
|
|
702
|
+
Byte streamUsed[k_Scan_NumCodersStreams_in_Folder_MAX];
|
|
703
|
+
Byte coderUsed[k_Scan_NumCoders_MAX];
|
|
704
|
+
UInt32 i;
|
|
705
|
+
const UInt32 numBonds = numCoders - 1;
|
|
706
|
+
if (numInStreams < numBonds)
|
|
707
|
+
return SZ_ERROR_ARCHIVE;
|
|
708
|
+
if (numInStreams > k_Scan_NumCodersStreams_in_Folder_MAX)
|
|
709
|
+
return SZ_ERROR_UNSUPPORTED;
|
|
710
|
+
for (i = 0; i < numInStreams; i++)
|
|
711
|
+
streamUsed[i] = False;
|
|
712
|
+
for (i = 0; i < numCoders; i++)
|
|
713
|
+
coderUsed[i] = False;
|
|
714
|
+
|
|
715
|
+
for (i = 0; i < numBonds; i++)
|
|
716
|
+
{
|
|
717
|
+
UInt32 index;
|
|
718
|
+
|
|
719
|
+
RINOK(SzReadNumber32(&sd, &index))
|
|
720
|
+
if (index >= numInStreams || streamUsed[index])
|
|
721
|
+
return SZ_ERROR_ARCHIVE;
|
|
722
|
+
streamUsed[index] = True;
|
|
723
|
+
|
|
724
|
+
RINOK(SzReadNumber32(&sd, &index))
|
|
725
|
+
if (index >= numCoders || coderUsed[index])
|
|
726
|
+
return SZ_ERROR_ARCHIVE;
|
|
727
|
+
coderUsed[index] = True;
|
|
728
|
+
}
|
|
729
|
+
|
|
730
|
+
numPackStreams = numInStreams - numBonds;
|
|
731
|
+
|
|
732
|
+
if (numPackStreams != 1)
|
|
733
|
+
for (i = 0; i < numPackStreams; i++)
|
|
734
|
+
{
|
|
735
|
+
UInt32 index;
|
|
736
|
+
RINOK(SzReadNumber32(&sd, &index))
|
|
737
|
+
if (index >= numInStreams || streamUsed[index])
|
|
738
|
+
return SZ_ERROR_ARCHIVE;
|
|
739
|
+
streamUsed[index] = True;
|
|
740
|
+
}
|
|
741
|
+
|
|
742
|
+
for (i = 0;;)
|
|
743
|
+
{
|
|
744
|
+
if (!coderUsed[i])
|
|
745
|
+
break;
|
|
746
|
+
if (++i == numCoders)
|
|
747
|
+
return SZ_ERROR_ARCHIVE;
|
|
748
|
+
}
|
|
749
|
+
indexOfMainStream = i;
|
|
750
|
+
}
|
|
751
|
+
|
|
752
|
+
p->FoStartPackStreamIndex[fo] = packStreamIndex;
|
|
753
|
+
p->FoToCoderUnpackSizes[fo] = numCodersOutStreams;
|
|
754
|
+
p->FoToMainUnpackSizeIndex[fo] = (Byte)indexOfMainStream;
|
|
755
|
+
numCodersOutStreams += numCoders;
|
|
756
|
+
if (numCodersOutStreams < numCoders)
|
|
757
|
+
return SZ_ERROR_UNSUPPORTED;
|
|
758
|
+
if (numPackStreams > p->NumPackStreams - packStreamIndex)
|
|
759
|
+
return SZ_ERROR_ARCHIVE;
|
|
760
|
+
packStreamIndex += numPackStreams;
|
|
761
|
+
}
|
|
762
|
+
}
|
|
763
|
+
|
|
764
|
+
{
|
|
765
|
+
const size_t k_numCodersOutStreams_Limit = (size_t)1 << (sizeof(size_t) * 8 - 4);
|
|
766
|
+
if (numCodersOutStreams >= k_numCodersOutStreams_Limit)
|
|
767
|
+
return SZ_ERROR_UNSUPPORTED;
|
|
768
|
+
}
|
|
769
|
+
p->FoToCoderUnpackSizes[fo] = numCodersOutStreams;
|
|
770
|
+
p->FoStartPackStreamIndex[fo] = packStreamIndex;
|
|
771
|
+
{
|
|
772
|
+
const size_t dataSize = (size_t)(sd.Data - startBufPtr);
|
|
773
|
+
p->FoCodersOffsets[fo] = dataSize;
|
|
774
|
+
MY_ALLOC_ZE_AND_CPY(p->CodersData, dataSize, startBufPtr, alloc)
|
|
775
|
+
}
|
|
776
|
+
|
|
777
|
+
if (external)
|
|
778
|
+
{
|
|
779
|
+
if (sd.Size)
|
|
780
|
+
return SZ_ERROR_ARCHIVE;
|
|
781
|
+
sd = *sd2;
|
|
782
|
+
}
|
|
783
|
+
|
|
784
|
+
RINOK(WaitId(&sd, k7zIdCodersUnpackSize))
|
|
785
|
+
{
|
|
786
|
+
UInt64 *sizes;
|
|
787
|
+
MY_ALLOC_ZE(UInt64, sizes, (size_t)numCodersOutStreams, alloc)
|
|
788
|
+
p->CoderUnpackSizes = sizes;
|
|
789
|
+
if (numCodersOutStreams)
|
|
790
|
+
do
|
|
791
|
+
{
|
|
792
|
+
RINOK(ReadNumber(&sd, sizes))
|
|
793
|
+
sizes++;
|
|
794
|
+
}
|
|
795
|
+
while (--numCodersOutStreams);
|
|
796
|
+
}
|
|
797
|
+
|
|
798
|
+
for (;;)
|
|
799
|
+
{
|
|
800
|
+
UInt64 type;
|
|
801
|
+
RINOK(ReadID(&sd, &type))
|
|
802
|
+
if (type == k7zIdEnd)
|
|
803
|
+
break;
|
|
804
|
+
if (type == k7zIdCRC)
|
|
805
|
+
{
|
|
806
|
+
RINOK(ReadBitUi32s(&sd, numFolders, &p->FolderCRCs, alloc))
|
|
807
|
+
continue;
|
|
808
|
+
}
|
|
809
|
+
RINOK(SkipData(&sd))
|
|
810
|
+
}
|
|
811
|
+
*sd2 = sd;
|
|
812
|
+
return SZ_OK;
|
|
813
|
+
}
|
|
814
|
+
|
|
815
|
+
|
|
816
|
+
UInt64 SzAr_GetFolderUnpackSize(const CSzAr *p, UInt32 folderIndex)
|
|
817
|
+
{
|
|
818
|
+
return p->CoderUnpackSizes[p->FoToCoderUnpackSizes[folderIndex] + p->FoToMainUnpackSizeIndex[folderIndex]];
|
|
819
|
+
}
|
|
820
|
+
|
|
821
|
+
|
|
822
|
+
typedef struct
|
|
823
|
+
{
|
|
824
|
+
UInt32 NumTotalSubStreams;
|
|
825
|
+
UInt32 NumSubDigests;
|
|
826
|
+
CSzData sdNumSubStreams;
|
|
827
|
+
CSzData sdSizes;
|
|
828
|
+
CSzData sdCRCs;
|
|
829
|
+
} CSubStreamInfo;
|
|
830
|
+
|
|
831
|
+
|
|
832
|
+
static SRes ReadSubStreamsInfo(const CSzAr *p, CSzData *sd, CSubStreamInfo *ssi)
|
|
833
|
+
{
|
|
834
|
+
UInt64 type = 0;
|
|
835
|
+
const UInt32 numFolders = p->NumFolders;
|
|
836
|
+
UInt32 numUnpackStreams = numFolders;
|
|
837
|
+
UInt32 numSubDigests = numFolders;
|
|
838
|
+
UInt32 numUnpackSizesInData = 0;
|
|
839
|
+
|
|
840
|
+
for (;;)
|
|
841
|
+
{
|
|
842
|
+
RINOK(ReadID(sd, &type))
|
|
843
|
+
if (type == k7zIdNumUnpackStream)
|
|
844
|
+
{
|
|
845
|
+
UInt32 i;
|
|
846
|
+
if (ssi->sdNumSubStreams.Data)
|
|
847
|
+
return SZ_ERROR_UNSUPPORTED;
|
|
848
|
+
ssi->sdNumSubStreams.Data = sd->Data;
|
|
849
|
+
numUnpackStreams = 0;
|
|
850
|
+
numSubDigests = 0;
|
|
851
|
+
for (i = 0; i < numFolders; i++)
|
|
852
|
+
{
|
|
853
|
+
UInt32 numStreams;
|
|
854
|
+
RINOK(SzReadNumber32(sd, &numStreams))
|
|
855
|
+
numUnpackStreams += numStreams;
|
|
856
|
+
if (numUnpackStreams < numStreams)
|
|
857
|
+
return SZ_ERROR_UNSUPPORTED;
|
|
858
|
+
if (numStreams)
|
|
859
|
+
numUnpackSizesInData += (numStreams - 1);
|
|
860
|
+
if (numStreams != 1 || !SzBitWithVals_Check(&p->FolderCRCs, i))
|
|
861
|
+
numSubDigests += numStreams;
|
|
862
|
+
}
|
|
863
|
+
ssi->sdNumSubStreams.Size = (size_t)(sd->Data - ssi->sdNumSubStreams.Data);
|
|
864
|
+
continue;
|
|
865
|
+
}
|
|
866
|
+
if (type == k7zIdCRC || type == k7zIdSize || type == k7zIdEnd)
|
|
867
|
+
break;
|
|
868
|
+
RINOK(SkipData(sd))
|
|
869
|
+
}
|
|
870
|
+
|
|
871
|
+
if (!ssi->sdNumSubStreams.Data && p->FolderCRCs.Defs)
|
|
872
|
+
numSubDigests = numFolders - CountDefinedBits(p->FolderCRCs.Defs, numFolders);
|
|
873
|
+
|
|
874
|
+
ssi->NumTotalSubStreams = numUnpackStreams;
|
|
875
|
+
ssi->NumSubDigests = numSubDigests;
|
|
876
|
+
|
|
877
|
+
if (type == k7zIdSize)
|
|
878
|
+
{
|
|
879
|
+
ssi->sdSizes.Data = sd->Data;
|
|
880
|
+
RINOK(SkipNumbers(sd, numUnpackSizesInData))
|
|
881
|
+
ssi->sdSizes.Size = (size_t)(sd->Data - ssi->sdSizes.Data);
|
|
882
|
+
RINOK(ReadID(sd, &type))
|
|
883
|
+
}
|
|
884
|
+
|
|
885
|
+
for (;;)
|
|
886
|
+
{
|
|
887
|
+
if (type == k7zIdEnd)
|
|
888
|
+
return SZ_OK;
|
|
889
|
+
if (type == k7zIdCRC)
|
|
890
|
+
{
|
|
891
|
+
if (ssi->sdCRCs.Data)
|
|
892
|
+
return SZ_ERROR_UNSUPPORTED;
|
|
893
|
+
ssi->sdCRCs.Data = sd->Data;
|
|
894
|
+
RINOK(SkipBitUi32s(sd, numSubDigests))
|
|
895
|
+
ssi->sdCRCs.Size = (size_t)(sd->Data - ssi->sdCRCs.Data);
|
|
896
|
+
}
|
|
897
|
+
else
|
|
898
|
+
{
|
|
899
|
+
RINOK(SkipData(sd))
|
|
900
|
+
}
|
|
901
|
+
RINOK(ReadID(sd, &type))
|
|
902
|
+
}
|
|
903
|
+
}
|
|
904
|
+
|
|
905
|
+
|
|
906
|
+
static SRes SzReadStreamsInfo(CSzAr *p,
|
|
907
|
+
CSzData *sd,
|
|
908
|
+
const UInt32 numFoldersMax,
|
|
909
|
+
const CBuf * const tempBufs, const UInt32 numTempBufs,
|
|
910
|
+
UInt64 *dataOffset,
|
|
911
|
+
CSubStreamInfo *ssi,
|
|
912
|
+
ISzAllocPtr alloc)
|
|
913
|
+
{
|
|
914
|
+
UInt64 type;
|
|
915
|
+
|
|
916
|
+
SzData_CLEAR(&ssi->sdSizes)
|
|
917
|
+
SzData_CLEAR(&ssi->sdCRCs)
|
|
918
|
+
SzData_CLEAR(&ssi->sdNumSubStreams)
|
|
919
|
+
|
|
920
|
+
*dataOffset = 0;
|
|
921
|
+
RINOK(ReadID(sd, &type))
|
|
922
|
+
if (type == k7zIdPackInfo)
|
|
923
|
+
{
|
|
924
|
+
RINOK(ReadNumber(sd, dataOffset))
|
|
925
|
+
if (*dataOffset > p->RangeLimit)
|
|
926
|
+
return SZ_ERROR_ARCHIVE;
|
|
927
|
+
RINOK(ReadPackInfo(p, sd, alloc))
|
|
928
|
+
if (p->PackPositions[p->NumPackStreams] > p->RangeLimit - *dataOffset)
|
|
929
|
+
return SZ_ERROR_ARCHIVE;
|
|
930
|
+
RINOK(ReadID(sd, &type))
|
|
931
|
+
}
|
|
932
|
+
if (type == k7zIdUnpackInfo)
|
|
933
|
+
{
|
|
934
|
+
RINOK(ReadUnpackInfo(p, sd, numFoldersMax, tempBufs, numTempBufs, alloc))
|
|
935
|
+
RINOK(ReadID(sd, &type))
|
|
936
|
+
}
|
|
937
|
+
if (type == k7zIdSubStreamsInfo)
|
|
938
|
+
{
|
|
939
|
+
RINOK(ReadSubStreamsInfo(p, sd, ssi))
|
|
940
|
+
RINOK(ReadID(sd, &type))
|
|
941
|
+
}
|
|
942
|
+
else
|
|
943
|
+
{
|
|
944
|
+
ssi->NumTotalSubStreams = p->NumFolders;
|
|
945
|
+
// ssi->NumSubDigests = 0;
|
|
946
|
+
}
|
|
947
|
+
|
|
948
|
+
return (type == k7zIdEnd ? SZ_OK : SZ_ERROR_UNSUPPORTED);
|
|
949
|
+
}
|
|
950
|
+
|
|
951
|
+
|
|
952
|
+
static SRes SzReadAndDecodePackedStreams(
|
|
953
|
+
ILookInStreamPtr inStream,
|
|
954
|
+
CSzData *sd,
|
|
955
|
+
CBuf * const tempBufs,
|
|
956
|
+
const UInt32 numFoldersMax,
|
|
957
|
+
const UInt64 baseOffset,
|
|
958
|
+
CSzAr *p,
|
|
959
|
+
ISzAllocPtr allocTemp)
|
|
960
|
+
{
|
|
961
|
+
UInt64 dataStartPos;
|
|
962
|
+
UInt32 fo;
|
|
963
|
+
CSubStreamInfo ssi;
|
|
964
|
+
|
|
965
|
+
RINOK(SzReadStreamsInfo(p, sd, numFoldersMax, NULL, 0, &dataStartPos, &ssi, allocTemp))
|
|
966
|
+
|
|
967
|
+
dataStartPos += baseOffset;
|
|
968
|
+
if (p->NumFolders == 0)
|
|
969
|
+
return SZ_ERROR_ARCHIVE;
|
|
970
|
+
|
|
971
|
+
for (fo = 0; fo < p->NumFolders; fo++)
|
|
972
|
+
Buf_Init(tempBufs + fo);
|
|
973
|
+
|
|
974
|
+
for (fo = 0; fo < p->NumFolders; fo++)
|
|
975
|
+
{
|
|
976
|
+
CBuf *tempBuf = tempBufs + fo;
|
|
977
|
+
const UInt64 unpackSize = SzAr_GetFolderUnpackSize(p, fo);
|
|
978
|
+
if ((size_t)unpackSize != unpackSize)
|
|
979
|
+
return SZ_ERROR_MEM;
|
|
980
|
+
if (!Buf_Create(tempBuf, (size_t)unpackSize, allocTemp))
|
|
981
|
+
return SZ_ERROR_MEM;
|
|
982
|
+
}
|
|
983
|
+
|
|
984
|
+
for (fo = 0; fo < p->NumFolders; fo++)
|
|
985
|
+
{
|
|
986
|
+
const CBuf *tempBuf = tempBufs + fo;
|
|
987
|
+
RINOK(LookInStream_SeekTo(inStream, dataStartPos))
|
|
988
|
+
RINOK(SzAr_DecodeFolder(p, fo, inStream, dataStartPos, tempBuf->data, tempBuf->size, allocTemp))
|
|
989
|
+
}
|
|
990
|
+
|
|
991
|
+
return SZ_OK;
|
|
992
|
+
}
|
|
993
|
+
|
|
994
|
+
|
|
995
|
+
// (size & 1) == 0
|
|
996
|
+
// (data) is aligned for 2-bytes
|
|
997
|
+
static SRes SzReadFileNames(const Byte *data, size_t size, UInt32 numFiles, size_t *offsets)
|
|
998
|
+
{
|
|
999
|
+
const Byte *p, *lim;
|
|
1000
|
+
*offsets++ = 0;
|
|
1001
|
+
if (numFiles == 0)
|
|
1002
|
+
return (size == 0) ? SZ_OK : SZ_ERROR_ARCHIVE;
|
|
1003
|
+
if (size < 2)
|
|
1004
|
+
return SZ_ERROR_ARCHIVE;
|
|
1005
|
+
lim = data + size;
|
|
1006
|
+
if (*(const UInt16 *)(const void *)(lim - 2))
|
|
1007
|
+
return SZ_ERROR_ARCHIVE;
|
|
1008
|
+
p = data;
|
|
1009
|
+
do
|
|
1010
|
+
{
|
|
1011
|
+
if (p >= lim)
|
|
1012
|
+
return SZ_ERROR_ARCHIVE;
|
|
1013
|
+
for (; *(const UInt16 *)(const void *)p; p += 2);
|
|
1014
|
+
p += 2;
|
|
1015
|
+
*offsets++ = (size_t)(p - data) >> 1;
|
|
1016
|
+
}
|
|
1017
|
+
while (--numFiles);
|
|
1018
|
+
return (p == lim) ? SZ_OK : SZ_ERROR_ARCHIVE;
|
|
1019
|
+
}
|
|
1020
|
+
|
|
1021
|
+
|
|
1022
|
+
static SRes ReadTime(CSzBitUi64s *p, size_t num, CSzData *sd2,
|
|
1023
|
+
const CBuf *tempBufs, UInt32 numTempBufs, ISzAllocPtr alloc)
|
|
1024
|
+
{
|
|
1025
|
+
const Byte *data;
|
|
1026
|
+
size_t size;
|
|
1027
|
+
size_t i;
|
|
1028
|
+
CNtfsFileTime *vals;
|
|
1029
|
+
Byte *defs;
|
|
1030
|
+
Byte external;
|
|
1031
|
+
|
|
1032
|
+
if (p->Defs)
|
|
1033
|
+
return SZ_ERROR_ARCHIVE;
|
|
1034
|
+
RINOK(ReadBitVector(sd2, num, &p->Defs, alloc))
|
|
1035
|
+
|
|
1036
|
+
SZ_READ_BYTE_SD(sd2, external)
|
|
1037
|
+
if (external == 0)
|
|
1038
|
+
{
|
|
1039
|
+
data = sd2->Data;
|
|
1040
|
+
size = sd2->Size;
|
|
1041
|
+
}
|
|
1042
|
+
else
|
|
1043
|
+
{
|
|
1044
|
+
UInt32 index;
|
|
1045
|
+
RINOK(SzReadNumber32(sd2, &index))
|
|
1046
|
+
if (index >= numTempBufs || sd2->Size)
|
|
1047
|
+
return SZ_ERROR_ARCHIVE;
|
|
1048
|
+
data = tempBufs[index].data;
|
|
1049
|
+
size = tempBufs[index].size;
|
|
1050
|
+
}
|
|
1051
|
+
|
|
1052
|
+
MY_ALLOC_ZE(CNtfsFileTime, p->Vals, num, alloc)
|
|
1053
|
+
vals = p->Vals;
|
|
1054
|
+
defs = p->Defs;
|
|
1055
|
+
for (i = 0; i < num; i++)
|
|
1056
|
+
if (SzBitArray_Check(defs, i))
|
|
1057
|
+
{
|
|
1058
|
+
if (size < 8)
|
|
1059
|
+
return SZ_ERROR_ARCHIVE;
|
|
1060
|
+
size -= 8;
|
|
1061
|
+
vals[i].Low = GetUi32(data);
|
|
1062
|
+
vals[i].High = GetUi32(data + 4);
|
|
1063
|
+
data += 8;
|
|
1064
|
+
}
|
|
1065
|
+
else
|
|
1066
|
+
vals[i].High = vals[i].Low = 0;
|
|
1067
|
+
|
|
1068
|
+
if (size)
|
|
1069
|
+
return SZ_ERROR_ARCHIVE;
|
|
1070
|
+
return SZ_OK;
|
|
1071
|
+
}
|
|
1072
|
+
|
|
1073
|
+
|
|
1074
|
+
#define NUM_ADDITIONAL_STREAMS_MAX 8
|
|
1075
|
+
|
|
1076
|
+
|
|
1077
|
+
static SRes SzReadHeader2(CSzArEx *p, CSzData *sd, ILookInStreamPtr inStream,
|
|
1078
|
+
CBuf * const tempBufs, ISzAllocPtr allocMain, ISzAllocPtr allocTemp)
|
|
1079
|
+
{
|
|
1080
|
+
CSubStreamInfo ssi;
|
|
1081
|
+
UInt32 numTempBufs = 0;
|
|
1082
|
+
|
|
1083
|
+
{
|
|
1084
|
+
UInt64 type;
|
|
1085
|
+
|
|
1086
|
+
SzData_CLEAR(&ssi.sdSizes)
|
|
1087
|
+
SzData_CLEAR(&ssi.sdCRCs)
|
|
1088
|
+
SzData_CLEAR(&ssi.sdNumSubStreams)
|
|
1089
|
+
|
|
1090
|
+
ssi.NumSubDigests = 0;
|
|
1091
|
+
ssi.NumTotalSubStreams = 0;
|
|
1092
|
+
|
|
1093
|
+
RINOK(ReadID(sd, &type))
|
|
1094
|
+
|
|
1095
|
+
if (type == k7zIdArchiveProperties)
|
|
1096
|
+
{
|
|
1097
|
+
for (;;)
|
|
1098
|
+
{
|
|
1099
|
+
UInt64 type2;
|
|
1100
|
+
RINOK(ReadID(sd, &type2))
|
|
1101
|
+
if (type2 == k7zIdEnd)
|
|
1102
|
+
break;
|
|
1103
|
+
RINOK(SkipData(sd))
|
|
1104
|
+
}
|
|
1105
|
+
RINOK(ReadID(sd, &type))
|
|
1106
|
+
}
|
|
1107
|
+
|
|
1108
|
+
if (type == k7zIdAdditionalStreamsInfo)
|
|
1109
|
+
{
|
|
1110
|
+
CSzAr tempAr;
|
|
1111
|
+
SRes res;
|
|
1112
|
+
|
|
1113
|
+
SzAr_Init(&tempAr);
|
|
1114
|
+
tempAr.RangeLimit = p->db.RangeLimit;
|
|
1115
|
+
|
|
1116
|
+
res = SzReadAndDecodePackedStreams(inStream, sd, tempBufs, NUM_ADDITIONAL_STREAMS_MAX,
|
|
1117
|
+
p->startPosAfterHeader, &tempAr, allocTemp);
|
|
1118
|
+
numTempBufs = tempAr.NumFolders;
|
|
1119
|
+
SzAr_Free(&tempAr, allocTemp);
|
|
1120
|
+
|
|
1121
|
+
if (res != SZ_OK)
|
|
1122
|
+
return res;
|
|
1123
|
+
RINOK(ReadID(sd, &type))
|
|
1124
|
+
}
|
|
1125
|
+
|
|
1126
|
+
if (type == k7zIdMainStreamsInfo)
|
|
1127
|
+
{
|
|
1128
|
+
static const UInt32 k_numFoldersMax = (UInt32)1 << 30;
|
|
1129
|
+
RINOK(SzReadStreamsInfo(&p->db, sd, k_numFoldersMax, tempBufs, numTempBufs,
|
|
1130
|
+
&p->dataPos, &ssi, allocMain))
|
|
1131
|
+
p->dataPos += p->startPosAfterHeader;
|
|
1132
|
+
RINOK(ReadID(sd, &type))
|
|
1133
|
+
}
|
|
1134
|
+
|
|
1135
|
+
if (type == k7zIdEnd)
|
|
1136
|
+
return SZ_OK;
|
|
1137
|
+
if (type != k7zIdFilesInfo)
|
|
1138
|
+
return SZ_ERROR_ARCHIVE;
|
|
1139
|
+
}
|
|
1140
|
+
|
|
1141
|
+
{
|
|
1142
|
+
UInt32 numFiles, numEmptyStreams = 0;
|
|
1143
|
+
const Byte *emptyStreams = NULL;
|
|
1144
|
+
const Byte *emptyFiles = NULL;
|
|
1145
|
+
|
|
1146
|
+
RINOK(SzReadNumber32(sd, &numFiles))
|
|
1147
|
+
p->NumFiles = numFiles;
|
|
1148
|
+
|
|
1149
|
+
for (;;)
|
|
1150
|
+
{
|
|
1151
|
+
CSzData sdSwitch;
|
|
1152
|
+
UInt64 type;
|
|
1153
|
+
RINOK(ReadID(sd, &type))
|
|
1154
|
+
if (type == k7zIdEnd)
|
|
1155
|
+
break;
|
|
1156
|
+
{
|
|
1157
|
+
UInt64 size;
|
|
1158
|
+
RINOK(ReadNumber(sd, &size))
|
|
1159
|
+
if (size > sd->Size)
|
|
1160
|
+
return SZ_ERROR_ARCHIVE;
|
|
1161
|
+
sdSwitch.Data = sd->Data;
|
|
1162
|
+
sdSwitch.Size = (size_t)size;
|
|
1163
|
+
SKIP_DATA(sd, size)
|
|
1164
|
+
}
|
|
1165
|
+
if (type >= 64)
|
|
1166
|
+
continue;
|
|
1167
|
+
|
|
1168
|
+
switch ((unsigned)type)
|
|
1169
|
+
{
|
|
1170
|
+
case k7zIdEmptyStream:
|
|
1171
|
+
{
|
|
1172
|
+
if (emptyStreams || emptyFiles)
|
|
1173
|
+
return SZ_ERROR_ARCHIVE;
|
|
1174
|
+
if ((numFiles + 7) >> 3 != sdSwitch.Size)
|
|
1175
|
+
return SZ_ERROR_ARCHIVE;
|
|
1176
|
+
emptyStreams = sdSwitch.Data;
|
|
1177
|
+
numEmptyStreams = CountDefinedBits(emptyStreams, numFiles);
|
|
1178
|
+
break;
|
|
1179
|
+
}
|
|
1180
|
+
|
|
1181
|
+
case k7zIdEmptyFile:
|
|
1182
|
+
{
|
|
1183
|
+
if (emptyFiles)
|
|
1184
|
+
return SZ_ERROR_ARCHIVE;
|
|
1185
|
+
if ((numEmptyStreams + 7) >> 3 != sdSwitch.Size)
|
|
1186
|
+
return SZ_ERROR_ARCHIVE;
|
|
1187
|
+
emptyFiles = sdSwitch.Data;
|
|
1188
|
+
break;
|
|
1189
|
+
}
|
|
1190
|
+
|
|
1191
|
+
case k7zIdName:
|
|
1192
|
+
{
|
|
1193
|
+
size_t namesSize;
|
|
1194
|
+
const Byte *namesData;
|
|
1195
|
+
Byte external;
|
|
1196
|
+
if (p->FileNameOffsets)
|
|
1197
|
+
return SZ_ERROR_ARCHIVE;
|
|
1198
|
+
SZ_READ_BYTE_SD(&sdSwitch, external)
|
|
1199
|
+
if (external == 0)
|
|
1200
|
+
{
|
|
1201
|
+
namesData = sdSwitch.Data;
|
|
1202
|
+
namesSize = sdSwitch.Size;
|
|
1203
|
+
}
|
|
1204
|
+
else
|
|
1205
|
+
{
|
|
1206
|
+
UInt32 index;
|
|
1207
|
+
RINOK(SzReadNumber32(&sdSwitch, &index))
|
|
1208
|
+
if (index >= numTempBufs || sdSwitch.Size)
|
|
1209
|
+
return SZ_ERROR_ARCHIVE;
|
|
1210
|
+
namesData = tempBufs[index].data;
|
|
1211
|
+
namesSize = tempBufs[index].size;
|
|
1212
|
+
}
|
|
1213
|
+
if (namesSize & 1)
|
|
1214
|
+
return SZ_ERROR_ARCHIVE;
|
|
1215
|
+
MY_ALLOC(size_t, p->FileNameOffsets, numFiles + 1, allocMain)
|
|
1216
|
+
MY_ALLOC_ZE_AND_CPY(p->FileNames, namesSize, namesData, allocMain)
|
|
1217
|
+
RINOK(SzReadFileNames(p->FileNames, namesSize, numFiles, p->FileNameOffsets))
|
|
1218
|
+
break;
|
|
1219
|
+
}
|
|
1220
|
+
|
|
1221
|
+
case k7zIdWinAttrib:
|
|
1222
|
+
{
|
|
1223
|
+
Byte external;
|
|
1224
|
+
if (p->Attribs.Defs)
|
|
1225
|
+
return SZ_ERROR_ARCHIVE;
|
|
1226
|
+
RINOK(ReadBitVector(&sdSwitch, numFiles, &p->Attribs.Defs, allocMain))
|
|
1227
|
+
SZ_READ_BYTE_SD(&sdSwitch, external)
|
|
1228
|
+
if (external)
|
|
1229
|
+
{
|
|
1230
|
+
UInt32 index;
|
|
1231
|
+
RINOK(SzReadNumber32(&sdSwitch, &index))
|
|
1232
|
+
if (index >= numTempBufs || sdSwitch.Size)
|
|
1233
|
+
return SZ_ERROR_ARCHIVE;
|
|
1234
|
+
sdSwitch.Data = tempBufs[index].data;
|
|
1235
|
+
sdSwitch.Size = tempBufs[index].size;
|
|
1236
|
+
}
|
|
1237
|
+
RINOK(ReadUi32s(&sdSwitch, numFiles, &p->Attribs, allocMain))
|
|
1238
|
+
if (sdSwitch.Size)
|
|
1239
|
+
return SZ_ERROR_ARCHIVE;
|
|
1240
|
+
break;
|
|
1241
|
+
}
|
|
1242
|
+
|
|
1243
|
+
case k7zIdMTime:
|
|
1244
|
+
case k7zIdCTime:
|
|
1245
|
+
{
|
|
1246
|
+
RINOK(ReadTime((unsigned)type == k7zIdMTime ? &p->MTime: &p->CTime,
|
|
1247
|
+
numFiles, &sdSwitch, tempBufs, numTempBufs, allocMain))
|
|
1248
|
+
break;
|
|
1249
|
+
}
|
|
1250
|
+
|
|
1251
|
+
default: break;
|
|
1252
|
+
}
|
|
1253
|
+
}
|
|
1254
|
+
|
|
1255
|
+
if (numFiles - numEmptyStreams != ssi.NumTotalSubStreams)
|
|
1256
|
+
return SZ_ERROR_ARCHIVE;
|
|
1257
|
+
|
|
1258
|
+
for (;;)
|
|
1259
|
+
{
|
|
1260
|
+
UInt64 type;
|
|
1261
|
+
RINOK(ReadID(sd, &type))
|
|
1262
|
+
if (type == k7zIdEnd)
|
|
1263
|
+
break;
|
|
1264
|
+
RINOK(SkipData(sd))
|
|
1265
|
+
}
|
|
1266
|
+
|
|
1267
|
+
{
|
|
1268
|
+
UInt32 i;
|
|
1269
|
+
UInt32 emptyFileIndex = 0;
|
|
1270
|
+
UInt32 folderIndex = 0;
|
|
1271
|
+
UInt32 remSubStreams = 0;
|
|
1272
|
+
UInt32 numSubStreams = 0;
|
|
1273
|
+
UInt64 unpackPos = 0;
|
|
1274
|
+
const Byte *digestsDefs = NULL;
|
|
1275
|
+
const Byte *digestsVals = NULL;
|
|
1276
|
+
UInt32 digestIndex = 0;
|
|
1277
|
+
Byte isDirMask = 0;
|
|
1278
|
+
Byte crcMask = 0;
|
|
1279
|
+
Byte mask = 0x80;
|
|
1280
|
+
|
|
1281
|
+
MY_ALLOC(UInt32, p->FolderToFile, p->db.NumFolders + 1, allocMain)
|
|
1282
|
+
MY_ALLOC_ZE(UInt32, p->FileToFolder, p->NumFiles, allocMain)
|
|
1283
|
+
MY_ALLOC(UInt64, p->UnpackPositions, p->NumFiles + 1, allocMain)
|
|
1284
|
+
MY_ALLOC_ZE(Byte, p->IsDirs, (p->NumFiles + 7) >> 3, allocMain)
|
|
1285
|
+
|
|
1286
|
+
RINOK(SzBitUi32s_Alloc(&p->CRCs, p->NumFiles, allocMain))
|
|
1287
|
+
|
|
1288
|
+
if (ssi.sdCRCs.Size != 0)
|
|
1289
|
+
{
|
|
1290
|
+
Byte allDigestsDefined = 0;
|
|
1291
|
+
SZ_READ_BYTE_SD_NOCHECK(&ssi.sdCRCs, allDigestsDefined)
|
|
1292
|
+
if (allDigestsDefined)
|
|
1293
|
+
digestsVals = ssi.sdCRCs.Data;
|
|
1294
|
+
else
|
|
1295
|
+
{
|
|
1296
|
+
const size_t numBytes = (ssi.NumSubDigests + 7) >> 3;
|
|
1297
|
+
digestsDefs = ssi.sdCRCs.Data;
|
|
1298
|
+
digestsVals = digestsDefs + numBytes;
|
|
1299
|
+
}
|
|
1300
|
+
}
|
|
1301
|
+
|
|
1302
|
+
for (i = 0; i < numFiles; i++, mask >>= 1)
|
|
1303
|
+
{
|
|
1304
|
+
if (mask == 0)
|
|
1305
|
+
{
|
|
1306
|
+
const UInt32 byteIndex = (i - 1) >> 3;
|
|
1307
|
+
p->IsDirs[byteIndex] = isDirMask;
|
|
1308
|
+
p->CRCs.Defs[byteIndex] = crcMask;
|
|
1309
|
+
isDirMask = 0;
|
|
1310
|
+
crcMask = 0;
|
|
1311
|
+
mask = 0x80;
|
|
1312
|
+
}
|
|
1313
|
+
|
|
1314
|
+
p->UnpackPositions[i] = unpackPos;
|
|
1315
|
+
p->CRCs.Vals[i] = 0;
|
|
1316
|
+
|
|
1317
|
+
if (emptyStreams && SzBitArray_Check(emptyStreams, i))
|
|
1318
|
+
{
|
|
1319
|
+
if (emptyFiles)
|
|
1320
|
+
{
|
|
1321
|
+
if (!SzBitArray_Check(emptyFiles, emptyFileIndex))
|
|
1322
|
+
isDirMask |= mask;
|
|
1323
|
+
emptyFileIndex++;
|
|
1324
|
+
}
|
|
1325
|
+
else
|
|
1326
|
+
isDirMask |= mask;
|
|
1327
|
+
if (remSubStreams == 0)
|
|
1328
|
+
{
|
|
1329
|
+
p->FileToFolder[i] = (UInt32)-1;
|
|
1330
|
+
continue;
|
|
1331
|
+
}
|
|
1332
|
+
}
|
|
1333
|
+
|
|
1334
|
+
if (remSubStreams == 0)
|
|
1335
|
+
{
|
|
1336
|
+
for (;;)
|
|
1337
|
+
{
|
|
1338
|
+
if (folderIndex >= p->db.NumFolders)
|
|
1339
|
+
return SZ_ERROR_ARCHIVE;
|
|
1340
|
+
p->FolderToFile[folderIndex] = i;
|
|
1341
|
+
numSubStreams = 1;
|
|
1342
|
+
if (ssi.sdNumSubStreams.Data)
|
|
1343
|
+
{
|
|
1344
|
+
RINOK(SzReadNumber32(&ssi.sdNumSubStreams, &numSubStreams))
|
|
1345
|
+
}
|
|
1346
|
+
remSubStreams = numSubStreams;
|
|
1347
|
+
if (numSubStreams != 0)
|
|
1348
|
+
break;
|
|
1349
|
+
{
|
|
1350
|
+
const UInt64 folderUnpackSize = SzAr_GetFolderUnpackSize(&p->db, folderIndex);
|
|
1351
|
+
unpackPos += folderUnpackSize;
|
|
1352
|
+
if (unpackPos < folderUnpackSize)
|
|
1353
|
+
return SZ_ERROR_ARCHIVE;
|
|
1354
|
+
}
|
|
1355
|
+
folderIndex++;
|
|
1356
|
+
}
|
|
1357
|
+
}
|
|
1358
|
+
|
|
1359
|
+
p->FileToFolder[i] = folderIndex;
|
|
1360
|
+
|
|
1361
|
+
if (emptyStreams && SzBitArray_Check(emptyStreams, i))
|
|
1362
|
+
continue;
|
|
1363
|
+
|
|
1364
|
+
if (--remSubStreams == 0)
|
|
1365
|
+
{
|
|
1366
|
+
const UInt64 folderUnpackSize = SzAr_GetFolderUnpackSize(&p->db, folderIndex);
|
|
1367
|
+
const UInt64 startFolderUnpackPos = p->UnpackPositions[p->FolderToFile[folderIndex]];
|
|
1368
|
+
if (folderUnpackSize < unpackPos - startFolderUnpackPos)
|
|
1369
|
+
return SZ_ERROR_ARCHIVE;
|
|
1370
|
+
unpackPos = startFolderUnpackPos + folderUnpackSize;
|
|
1371
|
+
if (unpackPos < folderUnpackSize)
|
|
1372
|
+
return SZ_ERROR_ARCHIVE;
|
|
1373
|
+
|
|
1374
|
+
if (numSubStreams == 1 && SzBitWithVals_Check(&p->db.FolderCRCs, folderIndex))
|
|
1375
|
+
{
|
|
1376
|
+
p->CRCs.Vals[i] = p->db.FolderCRCs.Vals[folderIndex];
|
|
1377
|
+
crcMask |= mask;
|
|
1378
|
+
}
|
|
1379
|
+
folderIndex++;
|
|
1380
|
+
}
|
|
1381
|
+
else
|
|
1382
|
+
{
|
|
1383
|
+
UInt64 v;
|
|
1384
|
+
RINOK(ReadNumber(&ssi.sdSizes, &v))
|
|
1385
|
+
unpackPos += v;
|
|
1386
|
+
if (unpackPos < v)
|
|
1387
|
+
return SZ_ERROR_ARCHIVE;
|
|
1388
|
+
}
|
|
1389
|
+
if ((crcMask & mask) == 0 && digestsVals)
|
|
1390
|
+
{
|
|
1391
|
+
if (!digestsDefs || SzBitArray_Check(digestsDefs, digestIndex))
|
|
1392
|
+
{
|
|
1393
|
+
p->CRCs.Vals[i] = GetUi32(digestsVals);
|
|
1394
|
+
digestsVals += 4;
|
|
1395
|
+
crcMask |= mask;
|
|
1396
|
+
}
|
|
1397
|
+
digestIndex++;
|
|
1398
|
+
}
|
|
1399
|
+
}
|
|
1400
|
+
|
|
1401
|
+
if (mask != 0x80)
|
|
1402
|
+
{
|
|
1403
|
+
const UInt32 byteIndex = (i - 1) >> 3;
|
|
1404
|
+
p->IsDirs[byteIndex] = isDirMask;
|
|
1405
|
+
p->CRCs.Defs[byteIndex] = crcMask;
|
|
1406
|
+
}
|
|
1407
|
+
|
|
1408
|
+
p->UnpackPositions[i] = unpackPos;
|
|
1409
|
+
|
|
1410
|
+
if (remSubStreams != 0)
|
|
1411
|
+
return SZ_ERROR_ARCHIVE;
|
|
1412
|
+
|
|
1413
|
+
for (;;)
|
|
1414
|
+
{
|
|
1415
|
+
p->FolderToFile[folderIndex] = i;
|
|
1416
|
+
if (folderIndex >= p->db.NumFolders)
|
|
1417
|
+
break;
|
|
1418
|
+
if (!ssi.sdNumSubStreams.Data)
|
|
1419
|
+
return SZ_ERROR_ARCHIVE;
|
|
1420
|
+
RINOK(SzReadNumber32(&ssi.sdNumSubStreams, &numSubStreams))
|
|
1421
|
+
if (numSubStreams != 0)
|
|
1422
|
+
return SZ_ERROR_ARCHIVE;
|
|
1423
|
+
/*
|
|
1424
|
+
{
|
|
1425
|
+
UInt64 folderUnpackSize = SzAr_GetFolderUnpackSize(&p->db, folderIndex);
|
|
1426
|
+
unpackPos += folderUnpackSize;
|
|
1427
|
+
if (unpackPos < folderUnpackSize)
|
|
1428
|
+
return SZ_ERROR_ARCHIVE;
|
|
1429
|
+
}
|
|
1430
|
+
*/
|
|
1431
|
+
folderIndex++;
|
|
1432
|
+
}
|
|
1433
|
+
|
|
1434
|
+
if (ssi.sdNumSubStreams.Data && ssi.sdNumSubStreams.Size != 0)
|
|
1435
|
+
return SZ_ERROR_ARCHIVE;
|
|
1436
|
+
}
|
|
1437
|
+
}
|
|
1438
|
+
return SZ_OK;
|
|
1439
|
+
}
|
|
1440
|
+
|
|
1441
|
+
|
|
1442
|
+
static SRes SzReadHeader(
|
|
1443
|
+
CSzArEx *p,
|
|
1444
|
+
CSzData *sd,
|
|
1445
|
+
ILookInStreamPtr inStream,
|
|
1446
|
+
ISzAllocPtr allocMain,
|
|
1447
|
+
ISzAllocPtr allocTemp)
|
|
1448
|
+
{
|
|
1449
|
+
UInt32 i;
|
|
1450
|
+
SRes res;
|
|
1451
|
+
CBuf tempBufs[NUM_ADDITIONAL_STREAMS_MAX];
|
|
1452
|
+
|
|
1453
|
+
for (i = 0; i < NUM_ADDITIONAL_STREAMS_MAX; i++)
|
|
1454
|
+
Buf_Init(tempBufs + i);
|
|
1455
|
+
|
|
1456
|
+
res = SzReadHeader2(p, sd, inStream, tempBufs, allocMain, allocTemp);
|
|
1457
|
+
|
|
1458
|
+
for (i = 0; i < NUM_ADDITIONAL_STREAMS_MAX; i++)
|
|
1459
|
+
Buf_Free(tempBufs + i, allocTemp);
|
|
1460
|
+
|
|
1461
|
+
if (res == SZ_OK && sd->Size != 0)
|
|
1462
|
+
return SZ_ERROR_ARCHIVE;
|
|
1463
|
+
return res;
|
|
1464
|
+
}
|
|
1465
|
+
|
|
1466
|
+
static SRes SzArEx_Open2(
|
|
1467
|
+
CSzArEx *p,
|
|
1468
|
+
ILookInStreamPtr inStream,
|
|
1469
|
+
ISzAllocPtr allocMain,
|
|
1470
|
+
ISzAllocPtr allocTemp)
|
|
1471
|
+
{
|
|
1472
|
+
Byte header[k7zStartHeaderSize];
|
|
1473
|
+
Int64 startPosAfterHeader;
|
|
1474
|
+
UInt64 nextHeaderOffset, nextHeaderSize;
|
|
1475
|
+
size_t nextHeaderSizeT;
|
|
1476
|
+
UInt32 nextHeaderCRC;
|
|
1477
|
+
CBuf buf;
|
|
1478
|
+
SRes res;
|
|
1479
|
+
|
|
1480
|
+
RINOK(LookInStream_Read2(inStream, header, k7zStartHeaderSize, SZ_ERROR_NO_ARCHIVE))
|
|
1481
|
+
startPosAfterHeader = 0; // k7zStartHeaderSize
|
|
1482
|
+
RINOK(ILookInStream_Seek(inStream, &startPosAfterHeader, SZ_SEEK_CUR))
|
|
1483
|
+
p->startPosAfterHeader = (UInt64)startPosAfterHeader;
|
|
1484
|
+
{
|
|
1485
|
+
unsigned i;
|
|
1486
|
+
for (i = 0; i < k7zSignatureSize; i++)
|
|
1487
|
+
if (header[i] != k7zSignature[i])
|
|
1488
|
+
return SZ_ERROR_NO_ARCHIVE;
|
|
1489
|
+
if (header[6] != 0) // k7zMajorVersion
|
|
1490
|
+
return SZ_ERROR_UNSUPPORTED;
|
|
1491
|
+
}
|
|
1492
|
+
if (CrcCalc(header + 12, 20) != GetUi32(header + 8))
|
|
1493
|
+
return SZ_ERROR_CRC;
|
|
1494
|
+
|
|
1495
|
+
nextHeaderOffset = GetUi64(header + 12);
|
|
1496
|
+
nextHeaderSize = GetUi64(header + 20);
|
|
1497
|
+
nextHeaderCRC = GetUi32(header + 28);
|
|
1498
|
+
|
|
1499
|
+
p->db.RangeLimit = nextHeaderOffset;
|
|
1500
|
+
if (nextHeaderOffset >= (UInt64)1 << 62 ||
|
|
1501
|
+
nextHeaderSize >= (UInt64)1 << 48)
|
|
1502
|
+
return SZ_ERROR_NO_ARCHIVE;
|
|
1503
|
+
nextHeaderSizeT = (size_t)nextHeaderSize;
|
|
1504
|
+
if (nextHeaderSizeT != nextHeaderSize)
|
|
1505
|
+
return SZ_ERROR_MEM;
|
|
1506
|
+
if (nextHeaderSizeT == 0)
|
|
1507
|
+
{
|
|
1508
|
+
if (nextHeaderOffset != 0 || nextHeaderCRC != 0)
|
|
1509
|
+
return SZ_ERROR_NO_ARCHIVE;
|
|
1510
|
+
return SZ_OK;
|
|
1511
|
+
}
|
|
1512
|
+
{
|
|
1513
|
+
Int64 pos = 0;
|
|
1514
|
+
RINOK(ILookInStream_Seek(inStream, &pos, SZ_SEEK_END))
|
|
1515
|
+
if ((UInt64)(pos - startPosAfterHeader) < nextHeaderOffset + nextHeaderSize)
|
|
1516
|
+
return SZ_ERROR_INPUT_EOF;
|
|
1517
|
+
}
|
|
1518
|
+
RINOK(LookInStream_SeekTo(inStream, (UInt64)startPosAfterHeader + nextHeaderOffset))
|
|
1519
|
+
|
|
1520
|
+
if (!Buf_Create(&buf, nextHeaderSizeT, allocTemp))
|
|
1521
|
+
return SZ_ERROR_MEM;
|
|
1522
|
+
|
|
1523
|
+
res = LookInStream_Read(inStream, buf.data, nextHeaderSizeT);
|
|
1524
|
+
|
|
1525
|
+
if (res == SZ_OK)
|
|
1526
|
+
{
|
|
1527
|
+
res = SZ_ERROR_ARCHIVE;
|
|
1528
|
+
if (CrcCalc(buf.data, nextHeaderSizeT) == nextHeaderCRC)
|
|
1529
|
+
{
|
|
1530
|
+
CSzData sd;
|
|
1531
|
+
UInt64 type;
|
|
1532
|
+
sd.Data = buf.data;
|
|
1533
|
+
sd.Size = buf.size;
|
|
1534
|
+
|
|
1535
|
+
res = ReadID(&sd, &type);
|
|
1536
|
+
|
|
1537
|
+
if (res == SZ_OK && type == k7zIdEncodedHeader)
|
|
1538
|
+
{
|
|
1539
|
+
CSzAr tempAr;
|
|
1540
|
+
CBuf tempBuf;
|
|
1541
|
+
Buf_Init(&tempBuf);
|
|
1542
|
+
|
|
1543
|
+
SzAr_Init(&tempAr);
|
|
1544
|
+
tempAr.RangeLimit = p->db.RangeLimit;
|
|
1545
|
+
|
|
1546
|
+
res = SzReadAndDecodePackedStreams(inStream, &sd, &tempBuf, 1, p->startPosAfterHeader, &tempAr, allocTemp);
|
|
1547
|
+
SzAr_Free(&tempAr, allocTemp);
|
|
1548
|
+
|
|
1549
|
+
if (res != SZ_OK)
|
|
1550
|
+
{
|
|
1551
|
+
Buf_Free(&tempBuf, allocTemp);
|
|
1552
|
+
}
|
|
1553
|
+
else
|
|
1554
|
+
{
|
|
1555
|
+
Buf_Free(&buf, allocTemp);
|
|
1556
|
+
buf.data = tempBuf.data;
|
|
1557
|
+
buf.size = tempBuf.size;
|
|
1558
|
+
sd.Data = buf.data;
|
|
1559
|
+
sd.Size = buf.size;
|
|
1560
|
+
res = ReadID(&sd, &type);
|
|
1561
|
+
}
|
|
1562
|
+
}
|
|
1563
|
+
|
|
1564
|
+
if (res == SZ_OK)
|
|
1565
|
+
{
|
|
1566
|
+
if (type == k7zIdHeader)
|
|
1567
|
+
{
|
|
1568
|
+
/*
|
|
1569
|
+
CSzData sd2;
|
|
1570
|
+
unsigned ttt;
|
|
1571
|
+
for (ttt = 0; ttt < 40000; ttt++)
|
|
1572
|
+
{
|
|
1573
|
+
SzArEx_Free(p, allocMain);
|
|
1574
|
+
sd2 = sd;
|
|
1575
|
+
res = SzReadHeader(p, &sd2, inStream, allocMain, allocTemp);
|
|
1576
|
+
if (res != SZ_OK)
|
|
1577
|
+
break;
|
|
1578
|
+
}
|
|
1579
|
+
*/
|
|
1580
|
+
res = SzReadHeader(p, &sd, inStream, allocMain, allocTemp);
|
|
1581
|
+
}
|
|
1582
|
+
else
|
|
1583
|
+
res = SZ_ERROR_UNSUPPORTED;
|
|
1584
|
+
}
|
|
1585
|
+
}
|
|
1586
|
+
}
|
|
1587
|
+
|
|
1588
|
+
Buf_Free(&buf, allocTemp);
|
|
1589
|
+
return res;
|
|
1590
|
+
}
|
|
1591
|
+
|
|
1592
|
+
|
|
1593
|
+
SRes SzArEx_Open(CSzArEx *p, ILookInStreamPtr inStream,
|
|
1594
|
+
ISzAllocPtr allocMain, ISzAllocPtr allocTemp)
|
|
1595
|
+
{
|
|
1596
|
+
const SRes res = SzArEx_Open2(p, inStream, allocMain, allocTemp);
|
|
1597
|
+
if (res != SZ_OK)
|
|
1598
|
+
SzArEx_Free(p, allocMain);
|
|
1599
|
+
return res;
|
|
1600
|
+
}
|
|
1601
|
+
|
|
1602
|
+
|
|
1603
|
+
SRes SzArEx_Extract(
|
|
1604
|
+
const CSzArEx *p,
|
|
1605
|
+
ILookInStreamPtr inStream,
|
|
1606
|
+
UInt32 fileIndex,
|
|
1607
|
+
UInt32 *blockIndex,
|
|
1608
|
+
Byte **tempBuf,
|
|
1609
|
+
size_t *outBufferSize,
|
|
1610
|
+
size_t *offset,
|
|
1611
|
+
size_t *outSizeProcessed,
|
|
1612
|
+
ISzAllocPtr allocMain,
|
|
1613
|
+
ISzAllocPtr allocTemp)
|
|
1614
|
+
{
|
|
1615
|
+
const UInt32 folderIndex = p->FileToFolder[fileIndex];
|
|
1616
|
+
SRes res = SZ_OK;
|
|
1617
|
+
|
|
1618
|
+
*offset = 0;
|
|
1619
|
+
*outSizeProcessed = 0;
|
|
1620
|
+
|
|
1621
|
+
if (folderIndex == (UInt32)-1)
|
|
1622
|
+
{
|
|
1623
|
+
ISzAlloc_Free(allocMain, *tempBuf);
|
|
1624
|
+
*blockIndex = folderIndex;
|
|
1625
|
+
*tempBuf = NULL;
|
|
1626
|
+
*outBufferSize = 0;
|
|
1627
|
+
return SZ_OK;
|
|
1628
|
+
}
|
|
1629
|
+
|
|
1630
|
+
if (*tempBuf == NULL || *blockIndex != folderIndex)
|
|
1631
|
+
{
|
|
1632
|
+
const UInt64 unpackSizeSpec = SzAr_GetFolderUnpackSize(&p->db, folderIndex);
|
|
1633
|
+
/*
|
|
1634
|
+
UInt64 unpackSizeSpec =
|
|
1635
|
+
p->UnpackPositions[p->FolderToFile[(size_t)folderIndex + 1]] -
|
|
1636
|
+
p->UnpackPositions[p->FolderToFile[folderIndex]];
|
|
1637
|
+
*/
|
|
1638
|
+
const size_t unpackSize = (size_t)unpackSizeSpec;
|
|
1639
|
+
|
|
1640
|
+
if (unpackSize != unpackSizeSpec)
|
|
1641
|
+
return SZ_ERROR_MEM;
|
|
1642
|
+
*blockIndex = folderIndex;
|
|
1643
|
+
ISzAlloc_Free(allocMain, *tempBuf);
|
|
1644
|
+
*tempBuf = NULL;
|
|
1645
|
+
|
|
1646
|
+
if (res == SZ_OK)
|
|
1647
|
+
{
|
|
1648
|
+
*outBufferSize = unpackSize;
|
|
1649
|
+
if (unpackSize != 0)
|
|
1650
|
+
{
|
|
1651
|
+
*tempBuf = (Byte *)ISzAlloc_Alloc(allocMain, unpackSize);
|
|
1652
|
+
if (*tempBuf == NULL)
|
|
1653
|
+
res = SZ_ERROR_MEM;
|
|
1654
|
+
}
|
|
1655
|
+
|
|
1656
|
+
if (res == SZ_OK)
|
|
1657
|
+
{
|
|
1658
|
+
res = SzAr_DecodeFolder(&p->db, folderIndex,
|
|
1659
|
+
inStream, p->dataPos, *tempBuf, unpackSize, allocTemp);
|
|
1660
|
+
}
|
|
1661
|
+
}
|
|
1662
|
+
}
|
|
1663
|
+
|
|
1664
|
+
if (res == SZ_OK)
|
|
1665
|
+
{
|
|
1666
|
+
const UInt64 unpackPos = p->UnpackPositions[fileIndex];
|
|
1667
|
+
*offset = (size_t)(unpackPos - p->UnpackPositions[p->FolderToFile[folderIndex]]);
|
|
1668
|
+
*outSizeProcessed = (size_t)(p->UnpackPositions[(size_t)fileIndex + 1] - unpackPos);
|
|
1669
|
+
if (*offset + *outSizeProcessed > *outBufferSize)
|
|
1670
|
+
return SZ_ERROR_FAIL;
|
|
1671
|
+
if (SzBitWithVals_Check(&p->CRCs, fileIndex))
|
|
1672
|
+
if (CrcCalc(*tempBuf + *offset, *outSizeProcessed) != p->CRCs.Vals[fileIndex])
|
|
1673
|
+
res = SZ_ERROR_CRC;
|
|
1674
|
+
}
|
|
1675
|
+
|
|
1676
|
+
return res;
|
|
1677
|
+
}
|
|
1678
|
+
|
|
1679
|
+
|
|
1680
|
+
size_t SzArEx_GetFileNameUtf16(const CSzArEx *p, size_t fileIndex, UInt16 *dest)
|
|
1681
|
+
{
|
|
1682
|
+
const size_t * const offsets = p->FileNameOffsets;
|
|
1683
|
+
if (!offsets)
|
|
1684
|
+
{
|
|
1685
|
+
if (dest)
|
|
1686
|
+
*dest = 0;
|
|
1687
|
+
return 1;
|
|
1688
|
+
}
|
|
1689
|
+
{
|
|
1690
|
+
const size_t offs = offsets[fileIndex];
|
|
1691
|
+
const size_t len = offsets[fileIndex + 1] - offs;
|
|
1692
|
+
if (dest)
|
|
1693
|
+
{
|
|
1694
|
+
size_t i;
|
|
1695
|
+
const Byte *src = p->FileNames + offs * 2;
|
|
1696
|
+
for (i = 0; i < len; i++)
|
|
1697
|
+
dest[i] = GetUi16a(src + i * 2);
|
|
1698
|
+
}
|
|
1699
|
+
return len;
|
|
1700
|
+
}
|
|
1701
|
+
}
|