7zip-native 0.0.0-stage → 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +103 -2
- package/THIRD_PARTY_NOTICES.md +23 -0
- package/bench/args.mts +69 -0
- package/bench/benchmark.mts +102 -0
- package/bench/compare.mts +546 -0
- package/bench/concurrency.mts +196 -0
- package/binding.gyp +51 -0
- package/dist/index.cjs +433 -0
- package/dist/index.d.cts +59 -0
- package/dist/index.d.mts +59 -0
- package/dist/index.d.ts +59 -0
- package/dist/index.mjs +429 -0
- package/docs/architecture.md +112 -0
- package/examples/basic.mts +19 -0
- package/native/addon.cpp +2154 -0
- package/package.json +85 -5
- package/prebuilds/linux-x64/7z.so +0 -0
- package/prebuilds/linux-x64/7zip_native.node +0 -0
- package/vendor/7zip/.gitattributes +2 -0
- package/vendor/7zip/Asm/arm/7zCrcOpt.asm +100 -0
- package/vendor/7zip/Asm/arm64/7zAsm.S +187 -0
- package/vendor/7zip/Asm/arm64/LzmaDecOpt.S +1487 -0
- package/vendor/7zip/Asm/x86/7zAsm.asm +341 -0
- package/vendor/7zip/Asm/x86/7zCrcOpt.asm +258 -0
- package/vendor/7zip/Asm/x86/AesOpt.asm +742 -0
- package/vendor/7zip/Asm/x86/LzFindOpt.asm +540 -0
- package/vendor/7zip/Asm/x86/LzmaDecOpt.asm +1339 -0
- package/vendor/7zip/Asm/x86/Sha1Opt.asm +263 -0
- package/vendor/7zip/Asm/x86/Sha256Opt.asm +275 -0
- package/vendor/7zip/Asm/x86/Sort.asm +860 -0
- package/vendor/7zip/Asm/x86/XzCrc64Opt.asm +523 -0
- package/vendor/7zip/C/7z.h +204 -0
- package/vendor/7zip/C/7zAlloc.c +89 -0
- package/vendor/7zip/C/7zAlloc.h +19 -0
- package/vendor/7zip/C/7zArcIn.c +1701 -0
- package/vendor/7zip/C/7zBuf.c +36 -0
- package/vendor/7zip/C/7zBuf.h +35 -0
- package/vendor/7zip/C/7zBuf2.c +52 -0
- package/vendor/7zip/C/7zCrc.c +420 -0
- package/vendor/7zip/C/7zCrc.h +28 -0
- package/vendor/7zip/C/7zCrcOpt.c +199 -0
- package/vendor/7zip/C/7zDec.c +672 -0
- package/vendor/7zip/C/7zFile.c +443 -0
- package/vendor/7zip/C/7zFile.h +91 -0
- package/vendor/7zip/C/7zStream.c +199 -0
- package/vendor/7zip/C/7zTypes.h +600 -0
- package/vendor/7zip/C/7zVersion.h +27 -0
- package/vendor/7zip/C/7zVersion.rc +55 -0
- package/vendor/7zip/C/7zWindows.h +107 -0
- package/vendor/7zip/C/7zip_gcc_c.mak +366 -0
- package/vendor/7zip/C/Aes.c +429 -0
- package/vendor/7zip/C/Aes.h +60 -0
- package/vendor/7zip/C/AesOpt.c +1002 -0
- package/vendor/7zip/C/Alloc.c +774 -0
- package/vendor/7zip/C/Alloc.h +76 -0
- package/vendor/7zip/C/Asm_c.mak +12 -0
- package/vendor/7zip/C/Bcj2.c +290 -0
- package/vendor/7zip/C/Bcj2.h +332 -0
- package/vendor/7zip/C/Bcj2Enc.c +509 -0
- package/vendor/7zip/C/Blake2.h +105 -0
- package/vendor/7zip/C/Blake2s.c +2672 -0
- package/vendor/7zip/C/Bra.c +709 -0
- package/vendor/7zip/C/Bra.h +105 -0
- package/vendor/7zip/C/Bra86.c +187 -0
- package/vendor/7zip/C/BraIA64.c +14 -0
- package/vendor/7zip/C/BwtSort.c +630 -0
- package/vendor/7zip/C/BwtSort.h +27 -0
- package/vendor/7zip/C/Compiler.h +287 -0
- package/vendor/7zip/C/CpuArch.c +970 -0
- package/vendor/7zip/C/CpuArch.h +719 -0
- package/vendor/7zip/C/Delta.c +169 -0
- package/vendor/7zip/C/Delta.h +19 -0
- package/vendor/7zip/C/DllSecur.c +99 -0
- package/vendor/7zip/C/DllSecur.h +20 -0
- package/vendor/7zip/C/HuffEnc.c +361 -0
- package/vendor/7zip/C/HuffEnc.h +23 -0
- package/vendor/7zip/C/LzFind.c +1746 -0
- package/vendor/7zip/C/LzFind.h +160 -0
- package/vendor/7zip/C/LzFindMt.c +1422 -0
- package/vendor/7zip/C/LzFindMt.h +114 -0
- package/vendor/7zip/C/LzFindOpt.c +578 -0
- package/vendor/7zip/C/LzHash.h +34 -0
- package/vendor/7zip/C/Lzma2Dec.c +493 -0
- package/vendor/7zip/C/Lzma2Dec.h +121 -0
- package/vendor/7zip/C/Lzma2DecMt.c +1095 -0
- package/vendor/7zip/C/Lzma2DecMt.h +81 -0
- package/vendor/7zip/C/Lzma2Enc.c +799 -0
- package/vendor/7zip/C/Lzma2Enc.h +58 -0
- package/vendor/7zip/C/Lzma86.h +111 -0
- package/vendor/7zip/C/Lzma86Dec.c +53 -0
- package/vendor/7zip/C/Lzma86Enc.c +103 -0
- package/vendor/7zip/C/LzmaDec.c +1367 -0
- package/vendor/7zip/C/LzmaDec.h +237 -0
- package/vendor/7zip/C/LzmaEnc.c +3154 -0
- package/vendor/7zip/C/LzmaEnc.h +85 -0
- package/vendor/7zip/C/LzmaLib.c +42 -0
- package/vendor/7zip/C/LzmaLib.h +138 -0
- package/vendor/7zip/C/Md5.c +206 -0
- package/vendor/7zip/C/Md5.h +34 -0
- package/vendor/7zip/C/MtCoder.c +604 -0
- package/vendor/7zip/C/MtCoder.h +144 -0
- package/vendor/7zip/C/MtDec.c +1124 -0
- package/vendor/7zip/C/MtDec.h +202 -0
- package/vendor/7zip/C/Ppmd.h +169 -0
- package/vendor/7zip/C/Ppmd7.c +1131 -0
- package/vendor/7zip/C/Ppmd7.h +181 -0
- package/vendor/7zip/C/Ppmd7Dec.c +312 -0
- package/vendor/7zip/C/Ppmd7Enc.c +340 -0
- package/vendor/7zip/C/Ppmd7aDec.c +295 -0
- package/vendor/7zip/C/Ppmd8.c +1574 -0
- package/vendor/7zip/C/Ppmd8.h +181 -0
- package/vendor/7zip/C/Ppmd8Dec.c +295 -0
- package/vendor/7zip/C/Ppmd8Enc.c +337 -0
- package/vendor/7zip/C/Precomp.h +127 -0
- package/vendor/7zip/C/RotateDefs.h +50 -0
- package/vendor/7zip/C/Sha1.c +441 -0
- package/vendor/7zip/C/Sha1.h +86 -0
- package/vendor/7zip/C/Sha1Opt.c +424 -0
- package/vendor/7zip/C/Sha256.c +492 -0
- package/vendor/7zip/C/Sha256.h +86 -0
- package/vendor/7zip/C/Sha256Opt.c +451 -0
- package/vendor/7zip/C/Sha3.c +359 -0
- package/vendor/7zip/C/Sha3.h +36 -0
- package/vendor/7zip/C/Sha512.c +711 -0
- package/vendor/7zip/C/Sha512.h +86 -0
- package/vendor/7zip/C/Sha512Opt.c +395 -0
- package/vendor/7zip/C/Sort.c +268 -0
- package/vendor/7zip/C/Sort.h +15 -0
- package/vendor/7zip/C/SwapBytes.c +835 -0
- package/vendor/7zip/C/SwapBytes.h +17 -0
- package/vendor/7zip/C/Threads.c +826 -0
- package/vendor/7zip/C/Threads.h +260 -0
- package/vendor/7zip/C/Util/7z/7z.dsp +249 -0
- package/vendor/7zip/C/Util/7z/7z.dsw +29 -0
- package/vendor/7zip/C/Util/7z/7zMain.c +1210 -0
- package/vendor/7zip/C/Util/7z/Precomp.c +4 -0
- package/vendor/7zip/C/Util/7z/Precomp.h +13 -0
- package/vendor/7zip/C/Util/7z/makefile +44 -0
- package/vendor/7zip/C/Util/7z/makefile.gcc +32 -0
- package/vendor/7zip/C/Util/7zipInstall/7zip.ico +0 -0
- package/vendor/7zip/C/Util/7zipInstall/7zipInstall.c +1699 -0
- package/vendor/7zip/C/Util/7zipInstall/7zipInstall.dsp +248 -0
- package/vendor/7zip/C/Util/7zipInstall/7zipInstall.dsw +29 -0
- package/vendor/7zip/C/Util/7zipInstall/7zipInstall.manifest +18 -0
- package/vendor/7zip/C/Util/7zipInstall/Precomp.c +4 -0
- package/vendor/7zip/C/Util/7zipInstall/Precomp.h +13 -0
- package/vendor/7zip/C/Util/7zipInstall/makefile +47 -0
- package/vendor/7zip/C/Util/7zipInstall/resource.h +9 -0
- package/vendor/7zip/C/Util/7zipInstall/resource.rc +48 -0
- package/vendor/7zip/C/Util/7zipUninstall/7zipUninstall.c +1234 -0
- package/vendor/7zip/C/Util/7zipUninstall/7zipUninstall.dsp +132 -0
- package/vendor/7zip/C/Util/7zipUninstall/7zipUninstall.dsw +29 -0
- package/vendor/7zip/C/Util/7zipUninstall/7zipUninstall.ico +0 -0
- package/vendor/7zip/C/Util/7zipUninstall/7zipUninstall.manifest +18 -0
- package/vendor/7zip/C/Util/7zipUninstall/Precomp.c +4 -0
- package/vendor/7zip/C/Util/7zipUninstall/Precomp.h +13 -0
- package/vendor/7zip/C/Util/7zipUninstall/makefile +18 -0
- package/vendor/7zip/C/Util/7zipUninstall/resource.h +9 -0
- package/vendor/7zip/C/Util/7zipUninstall/resource.rc +48 -0
- package/vendor/7zip/C/Util/Lzma/LzmaUtil.c +313 -0
- package/vendor/7zip/C/Util/Lzma/LzmaUtil.dsp +192 -0
- package/vendor/7zip/C/Util/Lzma/LzmaUtil.dsw +29 -0
- package/vendor/7zip/C/Util/Lzma/Precomp.h +13 -0
- package/vendor/7zip/C/Util/Lzma/makefile +30 -0
- package/vendor/7zip/C/Util/Lzma/makefile.gcc +21 -0
- package/vendor/7zip/C/Util/LzmaLib/LzmaLib.def +4 -0
- package/vendor/7zip/C/Util/LzmaLib/LzmaLib.dsp +206 -0
- package/vendor/7zip/C/Util/LzmaLib/LzmaLib.dsw +29 -0
- package/vendor/7zip/C/Util/LzmaLib/LzmaLibExports.c +15 -0
- package/vendor/7zip/C/Util/LzmaLib/Precomp.c +4 -0
- package/vendor/7zip/C/Util/LzmaLib/Precomp.h +13 -0
- package/vendor/7zip/C/Util/LzmaLib/makefile +59 -0
- package/vendor/7zip/C/Util/LzmaLib/resource.rc +3 -0
- package/vendor/7zip/C/Util/SfxSetup/Precomp.c +4 -0
- package/vendor/7zip/C/Util/SfxSetup/Precomp.h +13 -0
- package/vendor/7zip/C/Util/SfxSetup/SfxSetup.c +657 -0
- package/vendor/7zip/C/Util/SfxSetup/SfxSetup.dsp +231 -0
- package/vendor/7zip/C/Util/SfxSetup/SfxSetup.dsw +29 -0
- package/vendor/7zip/C/Util/SfxSetup/makefile +44 -0
- package/vendor/7zip/C/Util/SfxSetup/makefile_con +40 -0
- package/vendor/7zip/C/Util/SfxSetup/resource.rc +5 -0
- package/vendor/7zip/C/Util/SfxSetup/setup.ico +0 -0
- package/vendor/7zip/C/Xxh64.c +389 -0
- package/vendor/7zip/C/Xxh64.h +50 -0
- package/vendor/7zip/C/Xz.c +92 -0
- package/vendor/7zip/C/Xz.h +542 -0
- package/vendor/7zip/C/XzCrc64.c +140 -0
- package/vendor/7zip/C/XzCrc64.h +26 -0
- package/vendor/7zip/C/XzCrc64Opt.c +261 -0
- package/vendor/7zip/C/XzDec.c +2865 -0
- package/vendor/7zip/C/XzEnc.c +1374 -0
- package/vendor/7zip/C/XzEnc.h +62 -0
- package/vendor/7zip/C/XzIn.c +385 -0
- package/vendor/7zip/C/ZstdDec.c +4067 -0
- package/vendor/7zip/C/ZstdDec.h +173 -0
- package/vendor/7zip/C/var_clang.mak +11 -0
- package/vendor/7zip/C/var_clang_arm64.mak +12 -0
- package/vendor/7zip/C/var_clang_x64.mak +11 -0
- package/vendor/7zip/C/var_clang_x86.mak +11 -0
- package/vendor/7zip/C/var_gcc.mak +12 -0
- package/vendor/7zip/C/var_gcc_arm64.mak +12 -0
- package/vendor/7zip/C/var_gcc_x64.mak +10 -0
- package/vendor/7zip/C/var_gcc_x86.mak +10 -0
- package/vendor/7zip/C/var_mac_arm64.mak +13 -0
- package/vendor/7zip/C/var_mac_x64.mak +13 -0
- package/vendor/7zip/C/warn_clang.mak +1 -0
- package/vendor/7zip/C/warn_clang_mac.mak +1 -0
- package/vendor/7zip/C/warn_gcc.mak +51 -0
- package/vendor/7zip/CPP/7zip/7zip.mak +240 -0
- package/vendor/7zip/CPP/7zip/7zip_gcc.mak +1376 -0
- package/vendor/7zip/CPP/7zip/Aes.mak +10 -0
- package/vendor/7zip/CPP/7zip/Archive/7z/7z.dsp +650 -0
- package/vendor/7zip/CPP/7zip/Archive/7z/7z.dsw +29 -0
- package/vendor/7zip/CPP/7zip/Archive/7z/7zCompressionMode.cpp +3 -0
- package/vendor/7zip/CPP/7zip/Archive/7z/7zCompressionMode.h +92 -0
- package/vendor/7zip/CPP/7zip/Archive/7z/7zDecode.cpp +599 -0
- package/vendor/7zip/CPP/7zip/Archive/7z/7zDecode.h +73 -0
- package/vendor/7zip/CPP/7zip/Archive/7z/7zEncode.cpp +702 -0
- package/vendor/7zip/CPP/7zip/Archive/7z/7zEncode.h +95 -0
- package/vendor/7zip/CPP/7zip/Archive/7z/7zExtract.cpp +444 -0
- package/vendor/7zip/CPP/7zip/Archive/7z/7zFolderInStream.cpp +264 -0
- package/vendor/7zip/CPP/7zip/Archive/7z/7zFolderInStream.h +101 -0
- package/vendor/7zip/CPP/7zip/Archive/7z/7zHandler.cpp +800 -0
- package/vendor/7zip/CPP/7zip/Archive/7z/7zHandler.h +178 -0
- package/vendor/7zip/CPP/7zip/Archive/7z/7zHandlerOut.cpp +1162 -0
- package/vendor/7zip/CPP/7zip/Archive/7z/7zHeader.cpp +19 -0
- package/vendor/7zip/CPP/7zip/Archive/7z/7zHeader.h +156 -0
- package/vendor/7zip/CPP/7zip/Archive/7z/7zIn.cpp +1815 -0
- package/vendor/7zip/CPP/7zip/Archive/7z/7zIn.h +454 -0
- package/vendor/7zip/CPP/7zip/Archive/7z/7zItem.h +207 -0
- package/vendor/7zip/CPP/7zip/Archive/7z/7zOut.cpp +1026 -0
- package/vendor/7zip/CPP/7zip/Archive/7z/7zOut.h +346 -0
- package/vendor/7zip/CPP/7zip/Archive/7z/7zProperties.cpp +182 -0
- package/vendor/7zip/CPP/7zip/Archive/7z/7zProperties.h +26 -0
- package/vendor/7zip/CPP/7zip/Archive/7z/7zRegister.cpp +27 -0
- package/vendor/7zip/CPP/7zip/Archive/7z/7zSpecStream.cpp +31 -0
- package/vendor/7zip/CPP/7zip/Archive/7z/7zSpecStream.h +49 -0
- package/vendor/7zip/CPP/7zip/Archive/7z/7zUpdate.cpp +3087 -0
- package/vendor/7zip/CPP/7zip/Archive/7z/7zUpdate.h +167 -0
- package/vendor/7zip/CPP/7zip/Archive/7z/StdAfx.cpp +3 -0
- package/vendor/7zip/CPP/7zip/Archive/7z/StdAfx.h +11 -0
- package/vendor/7zip/CPP/7zip/Archive/7z/makefile +81 -0
- package/vendor/7zip/CPP/7zip/Archive/7z/resource.rc +11 -0
- package/vendor/7zip/CPP/7zip/Archive/ApfsHandler.cpp +4470 -0
- package/vendor/7zip/CPP/7zip/Archive/ApmHandler.cpp +420 -0
- package/vendor/7zip/CPP/7zip/Archive/ArHandler.cpp +844 -0
- package/vendor/7zip/CPP/7zip/Archive/Archive.def +15 -0
- package/vendor/7zip/CPP/7zip/Archive/Archive2.def +22 -0
- package/vendor/7zip/CPP/7zip/Archive/ArchiveExports.cpp +158 -0
- package/vendor/7zip/CPP/7zip/Archive/ArjHandler.cpp +977 -0
- package/vendor/7zip/CPP/7zip/Archive/AvbHandler.cpp +616 -0
- package/vendor/7zip/CPP/7zip/Archive/Base64Handler.cpp +488 -0
- package/vendor/7zip/CPP/7zip/Archive/Bz2Handler.cpp +482 -0
- package/vendor/7zip/CPP/7zip/Archive/Cab/CabBlockInStream.cpp +122 -0
- package/vendor/7zip/CPP/7zip/Archive/Cab/CabBlockInStream.h +28 -0
- package/vendor/7zip/CPP/7zip/Archive/Cab/CabHandler.cpp +1270 -0
- package/vendor/7zip/CPP/7zip/Archive/Cab/CabHandler.h +29 -0
- package/vendor/7zip/CPP/7zip/Archive/Cab/CabHeader.cpp +15 -0
- package/vendor/7zip/CPP/7zip/Archive/Cab/CabHeader.h +41 -0
- package/vendor/7zip/CPP/7zip/Archive/Cab/CabIn.cpp +485 -0
- package/vendor/7zip/CPP/7zip/Archive/Cab/CabIn.h +169 -0
- package/vendor/7zip/CPP/7zip/Archive/Cab/CabItem.h +69 -0
- package/vendor/7zip/CPP/7zip/Archive/Cab/CabRegister.cpp +19 -0
- package/vendor/7zip/CPP/7zip/Archive/Cab/StdAfx.h +11 -0
- package/vendor/7zip/CPP/7zip/Archive/Chm/ChmHandler.cpp +790 -0
- package/vendor/7zip/CPP/7zip/Archive/Chm/ChmHandler.h +27 -0
- package/vendor/7zip/CPP/7zip/Archive/Chm/ChmIn.cpp +1026 -0
- package/vendor/7zip/CPP/7zip/Archive/Chm/ChmIn.h +282 -0
- package/vendor/7zip/CPP/7zip/Archive/Chm/StdAfx.h +11 -0
- package/vendor/7zip/CPP/7zip/Archive/ComHandler.cpp +1449 -0
- package/vendor/7zip/CPP/7zip/Archive/Common/CoderMixer2.cpp +1144 -0
- package/vendor/7zip/CPP/7zip/Archive/Common/CoderMixer2.h +447 -0
- package/vendor/7zip/CPP/7zip/Archive/Common/DummyOutStream.cpp +17 -0
- package/vendor/7zip/CPP/7zip/Archive/Common/DummyOutStream.h +23 -0
- package/vendor/7zip/CPP/7zip/Archive/Common/FindSignature.cpp +90 -0
- package/vendor/7zip/CPP/7zip/Archive/Common/FindSignature.h +12 -0
- package/vendor/7zip/CPP/7zip/Archive/Common/HandlerOut.cpp +315 -0
- package/vendor/7zip/CPP/7zip/Archive/Common/HandlerOut.h +169 -0
- package/vendor/7zip/CPP/7zip/Archive/Common/InStreamWithCRC.cpp +57 -0
- package/vendor/7zip/CPP/7zip/Archive/Common/InStreamWithCRC.h +64 -0
- package/vendor/7zip/CPP/7zip/Archive/Common/ItemNameUtils.cpp +140 -0
- package/vendor/7zip/CPP/7zip/Archive/Common/ItemNameUtils.h +33 -0
- package/vendor/7zip/CPP/7zip/Archive/Common/MultiStream.cpp +193 -0
- package/vendor/7zip/CPP/7zip/Archive/Common/MultiStream.h +86 -0
- package/vendor/7zip/CPP/7zip/Archive/Common/OutStreamWithCRC.cpp +18 -0
- package/vendor/7zip/CPP/7zip/Archive/Common/OutStreamWithCRC.h +35 -0
- package/vendor/7zip/CPP/7zip/Archive/Common/OutStreamWithSha1.cpp +29 -0
- package/vendor/7zip/CPP/7zip/Archive/Common/OutStreamWithSha1.h +61 -0
- package/vendor/7zip/CPP/7zip/Archive/Common/ParseProperties.cpp +3 -0
- package/vendor/7zip/CPP/7zip/Archive/Common/ParseProperties.h +6 -0
- package/vendor/7zip/CPP/7zip/Archive/Common/StdAfx.h +11 -0
- package/vendor/7zip/CPP/7zip/Archive/CpioHandler.cpp +1110 -0
- package/vendor/7zip/CPP/7zip/Archive/CramfsHandler.cpp +784 -0
- package/vendor/7zip/CPP/7zip/Archive/DeflateProps.cpp +3 -0
- package/vendor/7zip/CPP/7zip/Archive/DeflateProps.h +6 -0
- package/vendor/7zip/CPP/7zip/Archive/DllExports.cpp +96 -0
- package/vendor/7zip/CPP/7zip/Archive/DllExports2.cpp +184 -0
- package/vendor/7zip/CPP/7zip/Archive/DmgHandler.cpp +2336 -0
- package/vendor/7zip/CPP/7zip/Archive/ElfHandler.cpp +1284 -0
- package/vendor/7zip/CPP/7zip/Archive/ExtHandler.cpp +2860 -0
- package/vendor/7zip/CPP/7zip/Archive/FatHandler.cpp +1325 -0
- package/vendor/7zip/CPP/7zip/Archive/FlvHandler.cpp +521 -0
- package/vendor/7zip/CPP/7zip/Archive/GptHandler.cpp +473 -0
- package/vendor/7zip/CPP/7zip/Archive/GzHandler.cpp +1200 -0
- package/vendor/7zip/CPP/7zip/Archive/HandlerCont.cpp +320 -0
- package/vendor/7zip/CPP/7zip/Archive/HandlerCont.h +134 -0
- package/vendor/7zip/CPP/7zip/Archive/HfsHandler.cpp +2631 -0
- package/vendor/7zip/CPP/7zip/Archive/HfsHandler.h +87 -0
- package/vendor/7zip/CPP/7zip/Archive/IArchive.h +755 -0
- package/vendor/7zip/CPP/7zip/Archive/Icons/7z.ico +0 -0
- package/vendor/7zip/CPP/7zip/Archive/Icons/apfs.ico +0 -0
- package/vendor/7zip/CPP/7zip/Archive/Icons/arj.ico +0 -0
- package/vendor/7zip/CPP/7zip/Archive/Icons/bz2.ico +0 -0
- package/vendor/7zip/CPP/7zip/Archive/Icons/cab.ico +0 -0
- package/vendor/7zip/CPP/7zip/Archive/Icons/cpio.ico +0 -0
- package/vendor/7zip/CPP/7zip/Archive/Icons/deb.ico +0 -0
- package/vendor/7zip/CPP/7zip/Archive/Icons/dmg.ico +0 -0
- package/vendor/7zip/CPP/7zip/Archive/Icons/fat.ico +0 -0
- package/vendor/7zip/CPP/7zip/Archive/Icons/gz.ico +0 -0
- package/vendor/7zip/CPP/7zip/Archive/Icons/hfs.ico +0 -0
- package/vendor/7zip/CPP/7zip/Archive/Icons/iso.ico +0 -0
- package/vendor/7zip/CPP/7zip/Archive/Icons/lzh.ico +0 -0
- package/vendor/7zip/CPP/7zip/Archive/Icons/lzma.ico +0 -0
- package/vendor/7zip/CPP/7zip/Archive/Icons/ntfs.ico +0 -0
- package/vendor/7zip/CPP/7zip/Archive/Icons/rar.ico +0 -0
- package/vendor/7zip/CPP/7zip/Archive/Icons/rpm.ico +0 -0
- package/vendor/7zip/CPP/7zip/Archive/Icons/split.ico +0 -0
- package/vendor/7zip/CPP/7zip/Archive/Icons/squashfs.ico +0 -0
- package/vendor/7zip/CPP/7zip/Archive/Icons/tar.ico +0 -0
- package/vendor/7zip/CPP/7zip/Archive/Icons/vhd.ico +0 -0
- package/vendor/7zip/CPP/7zip/Archive/Icons/wim.ico +0 -0
- package/vendor/7zip/CPP/7zip/Archive/Icons/xar.ico +0 -0
- package/vendor/7zip/CPP/7zip/Archive/Icons/xz.ico +0 -0
- package/vendor/7zip/CPP/7zip/Archive/Icons/z.ico +0 -0
- package/vendor/7zip/CPP/7zip/Archive/Icons/zip.ico +0 -0
- package/vendor/7zip/CPP/7zip/Archive/Icons/zst.ico +0 -0
- package/vendor/7zip/CPP/7zip/Archive/IhexHandler.cpp +493 -0
- package/vendor/7zip/CPP/7zip/Archive/Iso/IsoHandler.cpp +498 -0
- package/vendor/7zip/CPP/7zip/Archive/Iso/IsoHandler.h +24 -0
- package/vendor/7zip/CPP/7zip/Archive/Iso/IsoHeader.cpp +12 -0
- package/vendor/7zip/CPP/7zip/Archive/Iso/IsoHeader.h +64 -0
- package/vendor/7zip/CPP/7zip/Archive/Iso/IsoIn.cpp +801 -0
- package/vendor/7zip/CPP/7zip/Archive/Iso/IsoIn.h +328 -0
- package/vendor/7zip/CPP/7zip/Archive/Iso/IsoItem.h +316 -0
- package/vendor/7zip/CPP/7zip/Archive/Iso/IsoRegister.cpp +21 -0
- package/vendor/7zip/CPP/7zip/Archive/Iso/StdAfx.h +11 -0
- package/vendor/7zip/CPP/7zip/Archive/LpHandler.cpp +1172 -0
- package/vendor/7zip/CPP/7zip/Archive/LvmHandler.cpp +1108 -0
- package/vendor/7zip/CPP/7zip/Archive/LzhHandler.cpp +719 -0
- package/vendor/7zip/CPP/7zip/Archive/LzmaHandler.cpp +606 -0
- package/vendor/7zip/CPP/7zip/Archive/MachoHandler.cpp +1075 -0
- package/vendor/7zip/CPP/7zip/Archive/MbrHandler.cpp +648 -0
- package/vendor/7zip/CPP/7zip/Archive/MslzHandler.cpp +389 -0
- package/vendor/7zip/CPP/7zip/Archive/MubHandler.cpp +248 -0
- package/vendor/7zip/CPP/7zip/Archive/Nsis/NsisDecode.cpp +295 -0
- package/vendor/7zip/CPP/7zip/Archive/Nsis/NsisDecode.h +97 -0
- package/vendor/7zip/CPP/7zip/Archive/Nsis/NsisHandler.cpp +703 -0
- package/vendor/7zip/CPP/7zip/Archive/Nsis/NsisHandler.h +30 -0
- package/vendor/7zip/CPP/7zip/Archive/Nsis/NsisIn.cpp +6231 -0
- package/vendor/7zip/CPP/7zip/Archive/Nsis/NsisIn.h +462 -0
- package/vendor/7zip/CPP/7zip/Archive/Nsis/NsisRegister.cpp +20 -0
- package/vendor/7zip/CPP/7zip/Archive/Nsis/StdAfx.h +11 -0
- package/vendor/7zip/CPP/7zip/Archive/NtfsHandler.cpp +2944 -0
- package/vendor/7zip/CPP/7zip/Archive/PeHandler.cpp +3427 -0
- package/vendor/7zip/CPP/7zip/Archive/PpmdHandler.cpp +414 -0
- package/vendor/7zip/CPP/7zip/Archive/QcowHandler.cpp +713 -0
- package/vendor/7zip/CPP/7zip/Archive/Rar/Rar5Handler.cpp +3483 -0
- package/vendor/7zip/CPP/7zip/Archive/Rar/Rar5Handler.h +527 -0
- package/vendor/7zip/CPP/7zip/Archive/Rar/RarHandler.cpp +1775 -0
- package/vendor/7zip/CPP/7zip/Archive/Rar/RarHandler.h +115 -0
- package/vendor/7zip/CPP/7zip/Archive/Rar/RarHeader.h +209 -0
- package/vendor/7zip/CPP/7zip/Archive/Rar/RarItem.h +97 -0
- package/vendor/7zip/CPP/7zip/Archive/Rar/RarVol.h +136 -0
- package/vendor/7zip/CPP/7zip/Archive/Rar/StdAfx.cpp +3 -0
- package/vendor/7zip/CPP/7zip/Archive/Rar/StdAfx.h +11 -0
- package/vendor/7zip/CPP/7zip/Archive/RpmHandler.cpp +775 -0
- package/vendor/7zip/CPP/7zip/Archive/SparseHandler.cpp +558 -0
- package/vendor/7zip/CPP/7zip/Archive/SplitHandler.cpp +353 -0
- package/vendor/7zip/CPP/7zip/Archive/SquashfsHandler.cpp +2373 -0
- package/vendor/7zip/CPP/7zip/Archive/StdAfx.h +11 -0
- package/vendor/7zip/CPP/7zip/Archive/SwfHandler.cpp +996 -0
- package/vendor/7zip/CPP/7zip/Archive/Tar/StdAfx.h +11 -0
- package/vendor/7zip/CPP/7zip/Archive/Tar/TarHandler.cpp +1105 -0
- package/vendor/7zip/CPP/7zip/Archive/Tar/TarHandler.h +57 -0
- package/vendor/7zip/CPP/7zip/Archive/Tar/TarHandlerOut.cpp +332 -0
- package/vendor/7zip/CPP/7zip/Archive/Tar/TarHeader.cpp +99 -0
- package/vendor/7zip/CPP/7zip/Archive/Tar/TarHeader.h +90 -0
- package/vendor/7zip/CPP/7zip/Archive/Tar/TarIn.cpp +1151 -0
- package/vendor/7zip/CPP/7zip/Archive/Tar/TarIn.h +151 -0
- package/vendor/7zip/CPP/7zip/Archive/Tar/TarItem.h +365 -0
- package/vendor/7zip/CPP/7zip/Archive/Tar/TarOut.cpp +644 -0
- package/vendor/7zip/CPP/7zip/Archive/Tar/TarOut.h +53 -0
- package/vendor/7zip/CPP/7zip/Archive/Tar/TarRegister.cpp +31 -0
- package/vendor/7zip/CPP/7zip/Archive/Tar/TarUpdate.cpp +563 -0
- package/vendor/7zip/CPP/7zip/Archive/Tar/TarUpdate.h +74 -0
- package/vendor/7zip/CPP/7zip/Archive/Udf/StdAfx.h +11 -0
- package/vendor/7zip/CPP/7zip/Archive/Udf/UdfHandler.cpp +427 -0
- package/vendor/7zip/CPP/7zip/Archive/Udf/UdfHandler.h +32 -0
- package/vendor/7zip/CPP/7zip/Archive/Udf/UdfIn.cpp +1756 -0
- package/vendor/7zip/CPP/7zip/Archive/Udf/UdfIn.h +508 -0
- package/vendor/7zip/CPP/7zip/Archive/UefiHandler.cpp +1884 -0
- package/vendor/7zip/CPP/7zip/Archive/VdiHandler.cpp +433 -0
- package/vendor/7zip/CPP/7zip/Archive/VhdHandler.cpp +1106 -0
- package/vendor/7zip/CPP/7zip/Archive/VhdxHandler.cpp +2085 -0
- package/vendor/7zip/CPP/7zip/Archive/VmdkHandler.cpp +1530 -0
- package/vendor/7zip/CPP/7zip/Archive/Wim/StdAfx.h +11 -0
- package/vendor/7zip/CPP/7zip/Archive/Wim/WimHandler.cpp +1291 -0
- package/vendor/7zip/CPP/7zip/Archive/Wim/WimHandler.h +117 -0
- package/vendor/7zip/CPP/7zip/Archive/Wim/WimHandlerOut.cpp +2008 -0
- package/vendor/7zip/CPP/7zip/Archive/Wim/WimIn.cpp +2104 -0
- package/vendor/7zip/CPP/7zip/Archive/Wim/WimIn.h +719 -0
- package/vendor/7zip/CPP/7zip/Archive/Wim/WimRegister.cpp +29 -0
- package/vendor/7zip/CPP/7zip/Archive/XarHandler.cpp +1316 -0
- package/vendor/7zip/CPP/7zip/Archive/XzHandler.cpp +1452 -0
- package/vendor/7zip/CPP/7zip/Archive/XzHandler.h +11 -0
- package/vendor/7zip/CPP/7zip/Archive/ZHandler.cpp +208 -0
- package/vendor/7zip/CPP/7zip/Archive/Zip/StdAfx.h +11 -0
- package/vendor/7zip/CPP/7zip/Archive/Zip/ZipAddCommon.cpp +484 -0
- package/vendor/7zip/CPP/7zip/Archive/Zip/ZipAddCommon.h +76 -0
- package/vendor/7zip/CPP/7zip/Archive/Zip/ZipCompressionMode.h +62 -0
- package/vendor/7zip/CPP/7zip/Archive/Zip/ZipHandler.cpp +1679 -0
- package/vendor/7zip/CPP/7zip/Archive/Zip/ZipHandler.h +94 -0
- package/vendor/7zip/CPP/7zip/Archive/Zip/ZipHandlerOut.cpp +626 -0
- package/vendor/7zip/CPP/7zip/Archive/Zip/ZipHeader.h +201 -0
- package/vendor/7zip/CPP/7zip/Archive/Zip/ZipIn.cpp +3474 -0
- package/vendor/7zip/CPP/7zip/Archive/Zip/ZipIn.h +456 -0
- package/vendor/7zip/CPP/7zip/Archive/Zip/ZipItem.cpp +464 -0
- package/vendor/7zip/CPP/7zip/Archive/Zip/ZipItem.h +356 -0
- package/vendor/7zip/CPP/7zip/Archive/Zip/ZipOut.cpp +428 -0
- package/vendor/7zip/CPP/7zip/Archive/Zip/ZipOut.h +103 -0
- package/vendor/7zip/CPP/7zip/Archive/Zip/ZipRegister.cpp +38 -0
- package/vendor/7zip/CPP/7zip/Archive/Zip/ZipUpdate.cpp +2165 -0
- package/vendor/7zip/CPP/7zip/Archive/Zip/ZipUpdate.h +107 -0
- package/vendor/7zip/CPP/7zip/Archive/ZstdHandler.cpp +1147 -0
- package/vendor/7zip/CPP/7zip/Archive/makefile +23 -0
- package/vendor/7zip/CPP/7zip/Asm.mak +12 -0
- package/vendor/7zip/CPP/7zip/Bundles/Alone/Alone.dsp +3324 -0
- package/vendor/7zip/CPP/7zip/Bundles/Alone/Alone.dsw +29 -0
- package/vendor/7zip/CPP/7zip/Bundles/Alone/StdAfx.cpp +3 -0
- package/vendor/7zip/CPP/7zip/Bundles/Alone/StdAfx.h +11 -0
- package/vendor/7zip/CPP/7zip/Bundles/Alone/makefile +245 -0
- package/vendor/7zip/CPP/7zip/Bundles/Alone/makefile.gcc +354 -0
- package/vendor/7zip/CPP/7zip/Bundles/Alone/resource.rc +7 -0
- package/vendor/7zip/CPP/7zip/Bundles/Alone2/StdAfx.cpp +3 -0
- package/vendor/7zip/CPP/7zip/Bundles/Alone2/StdAfx.h +11 -0
- package/vendor/7zip/CPP/7zip/Bundles/Alone2/makefile +31 -0
- package/vendor/7zip/CPP/7zip/Bundles/Alone2/makefile.gcc +108 -0
- package/vendor/7zip/CPP/7zip/Bundles/Alone2/resource.rc +7 -0
- package/vendor/7zip/CPP/7zip/Bundles/Alone7z/Alone.dsp +2090 -0
- package/vendor/7zip/CPP/7zip/Bundles/Alone7z/Alone.dsw +29 -0
- package/vendor/7zip/CPP/7zip/Bundles/Alone7z/StdAfx.cpp +3 -0
- package/vendor/7zip/CPP/7zip/Bundles/Alone7z/StdAfx.h +11 -0
- package/vendor/7zip/CPP/7zip/Bundles/Alone7z/makefile +168 -0
- package/vendor/7zip/CPP/7zip/Bundles/Alone7z/makefile.gcc +276 -0
- package/vendor/7zip/CPP/7zip/Bundles/Alone7z/resource.rc +7 -0
- package/vendor/7zip/CPP/7zip/Bundles/Fm/FM.dsp +2275 -0
- package/vendor/7zip/CPP/7zip/Bundles/Fm/FM.dsw +29 -0
- package/vendor/7zip/CPP/7zip/Bundles/Fm/StdAfx.cpp +3 -0
- package/vendor/7zip/CPP/7zip/Bundles/Fm/StdAfx.h +6 -0
- package/vendor/7zip/CPP/7zip/Bundles/Fm/makefile +82 -0
- package/vendor/7zip/CPP/7zip/Bundles/Fm/resource.rc +7 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7z/StdAfx.cpp +3 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7z/StdAfx.h +11 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7z/makefile +148 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7z/resource.rc +5 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zExtract/StdAfx.cpp +3 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zExtract/StdAfx.h +11 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zExtract/makefile +116 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zExtract/resource.rc +5 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zExtractR/StdAfx.cpp +3 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zExtractR/StdAfx.h +11 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zExtractR/makefile +98 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zExtractR/resource.rc +5 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/Arc.mak +310 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/Arc_gcc.mak +395 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/Format7z.dsp +3486 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/Format7z.dsw +29 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/StdAfx.cpp +3 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/StdAfx.h +11 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/makefile +20 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/makefile.gcc +55 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/resource.rc +39 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zR/StdAfx.cpp +3 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zR/StdAfx.h +11 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zR/makefile +121 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zR/resource.rc +5 -0
- package/vendor/7zip/CPP/7zip/Bundles/LzmaCon/LzmaAlone.cpp +815 -0
- package/vendor/7zip/CPP/7zip/Bundles/LzmaCon/LzmaCon.dsp +540 -0
- package/vendor/7zip/CPP/7zip/Bundles/LzmaCon/LzmaCon.dsw +29 -0
- package/vendor/7zip/CPP/7zip/Bundles/LzmaCon/StdAfx.cpp +3 -0
- package/vendor/7zip/CPP/7zip/Bundles/LzmaCon/StdAfx.h +11 -0
- package/vendor/7zip/CPP/7zip/Bundles/LzmaCon/makefile +68 -0
- package/vendor/7zip/CPP/7zip/Bundles/LzmaCon/makefile.gcc +131 -0
- package/vendor/7zip/CPP/7zip/Bundles/LzmaCon/resource.rc +3 -0
- package/vendor/7zip/CPP/7zip/Bundles/SFXCon/7z.ico +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/SFXCon/SFXCon.dsp +1017 -0
- package/vendor/7zip/CPP/7zip/Bundles/SFXCon/SFXCon.dsw +29 -0
- package/vendor/7zip/CPP/7zip/Bundles/SFXCon/SfxCon.cpp +521 -0
- package/vendor/7zip/CPP/7zip/Bundles/SFXCon/StdAfx.cpp +3 -0
- package/vendor/7zip/CPP/7zip/Bundles/SFXCon/StdAfx.h +11 -0
- package/vendor/7zip/CPP/7zip/Bundles/SFXCon/makefile +137 -0
- package/vendor/7zip/CPP/7zip/Bundles/SFXCon/makefile.gcc +215 -0
- package/vendor/7zip/CPP/7zip/Bundles/SFXCon/resource.rc +9 -0
- package/vendor/7zip/CPP/7zip/Bundles/SFXSetup/ExtractCallbackSfx.cpp +246 -0
- package/vendor/7zip/CPP/7zip/Bundles/SFXSetup/ExtractCallbackSfx.h +83 -0
- package/vendor/7zip/CPP/7zip/Bundles/SFXSetup/ExtractEngine.cpp +135 -0
- package/vendor/7zip/CPP/7zip/Bundles/SFXSetup/ExtractEngine.h +11 -0
- package/vendor/7zip/CPP/7zip/Bundles/SFXSetup/SFXSetup.dsp +872 -0
- package/vendor/7zip/CPP/7zip/Bundles/SFXSetup/SFXSetup.dsw +29 -0
- package/vendor/7zip/CPP/7zip/Bundles/SFXSetup/SfxSetup.cpp +359 -0
- package/vendor/7zip/CPP/7zip/Bundles/SFXSetup/StdAfx.cpp +3 -0
- package/vendor/7zip/CPP/7zip/Bundles/SFXSetup/StdAfx.h +6 -0
- package/vendor/7zip/CPP/7zip/Bundles/SFXSetup/makefile +121 -0
- package/vendor/7zip/CPP/7zip/Bundles/SFXSetup/resource.h +6 -0
- package/vendor/7zip/CPP/7zip/Bundles/SFXSetup/resource.rc +16 -0
- package/vendor/7zip/CPP/7zip/Bundles/SFXSetup/setup.ico +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/SFXWin/7z.ico +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/SFXWin/SFXWin.dsp +1074 -0
- package/vendor/7zip/CPP/7zip/Bundles/SFXWin/SFXWin.dsw +29 -0
- package/vendor/7zip/CPP/7zip/Bundles/SFXWin/SfxWin.cpp +268 -0
- package/vendor/7zip/CPP/7zip/Bundles/SFXWin/StdAfx.cpp +3 -0
- package/vendor/7zip/CPP/7zip/Bundles/SFXWin/StdAfx.h +6 -0
- package/vendor/7zip/CPP/7zip/Bundles/SFXWin/makefile +159 -0
- package/vendor/7zip/CPP/7zip/Bundles/SFXWin/resource.h +1 -0
- package/vendor/7zip/CPP/7zip/Bundles/SFXWin/resource.rc +55 -0
- package/vendor/7zip/CPP/7zip/Bundles/makefile +19 -0
- package/vendor/7zip/CPP/7zip/Common/CWrappers.cpp +358 -0
- package/vendor/7zip/CPP/7zip/Common/CWrappers.h +182 -0
- package/vendor/7zip/CPP/7zip/Common/CreateCoder.cpp +548 -0
- package/vendor/7zip/CPP/7zip/Common/CreateCoder.h +200 -0
- package/vendor/7zip/CPP/7zip/Common/FilePathAutoRename.cpp +46 -0
- package/vendor/7zip/CPP/7zip/Common/FilePathAutoRename.h +10 -0
- package/vendor/7zip/CPP/7zip/Common/FileStreams.cpp +923 -0
- package/vendor/7zip/CPP/7zip/Common/FileStreams.h +205 -0
- package/vendor/7zip/CPP/7zip/Common/FilterCoder.cpp +582 -0
- package/vendor/7zip/CPP/7zip/Common/FilterCoder.h +201 -0
- package/vendor/7zip/CPP/7zip/Common/InBuffer.cpp +182 -0
- package/vendor/7zip/CPP/7zip/Common/InBuffer.h +121 -0
- package/vendor/7zip/CPP/7zip/Common/InOutTempBuffer.cpp +237 -0
- package/vendor/7zip/CPP/7zip/Common/InOutTempBuffer.h +45 -0
- package/vendor/7zip/CPP/7zip/Common/LimitedStreams.cpp +395 -0
- package/vendor/7zip/CPP/7zip/Common/LimitedStreams.h +221 -0
- package/vendor/7zip/CPP/7zip/Common/LockedStream.cpp +3 -0
- package/vendor/7zip/CPP/7zip/Common/LockedStream.h +6 -0
- package/vendor/7zip/CPP/7zip/Common/MemBlocks.cpp +215 -0
- package/vendor/7zip/CPP/7zip/Common/MemBlocks.h +72 -0
- package/vendor/7zip/CPP/7zip/Common/MethodId.cpp +3 -0
- package/vendor/7zip/CPP/7zip/Common/MethodId.h +10 -0
- package/vendor/7zip/CPP/7zip/Common/MethodProps.cpp +765 -0
- package/vendor/7zip/CPP/7zip/Common/MethodProps.h +348 -0
- package/vendor/7zip/CPP/7zip/Common/MultiOutStream.cpp +855 -0
- package/vendor/7zip/CPP/7zip/Common/MultiOutStream.h +160 -0
- package/vendor/7zip/CPP/7zip/Common/OffsetStream.cpp +37 -0
- package/vendor/7zip/CPP/7zip/Common/OffsetStream.h +22 -0
- package/vendor/7zip/CPP/7zip/Common/OutBuffer.cpp +111 -0
- package/vendor/7zip/CPP/7zip/Common/OutBuffer.h +133 -0
- package/vendor/7zip/CPP/7zip/Common/OutMemStream.cpp +158 -0
- package/vendor/7zip/CPP/7zip/Common/OutMemStream.h +104 -0
- package/vendor/7zip/CPP/7zip/Common/ProgressMt.cpp +53 -0
- package/vendor/7zip/CPP/7zip/Common/ProgressMt.h +43 -0
- package/vendor/7zip/CPP/7zip/Common/ProgressUtils.cpp +51 -0
- package/vendor/7zip/CPP/7zip/Common/ProgressUtils.h +33 -0
- package/vendor/7zip/CPP/7zip/Common/PropId.cpp +115 -0
- package/vendor/7zip/CPP/7zip/Common/RegisterArc.h +80 -0
- package/vendor/7zip/CPP/7zip/Common/RegisterCodec.h +106 -0
- package/vendor/7zip/CPP/7zip/Common/StdAfx.h +11 -0
- package/vendor/7zip/CPP/7zip/Common/StreamBinder.cpp +151 -0
- package/vendor/7zip/CPP/7zip/Common/StreamBinder.h +78 -0
- package/vendor/7zip/CPP/7zip/Common/StreamObjects.cpp +290 -0
- package/vendor/7zip/CPP/7zip/Common/StreamObjects.h +146 -0
- package/vendor/7zip/CPP/7zip/Common/StreamUtils.cpp +101 -0
- package/vendor/7zip/CPP/7zip/Common/StreamUtils.h +31 -0
- package/vendor/7zip/CPP/7zip/Common/UniqBlocks.cpp +57 -0
- package/vendor/7zip/CPP/7zip/Common/UniqBlocks.h +41 -0
- package/vendor/7zip/CPP/7zip/Common/VirtThread.cpp +47 -0
- package/vendor/7zip/CPP/7zip/Common/VirtThread.h +24 -0
- package/vendor/7zip/CPP/7zip/Compress/BZip2Const.h +71 -0
- package/vendor/7zip/CPP/7zip/Compress/BZip2Crc.cpp +28 -0
- package/vendor/7zip/CPP/7zip/Compress/BZip2Crc.h +31 -0
- package/vendor/7zip/CPP/7zip/Compress/BZip2Decoder.cpp +1777 -0
- package/vendor/7zip/CPP/7zip/Compress/BZip2Decoder.h +388 -0
- package/vendor/7zip/CPP/7zip/Compress/BZip2Encoder.cpp +1116 -0
- package/vendor/7zip/CPP/7zip/Compress/BZip2Encoder.h +273 -0
- package/vendor/7zip/CPP/7zip/Compress/BZip2Register.cpp +25 -0
- package/vendor/7zip/CPP/7zip/Compress/Bcj2Coder.cpp +867 -0
- package/vendor/7zip/CPP/7zip/Compress/Bcj2Coder.h +127 -0
- package/vendor/7zip/CPP/7zip/Compress/Bcj2Register.cpp +24 -0
- package/vendor/7zip/CPP/7zip/Compress/BcjCoder.cpp +24 -0
- package/vendor/7zip/CPP/7zip/Compress/BcjCoder.h +37 -0
- package/vendor/7zip/CPP/7zip/Compress/BcjRegister.cpp +17 -0
- package/vendor/7zip/CPP/7zip/Compress/BitlDecoder.cpp +32 -0
- package/vendor/7zip/CPP/7zip/Compress/BitlDecoder.h +225 -0
- package/vendor/7zip/CPP/7zip/Compress/BitlEncoder.h +57 -0
- package/vendor/7zip/CPP/7zip/Compress/BitmDecoder.h +106 -0
- package/vendor/7zip/CPP/7zip/Compress/BitmEncoder.h +90 -0
- package/vendor/7zip/CPP/7zip/Compress/BranchMisc.cpp +106 -0
- package/vendor/7zip/CPP/7zip/Compress/BranchMisc.h +59 -0
- package/vendor/7zip/CPP/7zip/Compress/BranchRegister.cpp +58 -0
- package/vendor/7zip/CPP/7zip/Compress/ByteSwap.cpp +91 -0
- package/vendor/7zip/CPP/7zip/Compress/Codec.def +7 -0
- package/vendor/7zip/CPP/7zip/Compress/CodecExports.cpp +378 -0
- package/vendor/7zip/CPP/7zip/Compress/CopyCoder.cpp +153 -0
- package/vendor/7zip/CPP/7zip/Compress/CopyCoder.h +34 -0
- package/vendor/7zip/CPP/7zip/Compress/CopyRegister.cpp +15 -0
- package/vendor/7zip/CPP/7zip/Compress/Deflate64Register.cpp +25 -0
- package/vendor/7zip/CPP/7zip/Compress/DeflateConst.h +131 -0
- package/vendor/7zip/CPP/7zip/Compress/DeflateDecoder.cpp +566 -0
- package/vendor/7zip/CPP/7zip/Compress/DeflateDecoder.h +154 -0
- package/vendor/7zip/CPP/7zip/Compress/DeflateEncoder.cpp +1045 -0
- package/vendor/7zip/CPP/7zip/Compress/DeflateEncoder.h +203 -0
- package/vendor/7zip/CPP/7zip/Compress/DeflateRegister.cpp +25 -0
- package/vendor/7zip/CPP/7zip/Compress/DeltaFilter.cpp +126 -0
- package/vendor/7zip/CPP/7zip/Compress/DllExports2Compress.cpp +38 -0
- package/vendor/7zip/CPP/7zip/Compress/DllExportsCompress.cpp +59 -0
- package/vendor/7zip/CPP/7zip/Compress/HuffmanDecoder.h +528 -0
- package/vendor/7zip/CPP/7zip/Compress/ImplodeDecoder.cpp +250 -0
- package/vendor/7zip/CPP/7zip/Compress/ImplodeDecoder.h +61 -0
- package/vendor/7zip/CPP/7zip/Compress/ImplodeHuffmanDecoder.cpp +3 -0
- package/vendor/7zip/CPP/7zip/Compress/ImplodeHuffmanDecoder.h +6 -0
- package/vendor/7zip/CPP/7zip/Compress/LzOutWindow.cpp +14 -0
- package/vendor/7zip/CPP/7zip/Compress/LzOutWindow.h +102 -0
- package/vendor/7zip/CPP/7zip/Compress/LzfseDecoder.cpp +950 -0
- package/vendor/7zip/CPP/7zip/Compress/LzfseDecoder.h +63 -0
- package/vendor/7zip/CPP/7zip/Compress/LzhDecoder.cpp +220 -0
- package/vendor/7zip/CPP/7zip/Compress/LzhDecoder.h +68 -0
- package/vendor/7zip/CPP/7zip/Compress/Lzma2Decoder.cpp +267 -0
- package/vendor/7zip/CPP/7zip/Compress/Lzma2Decoder.h +87 -0
- package/vendor/7zip/CPP/7zip/Compress/Lzma2Encoder.cpp +134 -0
- package/vendor/7zip/CPP/7zip/Compress/Lzma2Encoder.h +30 -0
- package/vendor/7zip/CPP/7zip/Compress/Lzma2Register.cpp +22 -0
- package/vendor/7zip/CPP/7zip/Compress/LzmaDecoder.cpp +350 -0
- package/vendor/7zip/CPP/7zip/Compress/LzmaDecoder.h +113 -0
- package/vendor/7zip/CPP/7zip/Compress/LzmaEncoder.cpp +374 -0
- package/vendor/7zip/CPP/7zip/Compress/LzmaEncoder.h +45 -0
- package/vendor/7zip/CPP/7zip/Compress/LzmaRegister.cpp +22 -0
- package/vendor/7zip/CPP/7zip/Compress/LzmsDecoder.cpp +619 -0
- package/vendor/7zip/CPP/7zip/Compress/LzmsDecoder.h +209 -0
- package/vendor/7zip/CPP/7zip/Compress/Lzx.h +61 -0
- package/vendor/7zip/CPP/7zip/Compress/LzxDecoder.cpp +1517 -0
- package/vendor/7zip/CPP/7zip/Compress/LzxDecoder.h +106 -0
- package/vendor/7zip/CPP/7zip/Compress/Mtf8.h +225 -0
- package/vendor/7zip/CPP/7zip/Compress/PpmdDecoder.cpp +219 -0
- package/vendor/7zip/CPP/7zip/Compress/PpmdDecoder.h +87 -0
- package/vendor/7zip/CPP/7zip/Compress/PpmdEncoder.cpp +193 -0
- package/vendor/7zip/CPP/7zip/Compress/PpmdEncoder.h +49 -0
- package/vendor/7zip/CPP/7zip/Compress/PpmdRegister.cpp +22 -0
- package/vendor/7zip/CPP/7zip/Compress/PpmdZip.cpp +309 -0
- package/vendor/7zip/CPP/7zip/Compress/PpmdZip.h +78 -0
- package/vendor/7zip/CPP/7zip/Compress/QuantumDecoder.cpp +355 -0
- package/vendor/7zip/CPP/7zip/Compress/QuantumDecoder.h +60 -0
- package/vendor/7zip/CPP/7zip/Compress/Rar1Decoder.cpp +518 -0
- package/vendor/7zip/CPP/7zip/Compress/Rar1Decoder.h +70 -0
- package/vendor/7zip/CPP/7zip/Compress/Rar2Decoder.cpp +472 -0
- package/vendor/7zip/CPP/7zip/Compress/Rar2Decoder.h +111 -0
- package/vendor/7zip/CPP/7zip/Compress/Rar3Decoder.cpp +939 -0
- package/vendor/7zip/CPP/7zip/Compress/Rar3Decoder.h +283 -0
- package/vendor/7zip/CPP/7zip/Compress/Rar3Vm.cpp +1153 -0
- package/vendor/7zip/CPP/7zip/Compress/Rar3Vm.h +195 -0
- package/vendor/7zip/CPP/7zip/Compress/Rar5Decoder.cpp +2060 -0
- package/vendor/7zip/CPP/7zip/Compress/Rar5Decoder.h +132 -0
- package/vendor/7zip/CPP/7zip/Compress/RarCodecsRegister.cpp +33 -0
- package/vendor/7zip/CPP/7zip/Compress/ShrinkDecoder.cpp +290 -0
- package/vendor/7zip/CPP/7zip/Compress/ShrinkDecoder.h +38 -0
- package/vendor/7zip/CPP/7zip/Compress/StdAfx.h +11 -0
- package/vendor/7zip/CPP/7zip/Compress/XpressDecoder.cpp +399 -0
- package/vendor/7zip/CPP/7zip/Compress/XpressDecoder.h +18 -0
- package/vendor/7zip/CPP/7zip/Compress/XzDecoder.cpp +151 -0
- package/vendor/7zip/CPP/7zip/Compress/XzDecoder.h +86 -0
- package/vendor/7zip/CPP/7zip/Compress/XzEncoder.cpp +243 -0
- package/vendor/7zip/CPP/7zip/Compress/XzEncoder.h +35 -0
- package/vendor/7zip/CPP/7zip/Compress/ZDecoder.cpp +392 -0
- package/vendor/7zip/CPP/7zip/Compress/ZDecoder.h +41 -0
- package/vendor/7zip/CPP/7zip/Compress/ZlibDecoder.cpp +136 -0
- package/vendor/7zip/CPP/7zip/Compress/ZlibDecoder.h +78 -0
- package/vendor/7zip/CPP/7zip/Compress/ZlibEncoder.cpp +61 -0
- package/vendor/7zip/CPP/7zip/Compress/ZlibEncoder.h +42 -0
- package/vendor/7zip/CPP/7zip/Compress/ZstdDecoder.cpp +437 -0
- package/vendor/7zip/CPP/7zip/Compress/ZstdDecoder.h +98 -0
- package/vendor/7zip/CPP/7zip/Compress/makefile +7 -0
- package/vendor/7zip/CPP/7zip/Crc.mak +8 -0
- package/vendor/7zip/CPP/7zip/Crc64.mak +8 -0
- package/vendor/7zip/CPP/7zip/Crypto/7zAes.cpp +315 -0
- package/vendor/7zip/CPP/7zip/Crypto/7zAes.h +130 -0
- package/vendor/7zip/CPP/7zip/Crypto/7zAesRegister.cpp +17 -0
- package/vendor/7zip/CPP/7zip/Crypto/Codec.def +4 -0
- package/vendor/7zip/CPP/7zip/Crypto/HmacSha1.cpp +94 -0
- package/vendor/7zip/CPP/7zip/Crypto/HmacSha1.h +31 -0
- package/vendor/7zip/CPP/7zip/Crypto/HmacSha256.cpp +53 -0
- package/vendor/7zip/CPP/7zip/Crypto/HmacSha256.h +27 -0
- package/vendor/7zip/CPP/7zip/Crypto/MyAes.cpp +277 -0
- package/vendor/7zip/CPP/7zip/Crypto/MyAes.h +122 -0
- package/vendor/7zip/CPP/7zip/Crypto/MyAesReg.cpp +29 -0
- package/vendor/7zip/CPP/7zip/Crypto/Pbkdf2HmacSha1.cpp +48 -0
- package/vendor/7zip/CPP/7zip/Crypto/Pbkdf2HmacSha1.h +19 -0
- package/vendor/7zip/CPP/7zip/Crypto/RandGen.cpp +242 -0
- package/vendor/7zip/CPP/7zip/Crypto/RandGen.h +41 -0
- package/vendor/7zip/CPP/7zip/Crypto/Rar20Crypto.cpp +130 -0
- package/vendor/7zip/CPP/7zip/Crypto/Rar20Crypto.h +54 -0
- package/vendor/7zip/CPP/7zip/Crypto/Rar5Aes.cpp +273 -0
- package/vendor/7zip/CPP/7zip/Crypto/Rar5Aes.h +97 -0
- package/vendor/7zip/CPP/7zip/Crypto/RarAes.cpp +202 -0
- package/vendor/7zip/CPP/7zip/Crypto/RarAes.h +54 -0
- package/vendor/7zip/CPP/7zip/Crypto/Sha1Cls.h +37 -0
- package/vendor/7zip/CPP/7zip/Crypto/StdAfx.h +11 -0
- package/vendor/7zip/CPP/7zip/Crypto/WzAes.cpp +231 -0
- package/vendor/7zip/CPP/7zip/Crypto/WzAes.h +161 -0
- package/vendor/7zip/CPP/7zip/Crypto/ZipCrypto.cpp +114 -0
- package/vendor/7zip/CPP/7zip/Crypto/ZipCrypto.h +80 -0
- package/vendor/7zip/CPP/7zip/Crypto/ZipStrong.cpp +265 -0
- package/vendor/7zip/CPP/7zip/Crypto/ZipStrong.h +73 -0
- package/vendor/7zip/CPP/7zip/GuiCommon.rc +119 -0
- package/vendor/7zip/CPP/7zip/Guid.txt +243 -0
- package/vendor/7zip/CPP/7zip/ICoder.h +480 -0
- package/vendor/7zip/CPP/7zip/IDecl.h +76 -0
- package/vendor/7zip/CPP/7zip/IPassword.h +54 -0
- package/vendor/7zip/CPP/7zip/IProgress.h +20 -0
- package/vendor/7zip/CPP/7zip/IStream.h +210 -0
- package/vendor/7zip/CPP/7zip/LzFindOpt.mak +7 -0
- package/vendor/7zip/CPP/7zip/LzmaDec.mak +7 -0
- package/vendor/7zip/CPP/7zip/LzmaDec_gcc.mak +14 -0
- package/vendor/7zip/CPP/7zip/MyVersion.h +2 -0
- package/vendor/7zip/CPP/7zip/MyVersionInfo.rc +2 -0
- package/vendor/7zip/CPP/7zip/PropID.h +178 -0
- package/vendor/7zip/CPP/7zip/Sha1.mak +13 -0
- package/vendor/7zip/CPP/7zip/Sha256.mak +13 -0
- package/vendor/7zip/CPP/7zip/Sort.mak +6 -0
- package/vendor/7zip/CPP/7zip/SubBuild.mak +3 -0
- package/vendor/7zip/CPP/7zip/UI/Agent/Agent.cpp +2003 -0
- package/vendor/7zip/CPP/7zip/UI/Agent/Agent.h +365 -0
- package/vendor/7zip/CPP/7zip/UI/Agent/AgentOut.cpp +776 -0
- package/vendor/7zip/CPP/7zip/UI/Agent/AgentProxy.cpp +1098 -0
- package/vendor/7zip/CPP/7zip/UI/Agent/AgentProxy.h +198 -0
- package/vendor/7zip/CPP/7zip/UI/Agent/ArchiveFolder.cpp +57 -0
- package/vendor/7zip/CPP/7zip/UI/Agent/ArchiveFolderOpen.cpp +243 -0
- package/vendor/7zip/CPP/7zip/UI/Agent/ArchiveFolderOut.cpp +457 -0
- package/vendor/7zip/CPP/7zip/UI/Agent/IFolderArchive.h +123 -0
- package/vendor/7zip/CPP/7zip/UI/Agent/StdAfx.h +11 -0
- package/vendor/7zip/CPP/7zip/UI/Agent/UpdateCallbackAgent.cpp +208 -0
- package/vendor/7zip/CPP/7zip/UI/Agent/UpdateCallbackAgent.h +22 -0
- package/vendor/7zip/CPP/7zip/UI/Client7z/Client7z.cpp +1145 -0
- package/vendor/7zip/CPP/7zip/UI/Client7z/Client7z.dsp +331 -0
- package/vendor/7zip/CPP/7zip/UI/Client7z/Client7z.dsw +29 -0
- package/vendor/7zip/CPP/7zip/UI/Client7z/StdAfx.cpp +3 -0
- package/vendor/7zip/CPP/7zip/UI/Client7z/StdAfx.h +11 -0
- package/vendor/7zip/CPP/7zip/UI/Client7z/makefile +29 -0
- package/vendor/7zip/CPP/7zip/UI/Client7z/makefile.gcc +72 -0
- package/vendor/7zip/CPP/7zip/UI/Client7z/resource.rc +3 -0
- package/vendor/7zip/CPP/7zip/UI/Common/ArchiveCommandLine.cpp +1913 -0
- package/vendor/7zip/CPP/7zip/UI/Common/ArchiveCommandLine.h +170 -0
- package/vendor/7zip/CPP/7zip/UI/Common/ArchiveExtractCallback.cpp +3243 -0
- package/vendor/7zip/CPP/7zip/UI/Common/ArchiveExtractCallback.h +640 -0
- package/vendor/7zip/CPP/7zip/UI/Common/ArchiveName.cpp +176 -0
- package/vendor/7zip/CPP/7zip/UI/Common/ArchiveName.h +16 -0
- package/vendor/7zip/CPP/7zip/UI/Common/ArchiveOpenCallback.cpp +403 -0
- package/vendor/7zip/CPP/7zip/UI/Common/ArchiveOpenCallback.h +182 -0
- package/vendor/7zip/CPP/7zip/UI/Common/Bench.cpp +5036 -0
- package/vendor/7zip/CPP/7zip/UI/Common/Bench.h +121 -0
- package/vendor/7zip/CPP/7zip/UI/Common/CompressCall.cpp +343 -0
- package/vendor/7zip/CPP/7zip/UI/Common/CompressCall.h +28 -0
- package/vendor/7zip/CPP/7zip/UI/Common/CompressCall2.cpp +327 -0
- package/vendor/7zip/CPP/7zip/UI/Common/DefaultName.cpp +37 -0
- package/vendor/7zip/CPP/7zip/UI/Common/DefaultName.h +11 -0
- package/vendor/7zip/CPP/7zip/UI/Common/DirItem.h +407 -0
- package/vendor/7zip/CPP/7zip/UI/Common/EnumDirItems.cpp +1637 -0
- package/vendor/7zip/CPP/7zip/UI/Common/EnumDirItems.h +38 -0
- package/vendor/7zip/CPP/7zip/UI/Common/ExitCode.h +27 -0
- package/vendor/7zip/CPP/7zip/UI/Common/Extract.cpp +593 -0
- package/vendor/7zip/CPP/7zip/UI/Common/Extract.h +118 -0
- package/vendor/7zip/CPP/7zip/UI/Common/ExtractMode.h +44 -0
- package/vendor/7zip/CPP/7zip/UI/Common/ExtractingFilePath.cpp +299 -0
- package/vendor/7zip/CPP/7zip/UI/Common/ExtractingFilePath.h +31 -0
- package/vendor/7zip/CPP/7zip/UI/Common/HashCalc.cpp +2273 -0
- package/vendor/7zip/CPP/7zip/UI/Common/HashCalc.h +322 -0
- package/vendor/7zip/CPP/7zip/UI/Common/IFileExtractCallback.h +112 -0
- package/vendor/7zip/CPP/7zip/UI/Common/LoadCodecs.cpp +1354 -0
- package/vendor/7zip/CPP/7zip/UI/Common/LoadCodecs.h +482 -0
- package/vendor/7zip/CPP/7zip/UI/Common/OpenArchive.cpp +3690 -0
- package/vendor/7zip/CPP/7zip/UI/Common/OpenArchive.h +469 -0
- package/vendor/7zip/CPP/7zip/UI/Common/PropIDUtils.cpp +746 -0
- package/vendor/7zip/CPP/7zip/UI/Common/PropIDUtils.h +18 -0
- package/vendor/7zip/CPP/7zip/UI/Common/Property.h +14 -0
- package/vendor/7zip/CPP/7zip/UI/Common/SetProperties.cpp +88 -0
- package/vendor/7zip/CPP/7zip/UI/Common/SetProperties.h +10 -0
- package/vendor/7zip/CPP/7zip/UI/Common/SortUtils.cpp +25 -0
- package/vendor/7zip/CPP/7zip/UI/Common/SortUtils.h +10 -0
- package/vendor/7zip/CPP/7zip/UI/Common/StdAfx.h +11 -0
- package/vendor/7zip/CPP/7zip/UI/Common/TempFiles.cpp +20 -0
- package/vendor/7zip/CPP/7zip/UI/Common/TempFiles.h +19 -0
- package/vendor/7zip/CPP/7zip/UI/Common/Update.cpp +1931 -0
- package/vendor/7zip/CPP/7zip/UI/Common/Update.h +221 -0
- package/vendor/7zip/CPP/7zip/UI/Common/UpdateAction.cpp +64 -0
- package/vendor/7zip/CPP/7zip/UI/Common/UpdateAction.h +66 -0
- package/vendor/7zip/CPP/7zip/UI/Common/UpdateCallback.cpp +1078 -0
- package/vendor/7zip/CPP/7zip/UI/Common/UpdateCallback.h +197 -0
- package/vendor/7zip/CPP/7zip/UI/Common/UpdatePair.cpp +303 -0
- package/vendor/7zip/CPP/7zip/UI/Common/UpdatePair.h +27 -0
- package/vendor/7zip/CPP/7zip/UI/Common/UpdateProduce.cpp +75 -0
- package/vendor/7zip/CPP/7zip/UI/Common/UpdateProduce.h +60 -0
- package/vendor/7zip/CPP/7zip/UI/Common/WorkDir.cpp +84 -0
- package/vendor/7zip/CPP/7zip/UI/Common/WorkDir.h +30 -0
- package/vendor/7zip/CPP/7zip/UI/Common/ZipRegistry.cpp +599 -0
- package/vendor/7zip/CPP/7zip/UI/Common/ZipRegistry.h +212 -0
- package/vendor/7zip/CPP/7zip/UI/Console/BenchCon.cpp +41 -0
- package/vendor/7zip/CPP/7zip/UI/Console/BenchCon.h +14 -0
- package/vendor/7zip/CPP/7zip/UI/Console/Console.dsp +1052 -0
- package/vendor/7zip/CPP/7zip/UI/Console/Console.dsw +29 -0
- package/vendor/7zip/CPP/7zip/UI/Console/Console.mak +45 -0
- package/vendor/7zip/CPP/7zip/UI/Console/Console.manifest +16 -0
- package/vendor/7zip/CPP/7zip/UI/Console/ConsoleClose.cpp +98 -0
- package/vendor/7zip/CPP/7zip/UI/Console/ConsoleClose.h +39 -0
- package/vendor/7zip/CPP/7zip/UI/Console/ExtractCallbackConsole.cpp +954 -0
- package/vendor/7zip/CPP/7zip/UI/Console/ExtractCallbackConsole.h +211 -0
- package/vendor/7zip/CPP/7zip/UI/Console/HashCon.cpp +426 -0
- package/vendor/7zip/CPP/7zip/UI/Console/HashCon.h +58 -0
- package/vendor/7zip/CPP/7zip/UI/Console/List.cpp +1417 -0
- package/vendor/7zip/CPP/7zip/UI/Console/List.h +42 -0
- package/vendor/7zip/CPP/7zip/UI/Console/Main.cpp +1663 -0
- package/vendor/7zip/CPP/7zip/UI/Console/MainAr.cpp +235 -0
- package/vendor/7zip/CPP/7zip/UI/Console/OpenCallbackConsole.cpp +115 -0
- package/vendor/7zip/CPP/7zip/UI/Console/OpenCallbackConsole.h +73 -0
- package/vendor/7zip/CPP/7zip/UI/Console/PercentPrinter.cpp +186 -0
- package/vendor/7zip/CPP/7zip/UI/Console/PercentPrinter.h +66 -0
- package/vendor/7zip/CPP/7zip/UI/Console/StdAfx.cpp +3 -0
- package/vendor/7zip/CPP/7zip/UI/Console/StdAfx.h +11 -0
- package/vendor/7zip/CPP/7zip/UI/Console/UpdateCallbackConsole.cpp +1012 -0
- package/vendor/7zip/CPP/7zip/UI/Console/UpdateCallbackConsole.h +148 -0
- package/vendor/7zip/CPP/7zip/UI/Console/UserInputUtils.cpp +118 -0
- package/vendor/7zip/CPP/7zip/UI/Console/UserInputUtils.h +27 -0
- package/vendor/7zip/CPP/7zip/UI/Console/makefile +68 -0
- package/vendor/7zip/CPP/7zip/UI/Console/makefile.gcc +184 -0
- package/vendor/7zip/CPP/7zip/UI/Console/resource.rc +7 -0
- package/vendor/7zip/CPP/7zip/UI/Explorer/7-zip.dll.manifest +1 -0
- package/vendor/7zip/CPP/7zip/UI/Explorer/ContextMenu.cpp +1837 -0
- package/vendor/7zip/CPP/7zip/UI/Explorer/ContextMenu.h +173 -0
- package/vendor/7zip/CPP/7zip/UI/Explorer/ContextMenuFlags.h +27 -0
- package/vendor/7zip/CPP/7zip/UI/Explorer/DllExportsExplorer.cpp +268 -0
- package/vendor/7zip/CPP/7zip/UI/Explorer/Explorer.def +9 -0
- package/vendor/7zip/CPP/7zip/UI/Explorer/Explorer.dsp +620 -0
- package/vendor/7zip/CPP/7zip/UI/Explorer/Explorer.dsw +29 -0
- package/vendor/7zip/CPP/7zip/UI/Explorer/MenuLogo.bmp +0 -0
- package/vendor/7zip/CPP/7zip/UI/Explorer/MyExplorerCommand.h +217 -0
- package/vendor/7zip/CPP/7zip/UI/Explorer/MyMessages.cpp +43 -0
- package/vendor/7zip/CPP/7zip/UI/Explorer/MyMessages.h +16 -0
- package/vendor/7zip/CPP/7zip/UI/Explorer/RegistryContextMenu.cpp +225 -0
- package/vendor/7zip/CPP/7zip/UI/Explorer/RegistryContextMenu.h +13 -0
- package/vendor/7zip/CPP/7zip/UI/Explorer/StdAfx.cpp +3 -0
- package/vendor/7zip/CPP/7zip/UI/Explorer/StdAfx.h +6 -0
- package/vendor/7zip/CPP/7zip/UI/Explorer/makefile +76 -0
- package/vendor/7zip/CPP/7zip/UI/Explorer/resource.h +15 -0
- package/vendor/7zip/CPP/7zip/UI/Explorer/resource.rc +10 -0
- package/vendor/7zip/CPP/7zip/UI/Explorer/resource2.rc +19 -0
- package/vendor/7zip/CPP/7zip/UI/Far/ExtractEngine.cpp +274 -0
- package/vendor/7zip/CPP/7zip/UI/Far/ExtractEngine.h +43 -0
- package/vendor/7zip/CPP/7zip/UI/Far/Far.cpp +588 -0
- package/vendor/7zip/CPP/7zip/UI/Far/Far.def +35 -0
- package/vendor/7zip/CPP/7zip/UI/Far/Far.dsp +831 -0
- package/vendor/7zip/CPP/7zip/UI/Far/Far.dsw +29 -0
- package/vendor/7zip/CPP/7zip/UI/Far/FarPlugin.h +560 -0
- package/vendor/7zip/CPP/7zip/UI/Far/FarUtils.cpp +523 -0
- package/vendor/7zip/CPP/7zip/UI/Far/FarUtils.h +203 -0
- package/vendor/7zip/CPP/7zip/UI/Far/Messages.h +136 -0
- package/vendor/7zip/CPP/7zip/UI/Far/OverwriteDialogFar.cpp +145 -0
- package/vendor/7zip/CPP/7zip/UI/Far/OverwriteDialogFar.h +37 -0
- package/vendor/7zip/CPP/7zip/UI/Far/Plugin.cpp +937 -0
- package/vendor/7zip/CPP/7zip/UI/Far/Plugin.h +97 -0
- package/vendor/7zip/CPP/7zip/UI/Far/PluginCommon.cpp +50 -0
- package/vendor/7zip/CPP/7zip/UI/Far/PluginDelete.cpp +144 -0
- package/vendor/7zip/CPP/7zip/UI/Far/PluginRead.cpp +301 -0
- package/vendor/7zip/CPP/7zip/UI/Far/PluginWrite.cpp +840 -0
- package/vendor/7zip/CPP/7zip/UI/Far/ProgressBox.cpp +305 -0
- package/vendor/7zip/CPP/7zip/UI/Far/ProgressBox.h +85 -0
- package/vendor/7zip/CPP/7zip/UI/Far/StdAfx.cpp +3 -0
- package/vendor/7zip/CPP/7zip/UI/Far/StdAfx.h +11 -0
- package/vendor/7zip/CPP/7zip/UI/Far/UpdateCallbackFar.cpp +327 -0
- package/vendor/7zip/CPP/7zip/UI/Far/UpdateCallbackFar.h +58 -0
- package/vendor/7zip/CPP/7zip/UI/Far/makefile +105 -0
- package/vendor/7zip/CPP/7zip/UI/Far/resource.rc +3 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/7zFM.exe.manifest +23 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/7zipLogo.ico +0 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/AboutDialog.cpp +81 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/AboutDialog.h +19 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/AboutDialog.rc +26 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/AboutDialogRes.h +8 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/Add.bmp +0 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/Add2.bmp +0 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/AltStreamsFolder.cpp +865 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/AltStreamsFolder.h +92 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/App.cpp +1004 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/App.h +314 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/AppState.h +95 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/BrowseDialog.cpp +1132 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/BrowseDialog.h +32 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/BrowseDialog.rc +25 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/BrowseDialog2.cpp +1873 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/BrowseDialog2.h +10 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/BrowseDialog2.rc +32 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/BrowseDialog2Res.h +9 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/BrowseDialogRes.h +9 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/ClassDefs.cpp +12 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/ComboDialog.cpp +64 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/ComboDialog.h +28 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/ComboDialog.rc +16 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/ComboDialogRes.h +4 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/Copy.bmp +0 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/Copy2.bmp +0 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/CopyDialog.cpp +103 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/CopyDialog.h +31 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/CopyDialog.rc +20 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/CopyDialogRes.h +8 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/Delete.bmp +0 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/Delete2.bmp +0 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/DialogSize.h +16 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/EditDialog.cpp +57 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/EditDialog.h +25 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/EditDialog.rc +15 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/EditDialogRes.h +2 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/EditPage.cpp +159 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/EditPage.h +30 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/EditPage.rc +19 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/EditPage2.rc +14 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/EditPageRes.h +15 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/EnumFormatEtc.cpp +109 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/EnumFormatEtc.h +10 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/Extract.bmp +0 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/Extract2.bmp +0 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/ExtractCallback.cpp +1284 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/ExtractCallback.h +347 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/FM.cpp +1230 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/FM.dsp +1699 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/FM.dsw +29 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/FM.ico +0 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/FM.mak +102 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/FSDrives.cpp +512 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/FSDrives.h +52 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/FSFolder.cpp +1179 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/FSFolder.h +220 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/FSFolderCopy.cpp +871 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/FileFolderPluginOpen.cpp +394 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/FileFolderPluginOpen.h +27 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/FilePlugins.cpp +78 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/FilePlugins.h +33 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/FoldersPage.cpp +172 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/FoldersPage.h +32 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/FoldersPage.rc +23 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/FoldersPage2.rc +11 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/FoldersPageRes.h +12 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/FormatUtils.cpp +28 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/FormatUtils.h +14 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/HelpUtils.cpp +78 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/HelpUtils.h +10 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/IFolder.h +187 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/Info.bmp +0 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/Info2.bmp +0 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/LangPage.cpp +359 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/LangPage.h +36 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/LangPage.rc +40 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/LangPageRes.h +9 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/LangUtils.cpp +333 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/LangUtils.h +48 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/LinkDialog.cpp +402 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/LinkDialog.h +34 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/LinkDialog.rc +38 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/LinkDialogRes.h +22 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/ListViewDialog.cpp +321 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/ListViewDialog.h +46 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/ListViewDialog.rc +14 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/ListViewDialogRes.h +2 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/MemDialog.cpp +218 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/MemDialog.h +48 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/MemDialog.rc +49 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/MemDialogRes.h +13 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/MenuPage.cpp +439 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/MenuPage.h +57 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/MenuPage.rc +24 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/MenuPage2.rc +28 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/MenuPageRes.h +15 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/MessagesDialog.cpp +76 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/MessagesDialog.h +25 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/MessagesDialog.rc +14 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/MessagesDialogRes.h +3 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/Move.bmp +0 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/Move2.bmp +0 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/MyCom2.h +46 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/MyLoadMenu.cpp +964 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/MyLoadMenu.h +40 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/MyWindowsNew.h +119 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/NetFolder.cpp +276 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/NetFolder.h +36 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/OpenCallback.cpp +86 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/OpenCallback.h +69 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/OptionsDialog.cpp +89 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/OverwriteDialog.cpp +288 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/OverwriteDialog.h +89 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/OverwriteDialog.rc +93 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/OverwriteDialogRes.h +19 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/Panel.cpp +1177 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/Panel.h +1020 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/PanelCopy.cpp +477 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/PanelCrc.cpp +422 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/PanelDrag.cpp +3006 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/PanelFolderChange.cpp +1122 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/PanelItemOpen.cpp +1836 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/PanelItems.cpp +1476 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/PanelKey.cpp +357 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/PanelListNotify.cpp +838 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/PanelMenu.cpp +1160 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/PanelOperations.cpp +533 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/PanelSelect.cpp +317 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/PanelSort.cpp +288 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/PanelSplitFile.cpp +562 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/PasswordDialog.cpp +58 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/PasswordDialog.h +28 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/PasswordDialog.rc +18 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/PasswordDialogRes.h +5 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/PluginInterface.h +32 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/PluginLoader.h +33 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/ProgramLocation.cpp +3 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/ProgramLocation.h +6 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/ProgressDialog.cpp +201 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/ProgressDialog.h +171 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/ProgressDialog.rc +12 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/ProgressDialog2.cpp +1484 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/ProgressDialog2.h +355 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/ProgressDialog2.rc +40 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/ProgressDialog2Res.h +49 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/ProgressDialog2a.rc +85 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/ProgressDialogRes.h +3 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/PropertyName.cpp +23 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/PropertyName.h +10 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/PropertyName.rc +109 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/PropertyNameRes.h +104 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/RegistryAssociations.cpp +167 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/RegistryAssociations.h +31 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/RegistryPlugins.cpp +145 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/RegistryPlugins.h +29 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/RegistryUtils.cpp +194 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/RegistryUtils.h +50 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/RootFolder.cpp +342 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/RootFolder.h +24 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/SettingsPage.cpp +453 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/SettingsPage.h +37 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/SettingsPage.rc +22 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/SettingsPage2.rc +37 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/SettingsPageRes.h +23 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/SplitDialog.cpp +114 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/SplitDialog.h +28 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/SplitDialog.rc +16 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/SplitDialogRes.h +8 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/SplitUtils.cpp +96 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/SplitUtils.h +15 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/StdAfx.cpp +3 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/StdAfx.h +67 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/StringUtils.cpp +39 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/StringUtils.h +11 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/SysIconUtils.cpp +352 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/SysIconUtils.h +65 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/SystemPage.cpp +472 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/SystemPage.h +126 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/SystemPage.rc +43 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/SystemPageRes.h +9 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/Test.bmp +0 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/Test2.bmp +0 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/TextPairs.cpp +193 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/TextPairs.h +32 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/UpdateCallback100.cpp +147 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/UpdateCallback100.h +49 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/VerCtrl.cpp +428 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/ViewSettings.cpp +315 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/ViewSettings.h +115 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/makefile +110 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/resource.h +199 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/resource.rc +296 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/resourceGui.h +25 -0
- package/vendor/7zip/CPP/7zip/UI/FileManager/resourceGui.rc +30 -0
- package/vendor/7zip/CPP/7zip/UI/GUI/7zG.exe.manifest +23 -0
- package/vendor/7zip/CPP/7zip/UI/GUI/BenchmarkDialog.cpp +1921 -0
- package/vendor/7zip/CPP/7zip/UI/GUI/BenchmarkDialog.h +15 -0
- package/vendor/7zip/CPP/7zip/UI/GUI/BenchmarkDialog.rc +288 -0
- package/vendor/7zip/CPP/7zip/UI/GUI/BenchmarkDialogRes.h +79 -0
- package/vendor/7zip/CPP/7zip/UI/GUI/CompressDialog.cpp +3821 -0
- package/vendor/7zip/CPP/7zip/UI/GUI/CompressDialog.h +483 -0
- package/vendor/7zip/CPP/7zip/UI/GUI/CompressDialog.rc +233 -0
- package/vendor/7zip/CPP/7zip/UI/GUI/CompressDialogRes.h +125 -0
- package/vendor/7zip/CPP/7zip/UI/GUI/CompressOptionsDialog.rc +79 -0
- package/vendor/7zip/CPP/7zip/UI/GUI/Extract.rc +59 -0
- package/vendor/7zip/CPP/7zip/UI/GUI/ExtractDialog.cpp +420 -0
- package/vendor/7zip/CPP/7zip/UI/GUI/ExtractDialog.h +113 -0
- package/vendor/7zip/CPP/7zip/UI/GUI/ExtractDialog.rc +98 -0
- package/vendor/7zip/CPP/7zip/UI/GUI/ExtractDialogRes.h +24 -0
- package/vendor/7zip/CPP/7zip/UI/GUI/ExtractGUI.cpp +297 -0
- package/vendor/7zip/CPP/7zip/UI/GUI/ExtractGUI.h +39 -0
- package/vendor/7zip/CPP/7zip/UI/GUI/ExtractRes.h +51 -0
- package/vendor/7zip/CPP/7zip/UI/GUI/FM.ico +0 -0
- package/vendor/7zip/CPP/7zip/UI/GUI/GUI.cpp +502 -0
- package/vendor/7zip/CPP/7zip/UI/GUI/GUI.dsp +1275 -0
- package/vendor/7zip/CPP/7zip/UI/GUI/GUI.dsw +29 -0
- package/vendor/7zip/CPP/7zip/UI/GUI/HashGUI.cpp +341 -0
- package/vendor/7zip/CPP/7zip/UI/GUI/HashGUI.h +27 -0
- package/vendor/7zip/CPP/7zip/UI/GUI/StdAfx.cpp +3 -0
- package/vendor/7zip/CPP/7zip/UI/GUI/StdAfx.h +6 -0
- package/vendor/7zip/CPP/7zip/UI/GUI/UpdateCallbackGUI.cpp +295 -0
- package/vendor/7zip/CPP/7zip/UI/GUI/UpdateCallbackGUI.h +31 -0
- package/vendor/7zip/CPP/7zip/UI/GUI/UpdateCallbackGUI2.cpp +130 -0
- package/vendor/7zip/CPP/7zip/UI/GUI/UpdateCallbackGUI2.h +53 -0
- package/vendor/7zip/CPP/7zip/UI/GUI/UpdateGUI.cpp +605 -0
- package/vendor/7zip/CPP/7zip/UI/GUI/UpdateGUI.h +33 -0
- package/vendor/7zip/CPP/7zip/UI/GUI/makefile +148 -0
- package/vendor/7zip/CPP/7zip/UI/GUI/resource.rc +26 -0
- package/vendor/7zip/CPP/7zip/UI/GUI/resource2.h +2 -0
- package/vendor/7zip/CPP/7zip/UI/GUI/resource2.rc +10 -0
- package/vendor/7zip/CPP/7zip/UI/GUI/resource3.h +10 -0
- package/vendor/7zip/CPP/7zip/UI/GUI/resource3.rc +15 -0
- package/vendor/7zip/CPP/7zip/UI/makefile +12 -0
- package/vendor/7zip/CPP/7zip/cmpl_clang.mak +3 -0
- package/vendor/7zip/CPP/7zip/cmpl_clang_arm64.mak +3 -0
- package/vendor/7zip/CPP/7zip/cmpl_clang_x64.mak +3 -0
- package/vendor/7zip/CPP/7zip/cmpl_clang_x86.mak +3 -0
- package/vendor/7zip/CPP/7zip/cmpl_gcc.mak +3 -0
- package/vendor/7zip/CPP/7zip/cmpl_gcc_arm.mak +3 -0
- package/vendor/7zip/CPP/7zip/cmpl_gcc_arm64.mak +3 -0
- package/vendor/7zip/CPP/7zip/cmpl_gcc_x64.mak +3 -0
- package/vendor/7zip/CPP/7zip/cmpl_gcc_x86.mak +3 -0
- package/vendor/7zip/CPP/7zip/cmpl_mac_arm64.mak +3 -0
- package/vendor/7zip/CPP/7zip/cmpl_mac_x64.mak +3 -0
- package/vendor/7zip/CPP/7zip/makefile +10 -0
- package/vendor/7zip/CPP/7zip/var_clang.mak +11 -0
- package/vendor/7zip/CPP/7zip/var_clang_arm64.mak +19 -0
- package/vendor/7zip/CPP/7zip/var_clang_x64.mak +11 -0
- package/vendor/7zip/CPP/7zip/var_clang_x86.mak +11 -0
- package/vendor/7zip/CPP/7zip/var_gcc.mak +12 -0
- package/vendor/7zip/CPP/7zip/var_gcc_arm.mak +34 -0
- package/vendor/7zip/CPP/7zip/var_gcc_arm64.mak +12 -0
- package/vendor/7zip/CPP/7zip/var_gcc_x64.mak +11 -0
- package/vendor/7zip/CPP/7zip/var_gcc_x86.mak +10 -0
- package/vendor/7zip/CPP/7zip/var_mac_arm64.mak +13 -0
- package/vendor/7zip/CPP/7zip/var_mac_x64.mak +13 -0
- package/vendor/7zip/CPP/7zip/warn_clang.mak +3 -0
- package/vendor/7zip/CPP/7zip/warn_clang_mac.mak +9 -0
- package/vendor/7zip/CPP/7zip/warn_gcc.mak +55 -0
- package/vendor/7zip/CPP/Build.mak +259 -0
- package/vendor/7zip/CPP/Common/AutoPtr.h +46 -0
- package/vendor/7zip/CPP/Common/CRC.cpp +7 -0
- package/vendor/7zip/CPP/Common/C_FileIO.cpp +3 -0
- package/vendor/7zip/CPP/Common/C_FileIO.h +6 -0
- package/vendor/7zip/CPP/Common/CksumReg.cpp +55 -0
- package/vendor/7zip/CPP/Common/ComTry.h +21 -0
- package/vendor/7zip/CPP/Common/CommandLineParser.cpp +231 -0
- package/vendor/7zip/CPP/Common/CommandLineParser.h +63 -0
- package/vendor/7zip/CPP/Common/Common.h +28 -0
- package/vendor/7zip/CPP/Common/Common0.h +342 -0
- package/vendor/7zip/CPP/Common/CrcReg.cpp +77 -0
- package/vendor/7zip/CPP/Common/Defs.h +16 -0
- package/vendor/7zip/CPP/Common/DynLimBuf.cpp +93 -0
- package/vendor/7zip/CPP/Common/DynLimBuf.h +41 -0
- package/vendor/7zip/CPP/Common/DynamicBuffer.h +76 -0
- package/vendor/7zip/CPP/Common/IntToString.cpp +215 -0
- package/vendor/7zip/CPP/Common/IntToString.h +54 -0
- package/vendor/7zip/CPP/Common/Lang.cpp +173 -0
- package/vendor/7zip/CPP/Common/Lang.h +30 -0
- package/vendor/7zip/CPP/Common/ListFileUtils.cpp +150 -0
- package/vendor/7zip/CPP/Common/ListFileUtils.h +18 -0
- package/vendor/7zip/CPP/Common/LzFindPrepare.cpp +7 -0
- package/vendor/7zip/CPP/Common/Md5Reg.cpp +44 -0
- package/vendor/7zip/CPP/Common/MyBuffer.h +343 -0
- package/vendor/7zip/CPP/Common/MyBuffer2.h +185 -0
- package/vendor/7zip/CPP/Common/MyCom.h +693 -0
- package/vendor/7zip/CPP/Common/MyException.h +14 -0
- package/vendor/7zip/CPP/Common/MyGuidDef.h +63 -0
- package/vendor/7zip/CPP/Common/MyInitGuid.h +57 -0
- package/vendor/7zip/CPP/Common/MyLinux.h +75 -0
- package/vendor/7zip/CPP/Common/MyMap.cpp +140 -0
- package/vendor/7zip/CPP/Common/MyMap.h +28 -0
- package/vendor/7zip/CPP/Common/MyString.cpp +1842 -0
- package/vendor/7zip/CPP/Common/MyString.h +1079 -0
- package/vendor/7zip/CPP/Common/MyTypes.h +38 -0
- package/vendor/7zip/CPP/Common/MyUnknown.h +8 -0
- package/vendor/7zip/CPP/Common/MyVector.cpp +3 -0
- package/vendor/7zip/CPP/Common/MyVector.h +772 -0
- package/vendor/7zip/CPP/Common/MyWindows.cpp +292 -0
- package/vendor/7zip/CPP/Common/MyWindows.h +325 -0
- package/vendor/7zip/CPP/Common/MyXml.cpp +349 -0
- package/vendor/7zip/CPP/Common/MyXml.h +45 -0
- package/vendor/7zip/CPP/Common/NewHandler.cpp +340 -0
- package/vendor/7zip/CPP/Common/NewHandler.h +121 -0
- package/vendor/7zip/CPP/Common/Random.cpp +28 -0
- package/vendor/7zip/CPP/Common/Random.h +14 -0
- package/vendor/7zip/CPP/Common/Sha1Prepare.cpp +7 -0
- package/vendor/7zip/CPP/Common/Sha1Reg.cpp +67 -0
- package/vendor/7zip/CPP/Common/Sha256Prepare.cpp +7 -0
- package/vendor/7zip/CPP/Common/Sha256Reg.cpp +67 -0
- package/vendor/7zip/CPP/Common/Sha3Reg.cpp +76 -0
- package/vendor/7zip/CPP/Common/Sha512Prepare.cpp +7 -0
- package/vendor/7zip/CPP/Common/Sha512Reg.cpp +83 -0
- package/vendor/7zip/CPP/Common/StdAfx.h +8 -0
- package/vendor/7zip/CPP/Common/StdInStream.cpp +98 -0
- package/vendor/7zip/CPP/Common/StdInStream.h +46 -0
- package/vendor/7zip/CPP/Common/StdOutStream.cpp +271 -0
- package/vendor/7zip/CPP/Common/StdOutStream.h +87 -0
- package/vendor/7zip/CPP/Common/StringConvert.cpp +762 -0
- package/vendor/7zip/CPP/Common/StringConvert.h +110 -0
- package/vendor/7zip/CPP/Common/StringToInt.cpp +154 -0
- package/vendor/7zip/CPP/Common/StringToInt.h +38 -0
- package/vendor/7zip/CPP/Common/TextConfig.cpp +123 -0
- package/vendor/7zip/CPP/Common/TextConfig.h +19 -0
- package/vendor/7zip/CPP/Common/UTFConvert.cpp +863 -0
- package/vendor/7zip/CPP/Common/UTFConvert.h +384 -0
- package/vendor/7zip/CPP/Common/Wildcard.cpp +789 -0
- package/vendor/7zip/CPP/Common/Wildcard.h +231 -0
- package/vendor/7zip/CPP/Common/Xxh64Reg.cpp +97 -0
- package/vendor/7zip/CPP/Common/XzCrc64Init.cpp +7 -0
- package/vendor/7zip/CPP/Common/XzCrc64Reg.cpp +39 -0
- package/vendor/7zip/CPP/Windows/COM.cpp +41 -0
- package/vendor/7zip/CPP/Windows/COM.h +86 -0
- package/vendor/7zip/CPP/Windows/Clipboard.cpp +130 -0
- package/vendor/7zip/CPP/Windows/Clipboard.h +28 -0
- package/vendor/7zip/CPP/Windows/CommonDialog.cpp +269 -0
- package/vendor/7zip/CPP/Windows/CommonDialog.h +43 -0
- package/vendor/7zip/CPP/Windows/Console.cpp +10 -0
- package/vendor/7zip/CPP/Windows/Console.h +52 -0
- package/vendor/7zip/CPP/Windows/Control/ComboBox.cpp +75 -0
- package/vendor/7zip/CPP/Windows/Control/ComboBox.h +79 -0
- package/vendor/7zip/CPP/Windows/Control/CommandBar.h +52 -0
- package/vendor/7zip/CPP/Windows/Control/Dialog.cpp +446 -0
- package/vendor/7zip/CPP/Windows/Control/Dialog.h +213 -0
- package/vendor/7zip/CPP/Windows/Control/Edit.h +19 -0
- package/vendor/7zip/CPP/Windows/Control/ImageList.cpp +10 -0
- package/vendor/7zip/CPP/Windows/Control/ImageList.h +87 -0
- package/vendor/7zip/CPP/Windows/Control/ListView.cpp +162 -0
- package/vendor/7zip/CPP/Windows/Control/ListView.h +156 -0
- package/vendor/7zip/CPP/Windows/Control/ProgressBar.h +35 -0
- package/vendor/7zip/CPP/Windows/Control/PropertyPage.cpp +165 -0
- package/vendor/7zip/CPP/Windows/Control/PropertyPage.h +50 -0
- package/vendor/7zip/CPP/Windows/Control/ReBar.h +34 -0
- package/vendor/7zip/CPP/Windows/Control/Static.h +28 -0
- package/vendor/7zip/CPP/Windows/Control/StatusBar.h +42 -0
- package/vendor/7zip/CPP/Windows/Control/StdAfx.h +11 -0
- package/vendor/7zip/CPP/Windows/Control/ToolBar.h +43 -0
- package/vendor/7zip/CPP/Windows/Control/Trackbar.h +27 -0
- package/vendor/7zip/CPP/Windows/Control/Window2.cpp +202 -0
- package/vendor/7zip/CPP/Windows/Control/Window2.h +53 -0
- package/vendor/7zip/CPP/Windows/DLL.cpp +178 -0
- package/vendor/7zip/CPP/Windows/DLL.h +103 -0
- package/vendor/7zip/CPP/Windows/ErrorMsg.cpp +133 -0
- package/vendor/7zip/CPP/Windows/ErrorMsg.h +16 -0
- package/vendor/7zip/CPP/Windows/FileDir.cpp +1388 -0
- package/vendor/7zip/CPP/Windows/FileDir.h +173 -0
- package/vendor/7zip/CPP/Windows/FileFind.cpp +1458 -0
- package/vendor/7zip/CPP/Windows/FileFind.h +345 -0
- package/vendor/7zip/CPP/Windows/FileIO.cpp +1188 -0
- package/vendor/7zip/CPP/Windows/FileIO.h +508 -0
- package/vendor/7zip/CPP/Windows/FileLink.cpp +697 -0
- package/vendor/7zip/CPP/Windows/FileMapping.cpp +12 -0
- package/vendor/7zip/CPP/Windows/FileMapping.h +66 -0
- package/vendor/7zip/CPP/Windows/FileName.cpp +911 -0
- package/vendor/7zip/CPP/Windows/FileName.h +142 -0
- package/vendor/7zip/CPP/Windows/FileSystem.cpp +187 -0
- package/vendor/7zip/CPP/Windows/FileSystem.h +31 -0
- package/vendor/7zip/CPP/Windows/Handle.h +39 -0
- package/vendor/7zip/CPP/Windows/MemoryGlobal.cpp +36 -0
- package/vendor/7zip/CPP/Windows/MemoryGlobal.h +55 -0
- package/vendor/7zip/CPP/Windows/MemoryLock.cpp +127 -0
- package/vendor/7zip/CPP/Windows/MemoryLock.h +40 -0
- package/vendor/7zip/CPP/Windows/Menu.cpp +265 -0
- package/vendor/7zip/CPP/Windows/Menu.h +170 -0
- package/vendor/7zip/CPP/Windows/NationalTime.cpp +37 -0
- package/vendor/7zip/CPP/Windows/NationalTime.h +20 -0
- package/vendor/7zip/CPP/Windows/Net.cpp +398 -0
- package/vendor/7zip/CPP/Windows/Net.h +87 -0
- package/vendor/7zip/CPP/Windows/NtCheck.h +58 -0
- package/vendor/7zip/CPP/Windows/ProcessMessages.cpp +22 -0
- package/vendor/7zip/CPP/Windows/ProcessMessages.h +12 -0
- package/vendor/7zip/CPP/Windows/ProcessUtils.cpp +102 -0
- package/vendor/7zip/CPP/Windows/ProcessUtils.h +138 -0
- package/vendor/7zip/CPP/Windows/PropVariant.cpp +393 -0
- package/vendor/7zip/CPP/Windows/PropVariant.h +173 -0
- package/vendor/7zip/CPP/Windows/PropVariantConv.cpp +274 -0
- package/vendor/7zip/CPP/Windows/PropVariantConv.h +47 -0
- package/vendor/7zip/CPP/Windows/PropVariantUtils.cpp +161 -0
- package/vendor/7zip/CPP/Windows/PropVariantUtils.h +34 -0
- package/vendor/7zip/CPP/Windows/Registry.cpp +474 -0
- package/vendor/7zip/CPP/Windows/Registry.h +96 -0
- package/vendor/7zip/CPP/Windows/ResourceString.cpp +103 -0
- package/vendor/7zip/CPP/Windows/ResourceString.h +17 -0
- package/vendor/7zip/CPP/Windows/SecurityUtils.cpp +186 -0
- package/vendor/7zip/CPP/Windows/SecurityUtils.h +154 -0
- package/vendor/7zip/CPP/Windows/Shell.cpp +839 -0
- package/vendor/7zip/CPP/Windows/Shell.h +129 -0
- package/vendor/7zip/CPP/Windows/StdAfx.h +11 -0
- package/vendor/7zip/CPP/Windows/Synchronization.cpp +87 -0
- package/vendor/7zip/CPP/Windows/Synchronization.h +386 -0
- package/vendor/7zip/CPP/Windows/System.cpp +423 -0
- package/vendor/7zip/CPP/Windows/System.h +209 -0
- package/vendor/7zip/CPP/Windows/SystemInfo.cpp +1312 -0
- package/vendor/7zip/CPP/Windows/SystemInfo.h +19 -0
- package/vendor/7zip/CPP/Windows/Thread.h +46 -0
- package/vendor/7zip/CPP/Windows/TimeUtils.cpp +467 -0
- package/vendor/7zip/CPP/Windows/TimeUtils.h +154 -0
- package/vendor/7zip/CPP/Windows/WinDefs.h +17 -0
- package/vendor/7zip/CPP/Windows/Window.cpp +179 -0
- package/vendor/7zip/CPP/Windows/Window.h +363 -0
- package/vendor/7zip/DOC/7zC.txt +187 -0
- package/vendor/7zip/DOC/7zFormat.txt +469 -0
- package/vendor/7zip/DOC/7zip.hhp +84 -0
- package/vendor/7zip/DOC/7zip.wxs +403 -0
- package/vendor/7zip/DOC/License.txt +151 -0
- package/vendor/7zip/DOC/Methods.txt +177 -0
- package/vendor/7zip/DOC/copying.txt +502 -0
- package/vendor/7zip/DOC/lzma.txt +345 -0
- package/vendor/7zip/DOC/readme.txt +299 -0
- package/vendor/7zip/DOC/src-history.txt +884 -0
- package/vendor/7zip/DOC/unRarLicense.txt +41 -0
- package/vendor/7zip/README.md +2 -0
|
@@ -0,0 +1,3821 @@
|
|
|
1
|
+
// CompressDialog.cpp
|
|
2
|
+
|
|
3
|
+
#include "StdAfx.h"
|
|
4
|
+
|
|
5
|
+
#include "../../../../C/CpuArch.h"
|
|
6
|
+
|
|
7
|
+
#include "../../../Common/IntToString.h"
|
|
8
|
+
#include "../../../Common/StringConvert.h"
|
|
9
|
+
|
|
10
|
+
#include "../../../Windows/FileDir.h"
|
|
11
|
+
#include "../../../Windows/FileName.h"
|
|
12
|
+
#include "../../../Windows/System.h"
|
|
13
|
+
|
|
14
|
+
#include "../../Common/MethodProps.h"
|
|
15
|
+
|
|
16
|
+
#include "../FileManager/BrowseDialog.h"
|
|
17
|
+
#include "../FileManager/FormatUtils.h"
|
|
18
|
+
#include "../FileManager/HelpUtils.h"
|
|
19
|
+
#include "../FileManager/PropertyName.h"
|
|
20
|
+
#include "../FileManager/SplitUtils.h"
|
|
21
|
+
#include "../FileManager/resourceGui.h"
|
|
22
|
+
|
|
23
|
+
#include "../Explorer/MyMessages.h"
|
|
24
|
+
|
|
25
|
+
#include "../Common/ZipRegistry.h"
|
|
26
|
+
|
|
27
|
+
#include "CompressDialog.h"
|
|
28
|
+
|
|
29
|
+
#ifndef _UNICODE
|
|
30
|
+
extern bool g_IsNT;
|
|
31
|
+
#endif
|
|
32
|
+
|
|
33
|
+
#include "../FileManager/LangUtils.h"
|
|
34
|
+
|
|
35
|
+
#include "CompressDialogRes.h"
|
|
36
|
+
#include "ExtractRes.h"
|
|
37
|
+
#include "resource2.h"
|
|
38
|
+
|
|
39
|
+
// #define PRINT_PARAMS
|
|
40
|
+
|
|
41
|
+
#ifdef Z7_LANG
|
|
42
|
+
|
|
43
|
+
// #define IDS_OPTIONS 2100
|
|
44
|
+
|
|
45
|
+
static const UInt32 kLangIDs[] =
|
|
46
|
+
{
|
|
47
|
+
IDT_COMPRESS_ARCHIVE,
|
|
48
|
+
IDT_COMPRESS_UPDATE_MODE,
|
|
49
|
+
IDT_COMPRESS_FORMAT,
|
|
50
|
+
IDT_COMPRESS_LEVEL,
|
|
51
|
+
IDT_COMPRESS_METHOD,
|
|
52
|
+
IDT_COMPRESS_DICTIONARY,
|
|
53
|
+
IDT_COMPRESS_ORDER,
|
|
54
|
+
IDT_COMPRESS_SOLID,
|
|
55
|
+
IDT_COMPRESS_THREADS,
|
|
56
|
+
IDT_COMPRESS_PARAMETERS,
|
|
57
|
+
|
|
58
|
+
IDB_COMPRESS_OPTIONS, // IDS_OPTIONS
|
|
59
|
+
|
|
60
|
+
IDG_COMPRESS_OPTIONS,
|
|
61
|
+
IDX_COMPRESS_SFX,
|
|
62
|
+
IDX_COMPRESS_SHARED,
|
|
63
|
+
IDX_COMPRESS_DEL,
|
|
64
|
+
|
|
65
|
+
IDT_COMPRESS_MEMORY,
|
|
66
|
+
IDT_COMPRESS_MEMORY_DE,
|
|
67
|
+
|
|
68
|
+
IDG_COMPRESS_ENCRYPTION,
|
|
69
|
+
IDT_COMPRESS_ENCRYPTION_METHOD,
|
|
70
|
+
IDX_COMPRESS_ENCRYPT_FILE_NAMES,
|
|
71
|
+
|
|
72
|
+
IDT_PASSWORD_ENTER,
|
|
73
|
+
IDT_PASSWORD_REENTER,
|
|
74
|
+
IDX_PASSWORD_SHOW,
|
|
75
|
+
|
|
76
|
+
IDT_SPLIT_TO_VOLUMES,
|
|
77
|
+
IDT_COMPRESS_PATH_MODE,
|
|
78
|
+
};
|
|
79
|
+
#endif
|
|
80
|
+
|
|
81
|
+
using namespace NWindows;
|
|
82
|
+
using namespace NFile;
|
|
83
|
+
using namespace NName;
|
|
84
|
+
using namespace NDir;
|
|
85
|
+
|
|
86
|
+
static const unsigned kHistorySize = 20;
|
|
87
|
+
|
|
88
|
+
static const UInt32 kSolidLog_NoSolid = 0;
|
|
89
|
+
static const UInt32 kSolidLog_FullSolid = 64;
|
|
90
|
+
|
|
91
|
+
static const UInt32 kLzmaMaxDictSize = (UInt32)15 << 28;
|
|
92
|
+
|
|
93
|
+
static const UINT k_Message_ArcChanged = WM_APP + 1;
|
|
94
|
+
|
|
95
|
+
/*
|
|
96
|
+
static const UInt32 kZstd_MAX_DictSize = (UInt32)1 << MY_ZSTD_WINDOWLOG_MAX;
|
|
97
|
+
*/
|
|
98
|
+
|
|
99
|
+
/* The top value for windowLog_Chain:
|
|
100
|
+
(MY_ZSTD_CHAINLOG_MAX - 1): in BT mode
|
|
101
|
+
(MY_ZSTD_CHAINLOG_MAX) : in non-BT mode. But such big value is useless in most cases.
|
|
102
|
+
So we always reduce top value to (MY_ZSTD_CHAINLOG_MAX - 1) */
|
|
103
|
+
/*
|
|
104
|
+
static const unsigned kMaxDictChain = MY_ZSTD_CHAINLOG_MAX - 1;
|
|
105
|
+
static const UInt32 kZstd_MAX_DictSize_Chain = (UInt32)1 << kMaxDictChain;
|
|
106
|
+
*/
|
|
107
|
+
|
|
108
|
+
static LPCSTR const kExeExt = ".exe";
|
|
109
|
+
|
|
110
|
+
static const UInt32 g_Levels[] =
|
|
111
|
+
{
|
|
112
|
+
IDS_METHOD_STORE,
|
|
113
|
+
IDS_METHOD_FASTEST,
|
|
114
|
+
0,
|
|
115
|
+
IDS_METHOD_FAST,
|
|
116
|
+
0,
|
|
117
|
+
IDS_METHOD_NORMAL,
|
|
118
|
+
0,
|
|
119
|
+
IDS_METHOD_MAXIMUM,
|
|
120
|
+
0,
|
|
121
|
+
IDS_METHOD_ULTRA
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
enum EMethodID
|
|
125
|
+
{
|
|
126
|
+
kCopy,
|
|
127
|
+
kLZMA,
|
|
128
|
+
kLZMA2,
|
|
129
|
+
kPPMd,
|
|
130
|
+
kBZip2,
|
|
131
|
+
kDeflate,
|
|
132
|
+
kDeflate64,
|
|
133
|
+
kPPMdZip,
|
|
134
|
+
// kZSTD,
|
|
135
|
+
kSha256,
|
|
136
|
+
kSha1,
|
|
137
|
+
kCrc32,
|
|
138
|
+
kCrc64,
|
|
139
|
+
kGnu,
|
|
140
|
+
kPosix
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
static LPCSTR const kMethodsNames[] =
|
|
144
|
+
{
|
|
145
|
+
"Copy"
|
|
146
|
+
, "LZMA"
|
|
147
|
+
, "LZMA2"
|
|
148
|
+
, "PPMd"
|
|
149
|
+
, "BZip2"
|
|
150
|
+
, "Deflate"
|
|
151
|
+
, "Deflate64"
|
|
152
|
+
, "PPMd"
|
|
153
|
+
// , "ZSTD"
|
|
154
|
+
, "SHA256"
|
|
155
|
+
, "SHA1"
|
|
156
|
+
, "CRC32"
|
|
157
|
+
, "CRC64"
|
|
158
|
+
, "GNU"
|
|
159
|
+
, "POSIX"
|
|
160
|
+
};
|
|
161
|
+
|
|
162
|
+
static const EMethodID g_7zMethods[] =
|
|
163
|
+
{
|
|
164
|
+
kLZMA2,
|
|
165
|
+
kLZMA,
|
|
166
|
+
kPPMd,
|
|
167
|
+
kBZip2
|
|
168
|
+
, kDeflate
|
|
169
|
+
, kDeflate64
|
|
170
|
+
// , kZSTD
|
|
171
|
+
, kCopy
|
|
172
|
+
};
|
|
173
|
+
|
|
174
|
+
static const EMethodID g_7zSfxMethods[] =
|
|
175
|
+
{
|
|
176
|
+
kCopy,
|
|
177
|
+
kLZMA,
|
|
178
|
+
kLZMA2,
|
|
179
|
+
kPPMd
|
|
180
|
+
};
|
|
181
|
+
|
|
182
|
+
static const EMethodID g_ZipMethods[] =
|
|
183
|
+
{
|
|
184
|
+
kDeflate,
|
|
185
|
+
kDeflate64,
|
|
186
|
+
kBZip2,
|
|
187
|
+
kLZMA,
|
|
188
|
+
kPPMdZip
|
|
189
|
+
// , kZSTD
|
|
190
|
+
};
|
|
191
|
+
|
|
192
|
+
static const EMethodID g_GZipMethods[] =
|
|
193
|
+
{
|
|
194
|
+
kDeflate
|
|
195
|
+
};
|
|
196
|
+
|
|
197
|
+
static const EMethodID g_BZip2Methods[] =
|
|
198
|
+
{
|
|
199
|
+
kBZip2
|
|
200
|
+
};
|
|
201
|
+
|
|
202
|
+
static const EMethodID g_XzMethods[] =
|
|
203
|
+
{
|
|
204
|
+
kLZMA2
|
|
205
|
+
};
|
|
206
|
+
|
|
207
|
+
/*
|
|
208
|
+
static const EMethodID g_ZstdMethods[] =
|
|
209
|
+
{
|
|
210
|
+
kZSTD
|
|
211
|
+
};
|
|
212
|
+
*/
|
|
213
|
+
|
|
214
|
+
/*
|
|
215
|
+
static const EMethodID g_SwfcMethods[] =
|
|
216
|
+
{
|
|
217
|
+
kDeflate
|
|
218
|
+
// kLZMA
|
|
219
|
+
};
|
|
220
|
+
*/
|
|
221
|
+
|
|
222
|
+
static const EMethodID g_TarMethods[] =
|
|
223
|
+
{
|
|
224
|
+
kGnu,
|
|
225
|
+
kPosix
|
|
226
|
+
};
|
|
227
|
+
|
|
228
|
+
static const EMethodID g_HashMethods[] =
|
|
229
|
+
{
|
|
230
|
+
kSha256
|
|
231
|
+
, kSha1
|
|
232
|
+
// , kCrc32
|
|
233
|
+
// , kCrc64
|
|
234
|
+
};
|
|
235
|
+
|
|
236
|
+
static const UInt32 kFF_Filter = 1 << 0;
|
|
237
|
+
static const UInt32 kFF_Solid = 1 << 1;
|
|
238
|
+
static const UInt32 kFF_MultiThread = 1 << 2;
|
|
239
|
+
static const UInt32 kFF_Encrypt = 1 << 3;
|
|
240
|
+
static const UInt32 kFF_EncryptFileNames = 1 << 4;
|
|
241
|
+
static const UInt32 kFF_MemUse = 1 << 5;
|
|
242
|
+
static const UInt32 kFF_SFX = 1 << 6;
|
|
243
|
+
|
|
244
|
+
/*
|
|
245
|
+
static const UInt32 kFF_Time_Win = 1 << 10;
|
|
246
|
+
static const UInt32 kFF_Time_Unix = 1 << 11;
|
|
247
|
+
static const UInt32 kFF_Time_DOS = 1 << 12;
|
|
248
|
+
static const UInt32 kFF_Time_1ns = 1 << 13;
|
|
249
|
+
*/
|
|
250
|
+
|
|
251
|
+
struct CFormatInfo
|
|
252
|
+
{
|
|
253
|
+
LPCSTR Name;
|
|
254
|
+
UInt32 LevelsMask;
|
|
255
|
+
unsigned NumMethods;
|
|
256
|
+
const EMethodID *MethodIDs;
|
|
257
|
+
|
|
258
|
+
UInt32 Flags;
|
|
259
|
+
|
|
260
|
+
bool Filter_() const { return (Flags & kFF_Filter) != 0; }
|
|
261
|
+
bool Solid_() const { return (Flags & kFF_Solid) != 0; }
|
|
262
|
+
bool MultiThread_() const { return (Flags & kFF_MultiThread) != 0; }
|
|
263
|
+
bool Encrypt_() const { return (Flags & kFF_Encrypt) != 0; }
|
|
264
|
+
bool EncryptFileNames_() const { return (Flags & kFF_EncryptFileNames) != 0; }
|
|
265
|
+
bool MemUse_() const { return (Flags & kFF_MemUse) != 0; }
|
|
266
|
+
bool SFX_() const { return (Flags & kFF_SFX) != 0; }
|
|
267
|
+
};
|
|
268
|
+
|
|
269
|
+
#define METHODS_PAIR(x) Z7_ARRAY_SIZE(x), x
|
|
270
|
+
|
|
271
|
+
static const CFormatInfo g_Formats[] =
|
|
272
|
+
{
|
|
273
|
+
{
|
|
274
|
+
"",
|
|
275
|
+
// (1 << 0) | (1 << 1) | (1 << 3) | (1 << 5) | (1 << 7) | (1 << 9),
|
|
276
|
+
((UInt32)1 << 10) - 1,
|
|
277
|
+
// (UInt32)(Int32)-1,
|
|
278
|
+
0, NULL,
|
|
279
|
+
kFF_MultiThread | kFF_MemUse
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
"7z",
|
|
283
|
+
// (1 << 0) | (1 << 1) | (1 << 3) | (1 << 5) | (1 << 7) | (1 << 9),
|
|
284
|
+
(1 << 10) - 1,
|
|
285
|
+
METHODS_PAIR(g_7zMethods),
|
|
286
|
+
kFF_Filter | kFF_Solid | kFF_MultiThread | kFF_Encrypt |
|
|
287
|
+
kFF_EncryptFileNames | kFF_MemUse | kFF_SFX
|
|
288
|
+
// | kFF_Time_Win
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
"Zip",
|
|
292
|
+
(1 << 0) | (1 << 1) | (1 << 3) | (1 << 5) | (1 << 7) | (1 << 9),
|
|
293
|
+
METHODS_PAIR(g_ZipMethods),
|
|
294
|
+
kFF_MultiThread | kFF_Encrypt | kFF_MemUse
|
|
295
|
+
// | kFF_Time_Win | kFF_Time_Unix | kFF_Time_DOS
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
"GZip",
|
|
299
|
+
(1 << 1) | (1 << 5) | (1 << 7) | (1 << 9),
|
|
300
|
+
METHODS_PAIR(g_GZipMethods),
|
|
301
|
+
kFF_MemUse
|
|
302
|
+
// | kFF_Time_Unix
|
|
303
|
+
},
|
|
304
|
+
{
|
|
305
|
+
"BZip2",
|
|
306
|
+
(1 << 1) | (1 << 3) | (1 << 5) | (1 << 7) | (1 << 9),
|
|
307
|
+
METHODS_PAIR(g_BZip2Methods),
|
|
308
|
+
kFF_MultiThread | kFF_MemUse
|
|
309
|
+
},
|
|
310
|
+
{
|
|
311
|
+
"xz",
|
|
312
|
+
// (1 << 1) | (1 << 3) | (1 << 5) | (1 << 7) | (1 << 9),
|
|
313
|
+
(1 << 10) - 1 - (1 << 0), // store (1 << 0) is not supported
|
|
314
|
+
METHODS_PAIR(g_XzMethods),
|
|
315
|
+
kFF_Solid | kFF_MultiThread | kFF_MemUse
|
|
316
|
+
},
|
|
317
|
+
/*
|
|
318
|
+
{
|
|
319
|
+
"zstd",
|
|
320
|
+
// (1 << (MY_ZSTD_LEVEL_MAX + 1)) - 1,
|
|
321
|
+
(1 << (9 + 1)) - 1,
|
|
322
|
+
METHODS_PAIR(g_ZstdMethods),
|
|
323
|
+
// kFF_Solid |
|
|
324
|
+
kFF_MultiThread
|
|
325
|
+
| kFF_MemUse
|
|
326
|
+
},
|
|
327
|
+
*/
|
|
328
|
+
/*
|
|
329
|
+
{
|
|
330
|
+
"Swfc",
|
|
331
|
+
(1 << 1) | (1 << 3) | (1 << 5) | (1 << 7) | (1 << 9),
|
|
332
|
+
METHODS_PAIR(g_SwfcMethods),
|
|
333
|
+
0
|
|
334
|
+
},
|
|
335
|
+
*/
|
|
336
|
+
{
|
|
337
|
+
"Tar",
|
|
338
|
+
(1 << 0),
|
|
339
|
+
METHODS_PAIR(g_TarMethods),
|
|
340
|
+
0
|
|
341
|
+
// kFF_Time_Unix | kFF_Time_Win // | kFF_Time_1ns
|
|
342
|
+
},
|
|
343
|
+
{
|
|
344
|
+
"wim",
|
|
345
|
+
(1 << 0),
|
|
346
|
+
0, NULL,
|
|
347
|
+
0
|
|
348
|
+
// | kFF_Time_Win
|
|
349
|
+
},
|
|
350
|
+
{
|
|
351
|
+
"Hash",
|
|
352
|
+
(0 << 0),
|
|
353
|
+
METHODS_PAIR(g_HashMethods),
|
|
354
|
+
0
|
|
355
|
+
}
|
|
356
|
+
};
|
|
357
|
+
|
|
358
|
+
static bool IsMethodSupportedBySfx(int methodID)
|
|
359
|
+
{
|
|
360
|
+
for (unsigned i = 0; i < Z7_ARRAY_SIZE(g_7zSfxMethods); i++)
|
|
361
|
+
if (methodID == g_7zSfxMethods[i])
|
|
362
|
+
return true;
|
|
363
|
+
return false;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
|
|
367
|
+
static const
|
|
368
|
+
// NCompressDialog::NUpdateMode::EEnum
|
|
369
|
+
int
|
|
370
|
+
k_UpdateMode_Vals[] =
|
|
371
|
+
{
|
|
372
|
+
NCompressDialog::NUpdateMode::kAdd,
|
|
373
|
+
NCompressDialog::NUpdateMode::kUpdate,
|
|
374
|
+
NCompressDialog::NUpdateMode::kFresh,
|
|
375
|
+
NCompressDialog::NUpdateMode::kSync
|
|
376
|
+
};
|
|
377
|
+
|
|
378
|
+
static const UInt32 k_UpdateMode_IDs[] =
|
|
379
|
+
{
|
|
380
|
+
IDS_COMPRESS_UPDATE_MODE_ADD,
|
|
381
|
+
IDS_COMPRESS_UPDATE_MODE_UPDATE,
|
|
382
|
+
IDS_COMPRESS_UPDATE_MODE_FRESH,
|
|
383
|
+
IDS_COMPRESS_UPDATE_MODE_SYNC
|
|
384
|
+
};
|
|
385
|
+
|
|
386
|
+
static const
|
|
387
|
+
// NWildcard::ECensorPathMode
|
|
388
|
+
int
|
|
389
|
+
k_PathMode_Vals[] =
|
|
390
|
+
{
|
|
391
|
+
NWildcard::k_RelatPath,
|
|
392
|
+
NWildcard::k_FullPath,
|
|
393
|
+
NWildcard::k_AbsPath,
|
|
394
|
+
};
|
|
395
|
+
|
|
396
|
+
static const UInt32 k_PathMode_IDs[] =
|
|
397
|
+
{
|
|
398
|
+
IDS_PATH_MODE_RELAT,
|
|
399
|
+
IDS_EXTRACT_PATHS_FULL,
|
|
400
|
+
IDS_EXTRACT_PATHS_ABS
|
|
401
|
+
};
|
|
402
|
+
|
|
403
|
+
void AddComboItems(NControl::CComboBox &combo, const UInt32 *langIDs, unsigned numItems, const int *values, int curVal);
|
|
404
|
+
|
|
405
|
+
void CCompressDialog::SetMethods(const CObjectVector<CCodecInfoUser> &userCodecs)
|
|
406
|
+
{
|
|
407
|
+
ExternalMethods.Clear();
|
|
408
|
+
{
|
|
409
|
+
FOR_VECTOR (i, userCodecs)
|
|
410
|
+
{
|
|
411
|
+
const CCodecInfoUser &c = userCodecs[i];
|
|
412
|
+
if (!c.EncoderIsAssigned
|
|
413
|
+
|| !c.IsFilter_Assigned
|
|
414
|
+
|| c.IsFilter
|
|
415
|
+
|| c.NumStreams != 1)
|
|
416
|
+
continue;
|
|
417
|
+
unsigned k;
|
|
418
|
+
for (k = 0; k < Z7_ARRAY_SIZE(g_7zMethods); k++)
|
|
419
|
+
if (c.Name.IsEqualTo_Ascii_NoCase(kMethodsNames[g_7zMethods[k]]))
|
|
420
|
+
break;
|
|
421
|
+
if (k != Z7_ARRAY_SIZE(g_7zMethods))
|
|
422
|
+
continue;
|
|
423
|
+
ExternalMethods.Add(c.Name);
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
|
|
429
|
+
bool CCompressDialog::OnInit()
|
|
430
|
+
{
|
|
431
|
+
#ifdef Z7_LANG
|
|
432
|
+
LangSetWindowText(*this, IDD_COMPRESS);
|
|
433
|
+
LangSetDlgItems(*this, kLangIDs, Z7_ARRAY_SIZE(kLangIDs));
|
|
434
|
+
// LangSetDlgItemText(*this, IDB_COMPRESS_OPTIONS, IDS_OPTIONS); // IDG_COMPRESS_OPTIONS
|
|
435
|
+
#endif
|
|
436
|
+
|
|
437
|
+
{
|
|
438
|
+
size_t size = (size_t)sizeof(size_t) << 29;
|
|
439
|
+
_ramSize_Defined = NSystem::GetRamSize(size);
|
|
440
|
+
// size = (UInt64)3 << 62; // for debug only;
|
|
441
|
+
{
|
|
442
|
+
// we use reduced limit for 32-bit version:
|
|
443
|
+
unsigned bits = sizeof(size_t) * 8;
|
|
444
|
+
if (bits == 32)
|
|
445
|
+
{
|
|
446
|
+
const UInt32 limit2 = (UInt32)7 << 28;
|
|
447
|
+
if (size > limit2)
|
|
448
|
+
size = limit2;
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
_ramSize = size;
|
|
452
|
+
const size_t kMinUseSize = 1 << 26;
|
|
453
|
+
if (size < kMinUseSize)
|
|
454
|
+
size = kMinUseSize;
|
|
455
|
+
_ramSize_Reduced = size;
|
|
456
|
+
|
|
457
|
+
// 80% - is auto usage limit in handlers
|
|
458
|
+
_ramUsage_Auto = Calc_From_Val_Percents(size, 80);
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
_password1Control.Attach(GetItem(IDE_COMPRESS_PASSWORD1));
|
|
462
|
+
_password2Control.Attach(GetItem(IDE_COMPRESS_PASSWORD2));
|
|
463
|
+
_password1Control.SetText(Info.Password);
|
|
464
|
+
_password2Control.SetText(Info.Password);
|
|
465
|
+
_encryptionMethod.Attach(GetItem(IDC_COMPRESS_ENCRYPTION_METHOD));
|
|
466
|
+
_default_encryptionMethod_Index = -1;
|
|
467
|
+
|
|
468
|
+
m_ArchivePath.Attach(GetItem(IDC_COMPRESS_ARCHIVE));
|
|
469
|
+
m_Format.Attach(GetItem(IDC_COMPRESS_FORMAT)); // that combo has CBS_SORT style in resources
|
|
470
|
+
m_Level.Attach(GetItem(IDC_COMPRESS_LEVEL));
|
|
471
|
+
m_Method.Attach(GetItem(IDC_COMPRESS_METHOD));
|
|
472
|
+
m_Dictionary.Attach(GetItem(IDC_COMPRESS_DICTIONARY));
|
|
473
|
+
|
|
474
|
+
/*
|
|
475
|
+
{
|
|
476
|
+
RECT r;
|
|
477
|
+
GetClientRectOfItem(IDC_COMPRESS_DICTIONARY, r);
|
|
478
|
+
_dictionaryCombo_left = r.left;
|
|
479
|
+
}
|
|
480
|
+
*/
|
|
481
|
+
_dictionaryCombo_left = 0; // 230;
|
|
482
|
+
|
|
483
|
+
// m_Dictionary_Chain.Attach(GetItem(IDC_COMPRESS_DICTIONARY2));
|
|
484
|
+
m_Order.Attach(GetItem(IDC_COMPRESS_ORDER));
|
|
485
|
+
m_Solid.Attach(GetItem(IDC_COMPRESS_SOLID));
|
|
486
|
+
m_NumThreads.Attach(GetItem(IDC_COMPRESS_THREADS));
|
|
487
|
+
m_MemUse.Attach(GetItem(IDC_COMPRESS_MEM_USE));
|
|
488
|
+
|
|
489
|
+
m_UpdateMode.Attach(GetItem(IDC_COMPRESS_UPDATE_MODE));
|
|
490
|
+
m_PathMode.Attach(GetItem(IDC_COMPRESS_PATH_MODE));
|
|
491
|
+
|
|
492
|
+
m_Volume.Attach(GetItem(IDC_COMPRESS_VOLUME));
|
|
493
|
+
m_Params.Attach(GetItem(IDE_COMPRESS_PARAMETERS));
|
|
494
|
+
|
|
495
|
+
AddVolumeItems(m_Volume);
|
|
496
|
+
|
|
497
|
+
m_RegistryInfo.Load();
|
|
498
|
+
CheckButton(IDX_PASSWORD_SHOW, m_RegistryInfo.ShowPassword);
|
|
499
|
+
CheckButton(IDX_COMPRESS_ENCRYPT_FILE_NAMES, m_RegistryInfo.EncryptHeaders);
|
|
500
|
+
|
|
501
|
+
UpdatePasswordControl();
|
|
502
|
+
|
|
503
|
+
{
|
|
504
|
+
const bool needSetMain = (Info.FormatIndex < 0);
|
|
505
|
+
FOR_VECTOR(i, ArcIndices)
|
|
506
|
+
{
|
|
507
|
+
const unsigned arcIndex = ArcIndices[i];
|
|
508
|
+
const CArcInfoEx &ai = (*ArcFormats)[arcIndex];
|
|
509
|
+
const int index = (int)m_Format.AddString_SetItemData(ai.Name, (LPARAM)arcIndex);
|
|
510
|
+
if (!needSetMain)
|
|
511
|
+
{
|
|
512
|
+
if (Info.FormatIndex == (int)arcIndex)
|
|
513
|
+
m_Format.SetCurSel(index);
|
|
514
|
+
continue;
|
|
515
|
+
}
|
|
516
|
+
if (i == 0 || ai.Name.IsEqualTo_NoCase(m_RegistryInfo.ArcType))
|
|
517
|
+
{
|
|
518
|
+
m_Format.SetCurSel(index);
|
|
519
|
+
Info.FormatIndex = (int)arcIndex;
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
CheckButton(IDX_COMPRESS_SFX, Info.SFXMode);
|
|
525
|
+
|
|
526
|
+
{
|
|
527
|
+
UString fileName;
|
|
528
|
+
SetArcPathFields(Info.ArcPath, fileName, true);
|
|
529
|
+
StartDirPrefix = DirPrefix;
|
|
530
|
+
SetArchiveName(fileName);
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
for (unsigned i = 0; i < m_RegistryInfo.ArcPaths.Size() && i < kHistorySize; i++)
|
|
534
|
+
m_ArchivePath.AddString(m_RegistryInfo.ArcPaths[i]);
|
|
535
|
+
|
|
536
|
+
AddComboItems(m_UpdateMode, k_UpdateMode_IDs, Z7_ARRAY_SIZE(k_UpdateMode_IDs),
|
|
537
|
+
k_UpdateMode_Vals, Info.UpdateMode);
|
|
538
|
+
|
|
539
|
+
AddComboItems(m_PathMode, k_PathMode_IDs, Z7_ARRAY_SIZE(k_PathMode_IDs),
|
|
540
|
+
k_PathMode_Vals, Info.PathMode);
|
|
541
|
+
|
|
542
|
+
CheckButton(IDX_COMPRESS_SHARED, Info.OpenShareForWrite);
|
|
543
|
+
CheckButton(IDX_COMPRESS_DEL, Info.DeleteAfterCompressing);
|
|
544
|
+
|
|
545
|
+
FormatChanged(false); // isChanged
|
|
546
|
+
|
|
547
|
+
// OnButtonSFX();
|
|
548
|
+
|
|
549
|
+
NormalizePosition();
|
|
550
|
+
|
|
551
|
+
return CModalDialog::OnInit();
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
/*
|
|
555
|
+
namespace NCompressDialog
|
|
556
|
+
{
|
|
557
|
+
bool CInfo::GetFullPathName(UString &result) const
|
|
558
|
+
{
|
|
559
|
+
#ifndef UNDER_CE
|
|
560
|
+
// NDirectory::MySetCurrentDirectory(CurrentDirPrefix);
|
|
561
|
+
#endif
|
|
562
|
+
FString resultF;
|
|
563
|
+
bool res = MyGetFullPathName(us2fs(ArchiveName), resultF);
|
|
564
|
+
result = fs2us(resultF);
|
|
565
|
+
return res;
|
|
566
|
+
}
|
|
567
|
+
}
|
|
568
|
+
*/
|
|
569
|
+
|
|
570
|
+
void CCompressDialog::UpdatePasswordControl()
|
|
571
|
+
{
|
|
572
|
+
const bool showPassword = IsShowPasswordChecked();
|
|
573
|
+
const TCHAR c = showPassword ? (TCHAR)0: TEXT('*');
|
|
574
|
+
_password1Control.SetPasswordChar((WPARAM)c);
|
|
575
|
+
_password2Control.SetPasswordChar((WPARAM)c);
|
|
576
|
+
UString password;
|
|
577
|
+
_password1Control.GetText(password);
|
|
578
|
+
_password1Control.SetText(password);
|
|
579
|
+
_password2Control.GetText(password);
|
|
580
|
+
_password2Control.SetText(password);
|
|
581
|
+
|
|
582
|
+
ShowItem_Bool(IDT_PASSWORD_REENTER, !showPassword);
|
|
583
|
+
_password2Control.Show_Bool(!showPassword);
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
bool CCompressDialog::OnButtonClicked(unsigned buttonID, HWND buttonHWND)
|
|
587
|
+
{
|
|
588
|
+
switch (buttonID)
|
|
589
|
+
{
|
|
590
|
+
case IDB_COMPRESS_SET_ARCHIVE:
|
|
591
|
+
{
|
|
592
|
+
OnButtonSetArchive();
|
|
593
|
+
return true;
|
|
594
|
+
}
|
|
595
|
+
case IDX_COMPRESS_SFX:
|
|
596
|
+
{
|
|
597
|
+
SetMethod(GetMethodID());
|
|
598
|
+
OnButtonSFX();
|
|
599
|
+
SetMemoryUsage();
|
|
600
|
+
return true;
|
|
601
|
+
}
|
|
602
|
+
case IDX_PASSWORD_SHOW:
|
|
603
|
+
{
|
|
604
|
+
UpdatePasswordControl();
|
|
605
|
+
return true;
|
|
606
|
+
}
|
|
607
|
+
case IDB_COMPRESS_OPTIONS:
|
|
608
|
+
{
|
|
609
|
+
COptionsDialog dialog(this);
|
|
610
|
+
if (dialog.Create(*this) == IDOK)
|
|
611
|
+
ShowOptionsString();
|
|
612
|
+
return true;
|
|
613
|
+
}
|
|
614
|
+
}
|
|
615
|
+
return CModalDialog::OnButtonClicked(buttonID, buttonHWND);
|
|
616
|
+
}
|
|
617
|
+
|
|
618
|
+
void CCompressDialog::CheckSFXControlsEnable()
|
|
619
|
+
{
|
|
620
|
+
const CFormatInfo &fi = g_Formats[GetStaticFormatIndex()];
|
|
621
|
+
bool enable = fi.SFX_();
|
|
622
|
+
if (enable)
|
|
623
|
+
{
|
|
624
|
+
const int methodID = GetMethodID();
|
|
625
|
+
enable = (methodID == -1 || IsMethodSupportedBySfx(methodID));
|
|
626
|
+
}
|
|
627
|
+
if (!enable)
|
|
628
|
+
CheckButton(IDX_COMPRESS_SFX, false);
|
|
629
|
+
EnableItem(IDX_COMPRESS_SFX, enable);
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
/*
|
|
633
|
+
void CCompressDialog::CheckVolumeEnable()
|
|
634
|
+
{
|
|
635
|
+
bool isSFX = IsSFX();
|
|
636
|
+
m_Volume.Enable(!isSFX);
|
|
637
|
+
if (isSFX)
|
|
638
|
+
m_Volume.SetText(TEXT(""));
|
|
639
|
+
}
|
|
640
|
+
*/
|
|
641
|
+
|
|
642
|
+
void CCompressDialog::EnableMultiCombo(unsigned id)
|
|
643
|
+
{
|
|
644
|
+
NWindows::NControl::CComboBox combo;
|
|
645
|
+
combo.Attach(GetItem(id));
|
|
646
|
+
const bool enable = (combo.GetCount() > 1);
|
|
647
|
+
EnableItem(id, enable);
|
|
648
|
+
}
|
|
649
|
+
|
|
650
|
+
static LRESULT ComboBox_AddStringAscii(NControl::CComboBox &cb, const char *s)
|
|
651
|
+
{
|
|
652
|
+
return cb.AddString((CSysString)s);
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
static LRESULT ComboBox_AddStringAscii_SetItemData(NControl::CComboBox &cb,
|
|
656
|
+
const char *s, LPARAM lParam)
|
|
657
|
+
{
|
|
658
|
+
const LRESULT index = ComboBox_AddStringAscii(cb, s);
|
|
659
|
+
if (index >= 0) // optional check
|
|
660
|
+
cb.SetItemData((int)index, lParam);
|
|
661
|
+
return index;
|
|
662
|
+
}
|
|
663
|
+
|
|
664
|
+
static void Combine_Two_BoolPairs(const CBoolPair &b1, const CBoolPair &b2, CBool1 &res)
|
|
665
|
+
{
|
|
666
|
+
if (!b1.Def && b2.Def)
|
|
667
|
+
res.Val = b2.Val;
|
|
668
|
+
else
|
|
669
|
+
res.Val = b1.Val;
|
|
670
|
+
}
|
|
671
|
+
|
|
672
|
+
#define SET_GUI_BOOL(name) \
|
|
673
|
+
Combine_Two_BoolPairs(Info. name, m_RegistryInfo. name, name)
|
|
674
|
+
|
|
675
|
+
|
|
676
|
+
static void Set_Final_BoolPairs(
|
|
677
|
+
const CBool1 &gui,
|
|
678
|
+
CBoolPair &cmd,
|
|
679
|
+
CBoolPair ®)
|
|
680
|
+
{
|
|
681
|
+
if (!cmd.Def)
|
|
682
|
+
{
|
|
683
|
+
reg.Val = gui.Val;
|
|
684
|
+
reg.Def = gui.Val;
|
|
685
|
+
}
|
|
686
|
+
if (gui.Supported)
|
|
687
|
+
{
|
|
688
|
+
cmd.Val = gui.Val;
|
|
689
|
+
cmd.Def = gui.Val;
|
|
690
|
+
}
|
|
691
|
+
else
|
|
692
|
+
cmd.Init();
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
#define SET_FINAL_BOOL_PAIRS(name) \
|
|
696
|
+
Set_Final_BoolPairs(name, Info. name, m_RegistryInfo. name)
|
|
697
|
+
|
|
698
|
+
void CCompressDialog::FormatChanged(bool isChanged)
|
|
699
|
+
{
|
|
700
|
+
SetLevel();
|
|
701
|
+
SetSolidBlockSize();
|
|
702
|
+
SetParams();
|
|
703
|
+
SetMemUseCombo();
|
|
704
|
+
SetNumThreads();
|
|
705
|
+
|
|
706
|
+
const CFormatInfo &fi = g_Formats[GetStaticFormatIndex()];
|
|
707
|
+
Info.SolidIsSpecified = fi.Solid_();
|
|
708
|
+
Info.EncryptHeadersIsAllowed = fi.EncryptFileNames_();
|
|
709
|
+
|
|
710
|
+
/*
|
|
711
|
+
const bool multiThreadEnable = fi.MultiThread;
|
|
712
|
+
Info.MultiThreadIsAllowed = multiThreadEnable;
|
|
713
|
+
EnableItem(IDC_COMPRESS_SOLID, fi.Solid);
|
|
714
|
+
EnableItem(IDC_COMPRESS_THREADS, multiThreadEnable);
|
|
715
|
+
const bool methodEnable = (fi.MethodIDs != NULL);
|
|
716
|
+
EnableItem(IDC_COMPRESS_METHOD, methodEnable);
|
|
717
|
+
EnableMultiCombo(IDC_COMPRESS_DICTIONARY, methodEnable);
|
|
718
|
+
EnableItem(IDC_COMPRESS_ORDER, methodEnable);
|
|
719
|
+
*/
|
|
720
|
+
|
|
721
|
+
CheckSFXControlsEnable();
|
|
722
|
+
|
|
723
|
+
{
|
|
724
|
+
if (!isChanged)
|
|
725
|
+
{
|
|
726
|
+
SET_GUI_BOOL (SymLinks);
|
|
727
|
+
SET_GUI_BOOL (HardLinks);
|
|
728
|
+
SET_GUI_BOOL (AltStreams);
|
|
729
|
+
SET_GUI_BOOL (NtSecurity);
|
|
730
|
+
SET_GUI_BOOL (PreserveATime);
|
|
731
|
+
}
|
|
732
|
+
|
|
733
|
+
PreserveATime.Supported = true;
|
|
734
|
+
|
|
735
|
+
{
|
|
736
|
+
const CArcInfoEx &ai = Get_ArcInfoEx();
|
|
737
|
+
SymLinks.Supported = ai.Flags_SymLinks();
|
|
738
|
+
HardLinks.Supported = ai.Flags_HardLinks();
|
|
739
|
+
AltStreams.Supported = ai.Flags_AltStreams();
|
|
740
|
+
NtSecurity.Supported = ai.Flags_NtSecurity();
|
|
741
|
+
}
|
|
742
|
+
|
|
743
|
+
ShowOptionsString();
|
|
744
|
+
}
|
|
745
|
+
// CheckVolumeEnable();
|
|
746
|
+
|
|
747
|
+
const bool encrypt = fi.Encrypt_();
|
|
748
|
+
EnableItem(IDG_COMPRESS_ENCRYPTION, encrypt);
|
|
749
|
+
|
|
750
|
+
EnableItem(IDT_PASSWORD_ENTER, encrypt);
|
|
751
|
+
EnableItem(IDT_PASSWORD_REENTER, encrypt);
|
|
752
|
+
EnableItem(IDE_COMPRESS_PASSWORD1, encrypt);
|
|
753
|
+
EnableItem(IDE_COMPRESS_PASSWORD2, encrypt);
|
|
754
|
+
EnableItem(IDX_PASSWORD_SHOW, encrypt);
|
|
755
|
+
|
|
756
|
+
EnableItem(IDT_COMPRESS_ENCRYPTION_METHOD, encrypt);
|
|
757
|
+
EnableItem(IDC_COMPRESS_ENCRYPTION_METHOD, encrypt);
|
|
758
|
+
EnableItem(IDX_COMPRESS_ENCRYPT_FILE_NAMES, fi.EncryptFileNames_());
|
|
759
|
+
|
|
760
|
+
ShowItem_Bool(IDX_COMPRESS_ENCRYPT_FILE_NAMES, fi.EncryptFileNames_());
|
|
761
|
+
|
|
762
|
+
SetEncryptionMethod();
|
|
763
|
+
SetMemoryUsage();
|
|
764
|
+
}
|
|
765
|
+
|
|
766
|
+
|
|
767
|
+
bool CCompressDialog::IsSFX()
|
|
768
|
+
{
|
|
769
|
+
return IsWindowEnabled(GetItem(IDX_COMPRESS_SFX))
|
|
770
|
+
&& IsButtonCheckedBool(IDX_COMPRESS_SFX);
|
|
771
|
+
}
|
|
772
|
+
|
|
773
|
+
static int GetExtDotPos(const UString &s)
|
|
774
|
+
{
|
|
775
|
+
const int dotPos = s.ReverseFind_Dot();
|
|
776
|
+
if (dotPos > s.ReverseFind_PathSepar() + 1)
|
|
777
|
+
return dotPos;
|
|
778
|
+
return -1;
|
|
779
|
+
}
|
|
780
|
+
|
|
781
|
+
void CCompressDialog::OnButtonSFX()
|
|
782
|
+
{
|
|
783
|
+
UString fileName;
|
|
784
|
+
m_ArchivePath.GetText(fileName);
|
|
785
|
+
const int dotPos = GetExtDotPos(fileName);
|
|
786
|
+
if (IsSFX())
|
|
787
|
+
{
|
|
788
|
+
if (dotPos >= 0)
|
|
789
|
+
fileName.DeleteFrom(dotPos);
|
|
790
|
+
fileName += kExeExt;
|
|
791
|
+
m_ArchivePath.SetText(fileName);
|
|
792
|
+
}
|
|
793
|
+
else
|
|
794
|
+
{
|
|
795
|
+
if (dotPos >= 0)
|
|
796
|
+
{
|
|
797
|
+
const UString ext = fileName.Ptr(dotPos);
|
|
798
|
+
if (ext.IsEqualTo_Ascii_NoCase(kExeExt))
|
|
799
|
+
{
|
|
800
|
+
fileName.DeleteFrom(dotPos);
|
|
801
|
+
m_ArchivePath.SetText(fileName);
|
|
802
|
+
}
|
|
803
|
+
}
|
|
804
|
+
SetArchiveName2(false); // it's for OnInit
|
|
805
|
+
}
|
|
806
|
+
|
|
807
|
+
// CheckVolumeEnable();
|
|
808
|
+
}
|
|
809
|
+
|
|
810
|
+
|
|
811
|
+
bool CCompressDialog::GetFinalPath_Smart(UString &resPath) const
|
|
812
|
+
{
|
|
813
|
+
resPath.Empty();
|
|
814
|
+
UString name;
|
|
815
|
+
m_ArchivePath.GetText(name);
|
|
816
|
+
name.Trim();
|
|
817
|
+
FString fullPath;
|
|
818
|
+
UString dirPrefx = DirPrefix;
|
|
819
|
+
if (dirPrefx.IsEmpty())
|
|
820
|
+
dirPrefx = StartDirPrefix;
|
|
821
|
+
const bool res = !dirPrefx.IsEmpty() ?
|
|
822
|
+
NName::GetFullPath(us2fs(dirPrefx), us2fs(name), fullPath):
|
|
823
|
+
NName::GetFullPath( us2fs(name), fullPath);
|
|
824
|
+
if (res)
|
|
825
|
+
resPath = fs2us(fullPath);
|
|
826
|
+
return res;
|
|
827
|
+
}
|
|
828
|
+
|
|
829
|
+
|
|
830
|
+
bool CCompressDialog::SetArcPathFields(const UString &path)
|
|
831
|
+
{
|
|
832
|
+
UString name;
|
|
833
|
+
return SetArcPathFields(path, name, true); // always
|
|
834
|
+
}
|
|
835
|
+
|
|
836
|
+
|
|
837
|
+
bool CCompressDialog::SetArcPathFields(const UString &path, UString &name, bool always)
|
|
838
|
+
{
|
|
839
|
+
FString resDirPrefix;
|
|
840
|
+
FString resFileName;
|
|
841
|
+
const bool res = GetFullPathAndSplit(us2fs(path), resDirPrefix, resFileName);
|
|
842
|
+
if (res)
|
|
843
|
+
{
|
|
844
|
+
DirPrefix = fs2us(resDirPrefix);
|
|
845
|
+
name = fs2us(resFileName);
|
|
846
|
+
}
|
|
847
|
+
else
|
|
848
|
+
{
|
|
849
|
+
if (!always)
|
|
850
|
+
return false;
|
|
851
|
+
DirPrefix.Empty();
|
|
852
|
+
name = path;
|
|
853
|
+
}
|
|
854
|
+
SetItemText(IDT_COMPRESS_ARCHIVE_FOLDER, DirPrefix);
|
|
855
|
+
m_ArchivePath.SetText(name);
|
|
856
|
+
return res;
|
|
857
|
+
}
|
|
858
|
+
|
|
859
|
+
|
|
860
|
+
static const wchar_t * const k_IncorrectPathMessage = L"Incorrect archive path";
|
|
861
|
+
|
|
862
|
+
static void AddFilter(CObjectVector<CBrowseFilterInfo> &filters,
|
|
863
|
+
const UString &description, const UString &ext)
|
|
864
|
+
{
|
|
865
|
+
CBrowseFilterInfo &f = filters.AddNew();
|
|
866
|
+
UString mask ("*.");
|
|
867
|
+
mask += ext;
|
|
868
|
+
f.Masks.Add(mask);
|
|
869
|
+
f.Description = description;
|
|
870
|
+
f.Description += " (";
|
|
871
|
+
f.Description += mask;
|
|
872
|
+
f.Description += ")";
|
|
873
|
+
}
|
|
874
|
+
|
|
875
|
+
|
|
876
|
+
static const char * const k_DontSave_Exts =
|
|
877
|
+
"xpi odt ods docx xlsx ";
|
|
878
|
+
|
|
879
|
+
void CCompressDialog::OnButtonSetArchive()
|
|
880
|
+
{
|
|
881
|
+
UString path;
|
|
882
|
+
if (!GetFinalPath_Smart(path))
|
|
883
|
+
{
|
|
884
|
+
ShowErrorMessage(*this, k_IncorrectPathMessage);
|
|
885
|
+
return;
|
|
886
|
+
}
|
|
887
|
+
|
|
888
|
+
int filterIndex;
|
|
889
|
+
CObjectVector<CBrowseFilterInfo> filters;
|
|
890
|
+
unsigned numFormats = 0;
|
|
891
|
+
|
|
892
|
+
const bool isSFX = IsSFX();
|
|
893
|
+
if (isSFX)
|
|
894
|
+
{
|
|
895
|
+
filterIndex = 0;
|
|
896
|
+
const UString ext ("exe");
|
|
897
|
+
AddFilter(filters, ext, ext);
|
|
898
|
+
}
|
|
899
|
+
else
|
|
900
|
+
{
|
|
901
|
+
filterIndex = m_Format.GetCurSel();
|
|
902
|
+
numFormats = (unsigned)m_Format.GetCount();
|
|
903
|
+
|
|
904
|
+
// filters [0, ... numFormats - 1] corresponds to items in m_Format combo
|
|
905
|
+
UString desc;
|
|
906
|
+
UStringVector masks;
|
|
907
|
+
CStringFinder finder;
|
|
908
|
+
|
|
909
|
+
for (unsigned i = 0; i < numFormats; i++)
|
|
910
|
+
{
|
|
911
|
+
const CArcInfoEx &ai = (*ArcFormats)[(unsigned)m_Format.GetItemData(i)];
|
|
912
|
+
CBrowseFilterInfo &f = filters.AddNew();
|
|
913
|
+
f.Description = ai.Name;
|
|
914
|
+
f.Description += " (";
|
|
915
|
+
bool needSpace_desc = false;
|
|
916
|
+
|
|
917
|
+
FOR_VECTOR (k, ai.Exts)
|
|
918
|
+
{
|
|
919
|
+
const UString &ext = ai.Exts[k].Ext;
|
|
920
|
+
UString mask ("*.");
|
|
921
|
+
mask += ext;
|
|
922
|
+
|
|
923
|
+
if (finder.FindWord_In_LowCaseAsciiList_NoCase(k_DontSave_Exts, ext))
|
|
924
|
+
continue;
|
|
925
|
+
|
|
926
|
+
f.Masks.Add(mask);
|
|
927
|
+
masks.Add(mask);
|
|
928
|
+
if (needSpace_desc)
|
|
929
|
+
f.Description.Add_Space();
|
|
930
|
+
needSpace_desc = true;
|
|
931
|
+
f.Description += ext;
|
|
932
|
+
}
|
|
933
|
+
f.Description += ")";
|
|
934
|
+
// we use only main ext in desc to reduce the size of list
|
|
935
|
+
if (i != 0)
|
|
936
|
+
desc.Add_Space();
|
|
937
|
+
desc += ai.GetMainExt();
|
|
938
|
+
}
|
|
939
|
+
|
|
940
|
+
CBrowseFilterInfo &f = filters.AddNew();
|
|
941
|
+
f.Description = LangString(IDT_COMPRESS_ARCHIVE); // IDS_ARCHIVES_COLON;
|
|
942
|
+
if (f.Description.IsEmpty())
|
|
943
|
+
GetItemText(IDT_COMPRESS_ARCHIVE, f.Description);
|
|
944
|
+
f.Description.RemoveChar(L'&');
|
|
945
|
+
// f.Description = "archive";
|
|
946
|
+
f.Description += " (";
|
|
947
|
+
f.Description += desc;
|
|
948
|
+
f.Description += ")";
|
|
949
|
+
f.Masks = masks;
|
|
950
|
+
}
|
|
951
|
+
|
|
952
|
+
AddFilter(filters, LangString(IDS_OPEN_TYPE_ALL_FILES), UString("*"));
|
|
953
|
+
if (filterIndex < 0)
|
|
954
|
+
filterIndex = (int)filters.Size() - 1;
|
|
955
|
+
|
|
956
|
+
const UString title = LangString(IDS_COMPRESS_SET_ARCHIVE_BROWSE);
|
|
957
|
+
CBrowseInfo bi;
|
|
958
|
+
bi.lpstrTitle = title;
|
|
959
|
+
bi.SaveMode = true;
|
|
960
|
+
bi.FilterIndex = filterIndex;
|
|
961
|
+
bi.hwndOwner = *this;
|
|
962
|
+
bi.FilePath = path;
|
|
963
|
+
|
|
964
|
+
if (!bi.BrowseForFile(filters))
|
|
965
|
+
return;
|
|
966
|
+
|
|
967
|
+
path = bi.FilePath;
|
|
968
|
+
|
|
969
|
+
if (isSFX)
|
|
970
|
+
{
|
|
971
|
+
const int dotPos = GetExtDotPos(path);
|
|
972
|
+
if (dotPos >= 0)
|
|
973
|
+
path.DeleteFrom(dotPos);
|
|
974
|
+
path += kExeExt;
|
|
975
|
+
}
|
|
976
|
+
else
|
|
977
|
+
// if (bi.FilterIndex >= 0)
|
|
978
|
+
// if (bi.FilterIndex != filterIndex)
|
|
979
|
+
if ((unsigned)bi.FilterIndex < numFormats)
|
|
980
|
+
{
|
|
981
|
+
// archive format was confirmed. So we try to set format extension
|
|
982
|
+
bool needAddExt = true;
|
|
983
|
+
const CArcInfoEx &ai = (*ArcFormats)[(unsigned)m_Format.GetItemData((unsigned)bi.FilterIndex)];
|
|
984
|
+
const int dotPos = GetExtDotPos(path);
|
|
985
|
+
if (dotPos >= 0)
|
|
986
|
+
{
|
|
987
|
+
const UString ext = path.Ptr(dotPos + 1);
|
|
988
|
+
if (ai.FindExtension(ext) >= 0)
|
|
989
|
+
needAddExt = false;
|
|
990
|
+
}
|
|
991
|
+
if (needAddExt)
|
|
992
|
+
{
|
|
993
|
+
if (path.IsEmpty() || path.Back() != '.')
|
|
994
|
+
path.Add_Dot();
|
|
995
|
+
path += ai.GetMainExt();
|
|
996
|
+
}
|
|
997
|
+
}
|
|
998
|
+
|
|
999
|
+
SetArcPathFields(path);
|
|
1000
|
+
|
|
1001
|
+
if (!isSFX)
|
|
1002
|
+
if ((unsigned)bi.FilterIndex < numFormats)
|
|
1003
|
+
if (bi.FilterIndex != m_Format.GetCurSel())
|
|
1004
|
+
{
|
|
1005
|
+
m_Format.SetCurSel(bi.FilterIndex);
|
|
1006
|
+
SaveOptionsInMem();
|
|
1007
|
+
FormatChanged(true); // isChanged
|
|
1008
|
+
return;
|
|
1009
|
+
}
|
|
1010
|
+
|
|
1011
|
+
ArcPath_WasChanged(path);
|
|
1012
|
+
}
|
|
1013
|
+
|
|
1014
|
+
|
|
1015
|
+
// in ExtractDialog.cpp
|
|
1016
|
+
extern void AddUniqueString(UStringVector &strings, const UString &srcString);
|
|
1017
|
+
|
|
1018
|
+
static bool IsAsciiString(const UString &s)
|
|
1019
|
+
{
|
|
1020
|
+
for (unsigned i = 0; i < s.Len(); i++)
|
|
1021
|
+
{
|
|
1022
|
+
const wchar_t c = s[i];
|
|
1023
|
+
if (c < 0x20 || c > 0x7F)
|
|
1024
|
+
return false;
|
|
1025
|
+
}
|
|
1026
|
+
return true;
|
|
1027
|
+
}
|
|
1028
|
+
|
|
1029
|
+
|
|
1030
|
+
static void AddSize_MB(UString &s, UInt64 size)
|
|
1031
|
+
{
|
|
1032
|
+
s.Add_LF();
|
|
1033
|
+
const UInt64 v2 = size + ((UInt32)1 << 20) - 1;
|
|
1034
|
+
if (size < v2)
|
|
1035
|
+
size = v2;
|
|
1036
|
+
s.Add_UInt64(size >> 20);
|
|
1037
|
+
s += " MB : ";
|
|
1038
|
+
}
|
|
1039
|
+
|
|
1040
|
+
static void AddSize_MB_id(UString &s, UInt64 size, UInt32 id)
|
|
1041
|
+
{
|
|
1042
|
+
AddSize_MB(s, size);
|
|
1043
|
+
AddLangString(s, id);
|
|
1044
|
+
}
|
|
1045
|
+
|
|
1046
|
+
void SetErrorMessage_MemUsage(UString &s, UInt64 reqSize, UInt64 ramSize, UInt64 ramLimit, const UString &usageString);
|
|
1047
|
+
void SetErrorMessage_MemUsage(UString &s, UInt64 reqSize, UInt64 ramSize, UInt64 ramLimit, const UString &usageString)
|
|
1048
|
+
{
|
|
1049
|
+
AddLangString(s, IDS_MEM_OPERATION_BLOCKED);
|
|
1050
|
+
s.Add_LF();
|
|
1051
|
+
AddLangString(s, IDS_MEM_REQUIRES_BIG_MEM);
|
|
1052
|
+
s.Add_LF();
|
|
1053
|
+
AddSize_MB(s, reqSize);
|
|
1054
|
+
s += usageString;
|
|
1055
|
+
AddSize_MB_id(s, ramSize, IDS_MEM_RAM_SIZE);
|
|
1056
|
+
// if (ramLimit != 0)
|
|
1057
|
+
{
|
|
1058
|
+
AddSize_MB_id(s, ramLimit, IDS_MEM_USAGE_LIMIT_SET_BY_7ZIP);
|
|
1059
|
+
}
|
|
1060
|
+
s.Add_LF();
|
|
1061
|
+
s.Add_LF();
|
|
1062
|
+
AddLangString(s, IDS_MEM_ERROR);
|
|
1063
|
+
}
|
|
1064
|
+
|
|
1065
|
+
|
|
1066
|
+
void CCompressDialog::OnOK()
|
|
1067
|
+
{
|
|
1068
|
+
_password1Control.GetText(Info.Password);
|
|
1069
|
+
if (IsZipFormat())
|
|
1070
|
+
{
|
|
1071
|
+
if (!IsAsciiString(Info.Password))
|
|
1072
|
+
{
|
|
1073
|
+
ShowErrorMessageHwndRes(*this, IDS_PASSWORD_USE_ASCII);
|
|
1074
|
+
return;
|
|
1075
|
+
}
|
|
1076
|
+
UString method = GetEncryptionMethodSpec();
|
|
1077
|
+
if (method.IsPrefixedBy_Ascii_NoCase("aes"))
|
|
1078
|
+
{
|
|
1079
|
+
if (Info.Password.Len() > 99)
|
|
1080
|
+
{
|
|
1081
|
+
ShowErrorMessageHwndRes(*this, IDS_PASSWORD_TOO_LONG);
|
|
1082
|
+
return;
|
|
1083
|
+
}
|
|
1084
|
+
}
|
|
1085
|
+
}
|
|
1086
|
+
if (!IsShowPasswordChecked())
|
|
1087
|
+
{
|
|
1088
|
+
UString password2;
|
|
1089
|
+
_password2Control.GetText(password2);
|
|
1090
|
+
if (password2 != Info.Password)
|
|
1091
|
+
{
|
|
1092
|
+
ShowErrorMessageHwndRes(*this, IDS_PASSWORD_NOT_MATCH);
|
|
1093
|
+
return;
|
|
1094
|
+
}
|
|
1095
|
+
}
|
|
1096
|
+
|
|
1097
|
+
{
|
|
1098
|
+
UInt64 decompressMem;
|
|
1099
|
+
const UInt64 memUsage = GetMemoryUsage_DecompMem(decompressMem);
|
|
1100
|
+
if (memUsage != (UInt64)(Int64)-1)
|
|
1101
|
+
{
|
|
1102
|
+
const UInt64 limit = Get_MemUse_Bytes();
|
|
1103
|
+
if (memUsage > limit)
|
|
1104
|
+
{
|
|
1105
|
+
UString s2;
|
|
1106
|
+
LangString_OnlyFromLangFile(IDS_MEM_REQUIRED_MEM_SIZE, s2);
|
|
1107
|
+
if (s2.IsEmpty())
|
|
1108
|
+
{
|
|
1109
|
+
s2 = LangString(IDT_COMPRESS_MEMORY);
|
|
1110
|
+
if (s2.IsEmpty())
|
|
1111
|
+
GetItemText(IDT_COMPRESS_MEMORY, s2);
|
|
1112
|
+
s2.RemoveChar(L':');
|
|
1113
|
+
}
|
|
1114
|
+
UString s;
|
|
1115
|
+
SetErrorMessage_MemUsage(s, memUsage, _ramSize, limit, s2);
|
|
1116
|
+
MessageBoxError(s);
|
|
1117
|
+
return;
|
|
1118
|
+
}
|
|
1119
|
+
}
|
|
1120
|
+
}
|
|
1121
|
+
|
|
1122
|
+
SaveOptionsInMem();
|
|
1123
|
+
|
|
1124
|
+
UStringVector arcPaths;
|
|
1125
|
+
{
|
|
1126
|
+
UString s;
|
|
1127
|
+
if (!GetFinalPath_Smart(s))
|
|
1128
|
+
{
|
|
1129
|
+
ShowErrorMessage(*this, k_IncorrectPathMessage);
|
|
1130
|
+
return;
|
|
1131
|
+
}
|
|
1132
|
+
Info.ArcPath = s;
|
|
1133
|
+
AddUniqueString(arcPaths, s);
|
|
1134
|
+
}
|
|
1135
|
+
|
|
1136
|
+
Info.UpdateMode = (NCompressDialog::NUpdateMode::EEnum)k_UpdateMode_Vals[m_UpdateMode.GetCurSel()];
|
|
1137
|
+
Info.PathMode = (NWildcard::ECensorPathMode)k_PathMode_Vals[m_PathMode.GetCurSel()];
|
|
1138
|
+
|
|
1139
|
+
Info.Level = GetLevelSpec();
|
|
1140
|
+
Info.Dict64 = GetDictSpec();
|
|
1141
|
+
// Info.Dict64_Chain = GetDictChainSpec();
|
|
1142
|
+
Info.Order = GetOrderSpec();
|
|
1143
|
+
Info.OrderMode = GetOrderMode();
|
|
1144
|
+
Info.NumThreads = GetNumThreadsSpec();
|
|
1145
|
+
|
|
1146
|
+
Info.MemUsage.Clear();
|
|
1147
|
+
{
|
|
1148
|
+
const UString mus = Get_MemUse_Spec();
|
|
1149
|
+
if (!mus.IsEmpty())
|
|
1150
|
+
{
|
|
1151
|
+
NCompression::CMemUse mu;
|
|
1152
|
+
mu.Parse(mus);
|
|
1153
|
+
if (mu.IsDefined)
|
|
1154
|
+
Info.MemUsage = mu;
|
|
1155
|
+
}
|
|
1156
|
+
}
|
|
1157
|
+
|
|
1158
|
+
{
|
|
1159
|
+
// Info.SolidIsSpecified = g_Formats[GetStaticFormatIndex()].Solid;
|
|
1160
|
+
const UInt32 solidLogSize = GetBlockSizeSpec();
|
|
1161
|
+
Info.SolidBlockSize = 0;
|
|
1162
|
+
if (solidLogSize == (UInt32)(Int32)-1)
|
|
1163
|
+
Info.SolidIsSpecified = false;
|
|
1164
|
+
else if (solidLogSize > 0)
|
|
1165
|
+
Info.SolidBlockSize = (solidLogSize >= 64) ?
|
|
1166
|
+
(UInt64)(Int64)-1 :
|
|
1167
|
+
((UInt64)1 << solidLogSize);
|
|
1168
|
+
}
|
|
1169
|
+
|
|
1170
|
+
Info.Method = GetMethodSpec();
|
|
1171
|
+
Info.EncryptionMethod = GetEncryptionMethodSpec();
|
|
1172
|
+
Info.FormatIndex = (int)GetFormatIndex();
|
|
1173
|
+
Info.SFXMode = IsSFX();
|
|
1174
|
+
Info.OpenShareForWrite = IsButtonCheckedBool(IDX_COMPRESS_SHARED);
|
|
1175
|
+
Info.DeleteAfterCompressing = IsButtonCheckedBool(IDX_COMPRESS_DEL);
|
|
1176
|
+
|
|
1177
|
+
m_RegistryInfo.EncryptHeaders =
|
|
1178
|
+
Info.EncryptHeaders = IsButtonCheckedBool(IDX_COMPRESS_ENCRYPT_FILE_NAMES);
|
|
1179
|
+
|
|
1180
|
+
|
|
1181
|
+
/* (Info) is for saving to registry:
|
|
1182
|
+
(CBoolPair::Val) will be set as (false), if it was (false)
|
|
1183
|
+
in registry at dialog creation, and user didn't click checkbox.
|
|
1184
|
+
in another case (CBoolPair::Val) will be set as (true) */
|
|
1185
|
+
|
|
1186
|
+
{
|
|
1187
|
+
/* Info properties could be for another archive types.
|
|
1188
|
+
so we disable unsupported properties in Info */
|
|
1189
|
+
// const CArcInfoEx &ai = Get_ArcInfoEx();
|
|
1190
|
+
|
|
1191
|
+
SET_FINAL_BOOL_PAIRS (SymLinks);
|
|
1192
|
+
SET_FINAL_BOOL_PAIRS (HardLinks);
|
|
1193
|
+
SET_FINAL_BOOL_PAIRS (AltStreams);
|
|
1194
|
+
SET_FINAL_BOOL_PAIRS (NtSecurity);
|
|
1195
|
+
|
|
1196
|
+
SET_FINAL_BOOL_PAIRS (PreserveATime);
|
|
1197
|
+
}
|
|
1198
|
+
|
|
1199
|
+
{
|
|
1200
|
+
const NCompression::CFormatOptions &fo = Get_FormatOptions();
|
|
1201
|
+
|
|
1202
|
+
Info.TimePrec = fo.TimePrec;
|
|
1203
|
+
Info.MTime = fo.MTime;
|
|
1204
|
+
Info.CTime = fo.CTime;
|
|
1205
|
+
Info.ATime = fo.ATime;
|
|
1206
|
+
Info.SetArcMTime = fo.SetArcMTime;
|
|
1207
|
+
}
|
|
1208
|
+
|
|
1209
|
+
m_Params.GetText(Info.Options);
|
|
1210
|
+
|
|
1211
|
+
UString volumeString;
|
|
1212
|
+
m_Volume.GetText(volumeString);
|
|
1213
|
+
volumeString.Trim();
|
|
1214
|
+
Info.VolumeSizes.Clear();
|
|
1215
|
+
|
|
1216
|
+
if (!volumeString.IsEmpty())
|
|
1217
|
+
{
|
|
1218
|
+
if (!ParseVolumeSizes(volumeString, Info.VolumeSizes))
|
|
1219
|
+
{
|
|
1220
|
+
ShowErrorMessageHwndRes(*this, IDS_INCORRECT_VOLUME_SIZE);
|
|
1221
|
+
return;
|
|
1222
|
+
}
|
|
1223
|
+
if (!Info.VolumeSizes.IsEmpty())
|
|
1224
|
+
{
|
|
1225
|
+
const UInt64 volumeSize = Info.VolumeSizes.Back();
|
|
1226
|
+
if (volumeSize < (100 << 10))
|
|
1227
|
+
{
|
|
1228
|
+
wchar_t s[32];
|
|
1229
|
+
ConvertUInt64ToString(volumeSize, s);
|
|
1230
|
+
if (::MessageBoxW(*this, MyFormatNew(IDS_SPLIT_CONFIRM, s),
|
|
1231
|
+
L"7-Zip", MB_YESNOCANCEL | MB_ICONQUESTION) != IDYES)
|
|
1232
|
+
return;
|
|
1233
|
+
}
|
|
1234
|
+
}
|
|
1235
|
+
}
|
|
1236
|
+
|
|
1237
|
+
if (Info.FormatIndex >= 0)
|
|
1238
|
+
m_RegistryInfo.ArcType = (*ArcFormats)[Info.FormatIndex].Name;
|
|
1239
|
+
m_RegistryInfo.ShowPassword = IsShowPasswordChecked();
|
|
1240
|
+
|
|
1241
|
+
FOR_VECTOR (i, m_RegistryInfo.ArcPaths)
|
|
1242
|
+
{
|
|
1243
|
+
if (arcPaths.Size() >= kHistorySize)
|
|
1244
|
+
break;
|
|
1245
|
+
AddUniqueString(arcPaths, m_RegistryInfo.ArcPaths[i]);
|
|
1246
|
+
}
|
|
1247
|
+
m_RegistryInfo.ArcPaths = arcPaths;
|
|
1248
|
+
|
|
1249
|
+
m_RegistryInfo.Save();
|
|
1250
|
+
|
|
1251
|
+
CModalDialog::OnOK();
|
|
1252
|
+
}
|
|
1253
|
+
|
|
1254
|
+
#define kHelpTopic "fm/plugins/7-zip/add.htm"
|
|
1255
|
+
#define kHelpTopic_Options "fm/plugins/7-zip/add.htm#options"
|
|
1256
|
+
|
|
1257
|
+
void CCompressDialog::OnHelp()
|
|
1258
|
+
{
|
|
1259
|
+
ShowHelpWindow(kHelpTopic);
|
|
1260
|
+
}
|
|
1261
|
+
|
|
1262
|
+
|
|
1263
|
+
void CCompressDialog::ArcPath_WasChanged(const UString &path)
|
|
1264
|
+
{
|
|
1265
|
+
const int dotPos = GetExtDotPos(path);
|
|
1266
|
+
if (dotPos < 0)
|
|
1267
|
+
return;
|
|
1268
|
+
const UString ext = path.Ptr(dotPos + 1);
|
|
1269
|
+
{
|
|
1270
|
+
const CArcInfoEx &ai = Get_ArcInfoEx();
|
|
1271
|
+
if (ai.FindExtension(ext) >= 0)
|
|
1272
|
+
return;
|
|
1273
|
+
}
|
|
1274
|
+
|
|
1275
|
+
const unsigned count = (unsigned)m_Format.GetCount();
|
|
1276
|
+
for (unsigned i = 0; i < count; i++)
|
|
1277
|
+
{
|
|
1278
|
+
const CArcInfoEx &ai = (*ArcFormats)[(unsigned)m_Format.GetItemData(i)];
|
|
1279
|
+
if (ai.FindExtension(ext) >= 0)
|
|
1280
|
+
{
|
|
1281
|
+
m_Format.SetCurSel(i);
|
|
1282
|
+
SaveOptionsInMem();
|
|
1283
|
+
FormatChanged(true); // isChanged
|
|
1284
|
+
return;
|
|
1285
|
+
}
|
|
1286
|
+
}
|
|
1287
|
+
}
|
|
1288
|
+
|
|
1289
|
+
|
|
1290
|
+
bool CCompressDialog::OnMessage(UINT message, WPARAM wParam, LPARAM lParam)
|
|
1291
|
+
{
|
|
1292
|
+
switch (message)
|
|
1293
|
+
{
|
|
1294
|
+
case k_Message_ArcChanged:
|
|
1295
|
+
{
|
|
1296
|
+
// UString path;
|
|
1297
|
+
// m_ArchivePath.GetText(path);
|
|
1298
|
+
const int select = m_ArchivePath.GetCurSel();
|
|
1299
|
+
if ((unsigned)select < m_RegistryInfo.ArcPaths.Size())
|
|
1300
|
+
// if (path == m_RegistryInfo.ArcPaths[select])
|
|
1301
|
+
{
|
|
1302
|
+
const UString &path = m_RegistryInfo.ArcPaths[select];
|
|
1303
|
+
SetArcPathFields(path);
|
|
1304
|
+
// ArcPath_WasChanged(path);
|
|
1305
|
+
}
|
|
1306
|
+
return 0;
|
|
1307
|
+
}
|
|
1308
|
+
}
|
|
1309
|
+
return CModalDialog::OnMessage(message, wParam, lParam);
|
|
1310
|
+
}
|
|
1311
|
+
|
|
1312
|
+
|
|
1313
|
+
bool CCompressDialog::OnCommand(unsigned code, unsigned itemID, LPARAM lParam)
|
|
1314
|
+
{
|
|
1315
|
+
if (code == CBN_SELCHANGE)
|
|
1316
|
+
{
|
|
1317
|
+
switch (itemID)
|
|
1318
|
+
{
|
|
1319
|
+
case IDC_COMPRESS_ARCHIVE:
|
|
1320
|
+
{
|
|
1321
|
+
/* CBN_SELCHANGE is called before actual value of combo text will be changed.
|
|
1322
|
+
So GetText() here returns old value (before change) of combo text.
|
|
1323
|
+
So here we can change all controls except of m_ArchivePath.
|
|
1324
|
+
*/
|
|
1325
|
+
const int select = m_ArchivePath.GetCurSel();
|
|
1326
|
+
if ((unsigned)select < m_RegistryInfo.ArcPaths.Size())
|
|
1327
|
+
{
|
|
1328
|
+
// DirPrefix.Empty();
|
|
1329
|
+
// SetItemText(IDT_COMPRESS_ARCHIVE_FOLDER, DirPrefix);
|
|
1330
|
+
const UString &path = m_RegistryInfo.ArcPaths[select];
|
|
1331
|
+
// SetArcPathFields(path);
|
|
1332
|
+
ArcPath_WasChanged(path);
|
|
1333
|
+
// we use PostMessage(k_Message_ArcChanged) here that later will change m_ArchivePath control
|
|
1334
|
+
PostMsg(k_Message_ArcChanged);
|
|
1335
|
+
}
|
|
1336
|
+
return true;
|
|
1337
|
+
}
|
|
1338
|
+
|
|
1339
|
+
case IDC_COMPRESS_FORMAT:
|
|
1340
|
+
{
|
|
1341
|
+
const bool isSFX = IsSFX();
|
|
1342
|
+
SaveOptionsInMem();
|
|
1343
|
+
FormatChanged(true); // isChanged
|
|
1344
|
+
SetArchiveName2(isSFX);
|
|
1345
|
+
return true;
|
|
1346
|
+
}
|
|
1347
|
+
|
|
1348
|
+
case IDC_COMPRESS_LEVEL:
|
|
1349
|
+
{
|
|
1350
|
+
Get_FormatOptions().ResetForLevelChange();
|
|
1351
|
+
|
|
1352
|
+
SetMethod(); // call it if level changes method
|
|
1353
|
+
|
|
1354
|
+
// call the following if level change keeps old method
|
|
1355
|
+
/*
|
|
1356
|
+
{
|
|
1357
|
+
// try to keep old method
|
|
1358
|
+
SetMethod(GetMethodID());
|
|
1359
|
+
MethodChanged();
|
|
1360
|
+
}
|
|
1361
|
+
*/
|
|
1362
|
+
|
|
1363
|
+
SetSolidBlockSize();
|
|
1364
|
+
SetNumThreads();
|
|
1365
|
+
CheckSFXNameChange();
|
|
1366
|
+
SetMemoryUsage();
|
|
1367
|
+
return true;
|
|
1368
|
+
}
|
|
1369
|
+
|
|
1370
|
+
case IDC_COMPRESS_METHOD:
|
|
1371
|
+
{
|
|
1372
|
+
MethodChanged();
|
|
1373
|
+
SetSolidBlockSize();
|
|
1374
|
+
SetNumThreads();
|
|
1375
|
+
CheckSFXNameChange();
|
|
1376
|
+
SetMemoryUsage();
|
|
1377
|
+
if (Get_ArcInfoEx().Flags_HashHandler())
|
|
1378
|
+
SetArchiveName2(false);
|
|
1379
|
+
|
|
1380
|
+
return true;
|
|
1381
|
+
}
|
|
1382
|
+
|
|
1383
|
+
case IDC_COMPRESS_DICTIONARY:
|
|
1384
|
+
// case IDC_COMPRESS_DICTIONARY2:
|
|
1385
|
+
{
|
|
1386
|
+
/* we want to change the reported threads for Auto line
|
|
1387
|
+
and keep selected NumThreads option
|
|
1388
|
+
So we save selected NumThreads option in memory */
|
|
1389
|
+
SaveOptionsInMem();
|
|
1390
|
+
const UInt32 blockSizeLog = GetBlockSizeSpec();
|
|
1391
|
+
if (// blockSizeLog != (UInt32)(Int32)-1 &&
|
|
1392
|
+
blockSizeLog != kSolidLog_NoSolid
|
|
1393
|
+
&& blockSizeLog != kSolidLog_FullSolid)
|
|
1394
|
+
{
|
|
1395
|
+
Get_FormatOptions().Reset_BlockLogSize();
|
|
1396
|
+
// SetSolidBlockSize(true);
|
|
1397
|
+
}
|
|
1398
|
+
|
|
1399
|
+
SetDictionary2();
|
|
1400
|
+
SetSolidBlockSize();
|
|
1401
|
+
SetNumThreads(); // we want to change the reported threads for Auto line only
|
|
1402
|
+
SetMemoryUsage();
|
|
1403
|
+
return true;
|
|
1404
|
+
}
|
|
1405
|
+
|
|
1406
|
+
case IDC_COMPRESS_ORDER:
|
|
1407
|
+
{
|
|
1408
|
+
#ifdef PRINT_PARAMS
|
|
1409
|
+
Print_Params();
|
|
1410
|
+
#endif
|
|
1411
|
+
return true;
|
|
1412
|
+
}
|
|
1413
|
+
|
|
1414
|
+
case IDC_COMPRESS_SOLID:
|
|
1415
|
+
{
|
|
1416
|
+
SetMemoryUsage();
|
|
1417
|
+
return true;
|
|
1418
|
+
}
|
|
1419
|
+
|
|
1420
|
+
case IDC_COMPRESS_THREADS:
|
|
1421
|
+
{
|
|
1422
|
+
SetMemoryUsage();
|
|
1423
|
+
return true;
|
|
1424
|
+
}
|
|
1425
|
+
|
|
1426
|
+
case IDC_COMPRESS_MEM_USE:
|
|
1427
|
+
{
|
|
1428
|
+
/* we want to change the reported threads for Auto line
|
|
1429
|
+
and keep selected NumThreads option
|
|
1430
|
+
So we save selected NumThreads option in memory */
|
|
1431
|
+
SaveOptionsInMem();
|
|
1432
|
+
|
|
1433
|
+
SetNumThreads(); // we want to change the reported threads for Auto line only
|
|
1434
|
+
SetMemoryUsage();
|
|
1435
|
+
return true;
|
|
1436
|
+
}
|
|
1437
|
+
}
|
|
1438
|
+
}
|
|
1439
|
+
return CModalDialog::OnCommand(code, itemID, lParam);
|
|
1440
|
+
}
|
|
1441
|
+
|
|
1442
|
+
void CCompressDialog::CheckSFXNameChange()
|
|
1443
|
+
{
|
|
1444
|
+
const bool isSFX = IsSFX();
|
|
1445
|
+
CheckSFXControlsEnable();
|
|
1446
|
+
if (isSFX != IsSFX())
|
|
1447
|
+
SetArchiveName2(isSFX);
|
|
1448
|
+
}
|
|
1449
|
+
|
|
1450
|
+
void CCompressDialog::SetArchiveName2(bool prevWasSFX)
|
|
1451
|
+
{
|
|
1452
|
+
UString fileName;
|
|
1453
|
+
m_ArchivePath.GetText(fileName);
|
|
1454
|
+
const CArcInfoEx &prevArchiverInfo = (*ArcFormats)[m_PrevFormat];
|
|
1455
|
+
if (prevArchiverInfo.Flags_KeepName() || Info.KeepName)
|
|
1456
|
+
{
|
|
1457
|
+
UString prevExtension;
|
|
1458
|
+
if (prevWasSFX)
|
|
1459
|
+
prevExtension = kExeExt;
|
|
1460
|
+
else
|
|
1461
|
+
{
|
|
1462
|
+
prevExtension.Add_Dot();
|
|
1463
|
+
prevExtension += prevArchiverInfo.GetMainExt();
|
|
1464
|
+
}
|
|
1465
|
+
const unsigned prevExtensionLen = prevExtension.Len();
|
|
1466
|
+
if (fileName.Len() >= prevExtensionLen)
|
|
1467
|
+
if (StringsAreEqualNoCase(fileName.RightPtr(prevExtensionLen), prevExtension))
|
|
1468
|
+
fileName.DeleteFrom(fileName.Len() - prevExtensionLen);
|
|
1469
|
+
}
|
|
1470
|
+
SetArchiveName(fileName);
|
|
1471
|
+
}
|
|
1472
|
+
|
|
1473
|
+
// if type.KeepName then use OriginalFileName
|
|
1474
|
+
// else if !KeepName remove extension
|
|
1475
|
+
// add new extension
|
|
1476
|
+
|
|
1477
|
+
void CCompressDialog::SetArchiveName(const UString &name)
|
|
1478
|
+
{
|
|
1479
|
+
UString fileName = name;
|
|
1480
|
+
Info.FormatIndex = (int)GetFormatIndex();
|
|
1481
|
+
const CArcInfoEx &ai = (*ArcFormats)[Info.FormatIndex];
|
|
1482
|
+
m_PrevFormat = Info.FormatIndex;
|
|
1483
|
+
if (ai.Flags_KeepName())
|
|
1484
|
+
{
|
|
1485
|
+
fileName = OriginalFileName;
|
|
1486
|
+
}
|
|
1487
|
+
else
|
|
1488
|
+
{
|
|
1489
|
+
if (!Info.KeepName)
|
|
1490
|
+
{
|
|
1491
|
+
int dotPos = GetExtDotPos(fileName);
|
|
1492
|
+
if (dotPos >= 0)
|
|
1493
|
+
fileName.DeleteFrom(dotPos);
|
|
1494
|
+
}
|
|
1495
|
+
}
|
|
1496
|
+
|
|
1497
|
+
if (IsSFX())
|
|
1498
|
+
fileName += kExeExt;
|
|
1499
|
+
else
|
|
1500
|
+
{
|
|
1501
|
+
fileName.Add_Dot();
|
|
1502
|
+
UString ext = ai.GetMainExt();
|
|
1503
|
+
if (ai.Flags_HashHandler())
|
|
1504
|
+
{
|
|
1505
|
+
UString estimatedName;
|
|
1506
|
+
GetMethodSpec(estimatedName);
|
|
1507
|
+
if (!estimatedName.IsEmpty())
|
|
1508
|
+
{
|
|
1509
|
+
ext = estimatedName;
|
|
1510
|
+
ext.MakeLower_Ascii();
|
|
1511
|
+
}
|
|
1512
|
+
}
|
|
1513
|
+
fileName += ext;
|
|
1514
|
+
}
|
|
1515
|
+
m_ArchivePath.SetText(fileName);
|
|
1516
|
+
}
|
|
1517
|
+
|
|
1518
|
+
|
|
1519
|
+
int CCompressDialog::FindRegistryFormat(const UString &name)
|
|
1520
|
+
{
|
|
1521
|
+
FOR_VECTOR (i, m_RegistryInfo.Formats)
|
|
1522
|
+
{
|
|
1523
|
+
const NCompression::CFormatOptions &fo = m_RegistryInfo.Formats[i];
|
|
1524
|
+
if (name.IsEqualTo_NoCase(GetUnicodeString(fo.FormatID)))
|
|
1525
|
+
return (int)i;
|
|
1526
|
+
}
|
|
1527
|
+
return -1;
|
|
1528
|
+
}
|
|
1529
|
+
|
|
1530
|
+
|
|
1531
|
+
unsigned CCompressDialog::FindRegistryFormat_Always(const UString &name)
|
|
1532
|
+
{
|
|
1533
|
+
const int index = FindRegistryFormat(name);
|
|
1534
|
+
if (index >= 0)
|
|
1535
|
+
return (unsigned)index;
|
|
1536
|
+
{
|
|
1537
|
+
NCompression::CFormatOptions fo;
|
|
1538
|
+
fo.FormatID = GetSystemString(name);
|
|
1539
|
+
return m_RegistryInfo.Formats.Add(fo);
|
|
1540
|
+
}
|
|
1541
|
+
}
|
|
1542
|
+
|
|
1543
|
+
|
|
1544
|
+
NCompression::CFormatOptions &CCompressDialog::Get_FormatOptions()
|
|
1545
|
+
{
|
|
1546
|
+
const CArcInfoEx &ai = Get_ArcInfoEx();
|
|
1547
|
+
return m_RegistryInfo.Formats[FindRegistryFormat_Always(ai.Name)];
|
|
1548
|
+
}
|
|
1549
|
+
|
|
1550
|
+
|
|
1551
|
+
unsigned CCompressDialog::GetStaticFormatIndex()
|
|
1552
|
+
{
|
|
1553
|
+
const CArcInfoEx &ai = Get_ArcInfoEx();
|
|
1554
|
+
for (unsigned i = 0; i < Z7_ARRAY_SIZE(g_Formats); i++)
|
|
1555
|
+
if (ai.Name.IsEqualTo_Ascii_NoCase(g_Formats[i].Name))
|
|
1556
|
+
return i;
|
|
1557
|
+
return 0; // -1;
|
|
1558
|
+
}
|
|
1559
|
+
|
|
1560
|
+
void CCompressDialog::SetNearestSelectComboBox(NControl::CComboBox &comboBox, UInt32 value)
|
|
1561
|
+
{
|
|
1562
|
+
for (int i = comboBox.GetCount() - 1; i >= 0; i--)
|
|
1563
|
+
if ((UInt32)comboBox.GetItemData(i) <= value)
|
|
1564
|
+
{
|
|
1565
|
+
comboBox.SetCurSel(i);
|
|
1566
|
+
return;
|
|
1567
|
+
}
|
|
1568
|
+
if (comboBox.GetCount() > 0)
|
|
1569
|
+
comboBox.SetCurSel(0);
|
|
1570
|
+
}
|
|
1571
|
+
|
|
1572
|
+
void CCompressDialog::SetLevel2()
|
|
1573
|
+
{
|
|
1574
|
+
m_Level.ResetContent();
|
|
1575
|
+
const CFormatInfo &fi = g_Formats[GetStaticFormatIndex()];
|
|
1576
|
+
const CArcInfoEx &ai = Get_ArcInfoEx();
|
|
1577
|
+
UInt32 level = 5;
|
|
1578
|
+
{
|
|
1579
|
+
int index = FindRegistryFormat(ai.Name);
|
|
1580
|
+
if (index >= 0)
|
|
1581
|
+
{
|
|
1582
|
+
const NCompression::CFormatOptions &fo = m_RegistryInfo.Formats[index];
|
|
1583
|
+
if (fo.Level <= 9)
|
|
1584
|
+
level = fo.Level;
|
|
1585
|
+
else if (fo.Level == (UInt32)(Int32)-1)
|
|
1586
|
+
level = 5;
|
|
1587
|
+
else
|
|
1588
|
+
level = 9;
|
|
1589
|
+
}
|
|
1590
|
+
}
|
|
1591
|
+
|
|
1592
|
+
const bool isZstd = ai.Is_Zstd();
|
|
1593
|
+
|
|
1594
|
+
for (unsigned i = 0; i < sizeof(UInt32) * 8; i++)
|
|
1595
|
+
{
|
|
1596
|
+
const UInt32 mask = fi.LevelsMask >> i;
|
|
1597
|
+
// if (mask == 0) break;
|
|
1598
|
+
if (mask & 1)
|
|
1599
|
+
{
|
|
1600
|
+
UString s;
|
|
1601
|
+
s.Add_UInt32(i);
|
|
1602
|
+
if (i < Z7_ARRAY_SIZE(g_Levels))
|
|
1603
|
+
{
|
|
1604
|
+
const UInt32 langID = g_Levels[i];
|
|
1605
|
+
// if (fi.LevelsMask < (1 << (MY_ZSTD_LEVEL_MAX + 1)) - 1)
|
|
1606
|
+
if (langID)
|
|
1607
|
+
if (i != 0 || !isZstd)
|
|
1608
|
+
{
|
|
1609
|
+
s += " - ";
|
|
1610
|
+
AddLangString(s, langID);
|
|
1611
|
+
}
|
|
1612
|
+
}
|
|
1613
|
+
m_Level.AddString_SetItemData(s, (LPARAM)i);
|
|
1614
|
+
}
|
|
1615
|
+
}
|
|
1616
|
+
SetNearestSelectComboBox(m_Level, level);
|
|
1617
|
+
}
|
|
1618
|
+
|
|
1619
|
+
|
|
1620
|
+
static const char * const k_Auto_Prefix = "* ";
|
|
1621
|
+
|
|
1622
|
+
static void Modify_Auto(AString &s)
|
|
1623
|
+
{
|
|
1624
|
+
s.Insert(0, k_Auto_Prefix);
|
|
1625
|
+
}
|
|
1626
|
+
|
|
1627
|
+
void CCompressDialog::SetMethod2(int keepMethodId)
|
|
1628
|
+
{
|
|
1629
|
+
m_Method.ResetContent();
|
|
1630
|
+
_auto_MethodId = -1;
|
|
1631
|
+
const CFormatInfo &fi = g_Formats[GetStaticFormatIndex()];
|
|
1632
|
+
const CArcInfoEx &ai = Get_ArcInfoEx();
|
|
1633
|
+
if (GetLevel() == 0 && !ai.Flags_HashHandler())
|
|
1634
|
+
{
|
|
1635
|
+
if (!ai.Is_Tar() &&
|
|
1636
|
+
!ai.Is_Zstd())
|
|
1637
|
+
{
|
|
1638
|
+
MethodChanged();
|
|
1639
|
+
return;
|
|
1640
|
+
}
|
|
1641
|
+
}
|
|
1642
|
+
UString defaultMethod;
|
|
1643
|
+
{
|
|
1644
|
+
const int index = FindRegistryFormat(ai.Name);
|
|
1645
|
+
if (index >= 0)
|
|
1646
|
+
{
|
|
1647
|
+
const NCompression::CFormatOptions &fo = m_RegistryInfo.Formats[index];
|
|
1648
|
+
defaultMethod = fo.Method;
|
|
1649
|
+
}
|
|
1650
|
+
}
|
|
1651
|
+
const bool isSfx = IsSFX();
|
|
1652
|
+
bool weUseSameMethod = false;
|
|
1653
|
+
|
|
1654
|
+
const bool is7z = ai.Is_7z();
|
|
1655
|
+
|
|
1656
|
+
for (unsigned m = 0;; m++)
|
|
1657
|
+
{
|
|
1658
|
+
int methodID;
|
|
1659
|
+
const char *method;
|
|
1660
|
+
if (m < fi.NumMethods)
|
|
1661
|
+
{
|
|
1662
|
+
methodID = fi.MethodIDs[m];
|
|
1663
|
+
method = kMethodsNames[methodID];
|
|
1664
|
+
if (is7z)
|
|
1665
|
+
if (methodID == kCopy
|
|
1666
|
+
|| methodID == kDeflate
|
|
1667
|
+
|| methodID == kDeflate64
|
|
1668
|
+
)
|
|
1669
|
+
continue;
|
|
1670
|
+
}
|
|
1671
|
+
else
|
|
1672
|
+
{
|
|
1673
|
+
if (!is7z)
|
|
1674
|
+
break;
|
|
1675
|
+
const unsigned extIndex = m - fi.NumMethods;
|
|
1676
|
+
if (extIndex >= ExternalMethods.Size())
|
|
1677
|
+
break;
|
|
1678
|
+
methodID = (int)(Z7_ARRAY_SIZE(kMethodsNames) + extIndex);
|
|
1679
|
+
method = ExternalMethods[extIndex].Ptr();
|
|
1680
|
+
}
|
|
1681
|
+
if (isSfx)
|
|
1682
|
+
if (!IsMethodSupportedBySfx(methodID))
|
|
1683
|
+
continue;
|
|
1684
|
+
|
|
1685
|
+
AString s (method);
|
|
1686
|
+
int writtenMethodId = methodID;
|
|
1687
|
+
if (m == 0)
|
|
1688
|
+
{
|
|
1689
|
+
_auto_MethodId = methodID;
|
|
1690
|
+
writtenMethodId = -1;
|
|
1691
|
+
Modify_Auto(s);
|
|
1692
|
+
}
|
|
1693
|
+
const int itemIndex = (int)ComboBox_AddStringAscii_SetItemData(m_Method,
|
|
1694
|
+
s, writtenMethodId);
|
|
1695
|
+
if (keepMethodId == methodID)
|
|
1696
|
+
{
|
|
1697
|
+
m_Method.SetCurSel(itemIndex);
|
|
1698
|
+
weUseSameMethod = true;
|
|
1699
|
+
continue;
|
|
1700
|
+
}
|
|
1701
|
+
if ((defaultMethod.IsEqualTo_Ascii_NoCase(method) || m == 0) && !weUseSameMethod)
|
|
1702
|
+
m_Method.SetCurSel(itemIndex);
|
|
1703
|
+
}
|
|
1704
|
+
|
|
1705
|
+
if (!weUseSameMethod)
|
|
1706
|
+
MethodChanged();
|
|
1707
|
+
}
|
|
1708
|
+
|
|
1709
|
+
|
|
1710
|
+
|
|
1711
|
+
bool CCompressDialog::IsZipFormat()
|
|
1712
|
+
{
|
|
1713
|
+
return Get_ArcInfoEx().Is_Zip();
|
|
1714
|
+
}
|
|
1715
|
+
|
|
1716
|
+
bool CCompressDialog::IsXzFormat()
|
|
1717
|
+
{
|
|
1718
|
+
return Get_ArcInfoEx().Is_Xz();
|
|
1719
|
+
}
|
|
1720
|
+
|
|
1721
|
+
void CCompressDialog::SetEncryptionMethod()
|
|
1722
|
+
{
|
|
1723
|
+
_encryptionMethod.ResetContent();
|
|
1724
|
+
_default_encryptionMethod_Index = -1;
|
|
1725
|
+
const CArcInfoEx &ai = Get_ArcInfoEx();
|
|
1726
|
+
if (ai.Is_7z())
|
|
1727
|
+
{
|
|
1728
|
+
ComboBox_AddStringAscii(_encryptionMethod, "AES-256");
|
|
1729
|
+
_encryptionMethod.SetCurSel(0);
|
|
1730
|
+
_default_encryptionMethod_Index = 0;
|
|
1731
|
+
}
|
|
1732
|
+
else if (ai.Is_Zip())
|
|
1733
|
+
{
|
|
1734
|
+
const int index = FindRegistryFormat(ai.Name);
|
|
1735
|
+
UString encryptionMethod;
|
|
1736
|
+
if (index >= 0)
|
|
1737
|
+
{
|
|
1738
|
+
const NCompression::CFormatOptions &fo = m_RegistryInfo.Formats[index];
|
|
1739
|
+
encryptionMethod = fo.EncryptionMethod;
|
|
1740
|
+
}
|
|
1741
|
+
int sel = 0;
|
|
1742
|
+
// if (ZipCryptoIsAllowed)
|
|
1743
|
+
{
|
|
1744
|
+
ComboBox_AddStringAscii(_encryptionMethod, "ZipCrypto");
|
|
1745
|
+
sel = (encryptionMethod.IsPrefixedBy_Ascii_NoCase("aes") ? 1 : 0);
|
|
1746
|
+
_default_encryptionMethod_Index = 0;
|
|
1747
|
+
}
|
|
1748
|
+
ComboBox_AddStringAscii(_encryptionMethod, "AES-256");
|
|
1749
|
+
_encryptionMethod.SetCurSel(sel);
|
|
1750
|
+
}
|
|
1751
|
+
}
|
|
1752
|
+
|
|
1753
|
+
|
|
1754
|
+
int CCompressDialog::GetMethodID_RAW()
|
|
1755
|
+
{
|
|
1756
|
+
if (m_Method.GetCount() <= 0)
|
|
1757
|
+
return -1;
|
|
1758
|
+
return (int)(Int32)(UInt32)m_Method.GetItemData_of_CurSel();
|
|
1759
|
+
}
|
|
1760
|
+
|
|
1761
|
+
int CCompressDialog::GetMethodID()
|
|
1762
|
+
{
|
|
1763
|
+
int raw = GetMethodID_RAW();
|
|
1764
|
+
if (raw < 0)
|
|
1765
|
+
return _auto_MethodId;
|
|
1766
|
+
return raw;
|
|
1767
|
+
}
|
|
1768
|
+
|
|
1769
|
+
|
|
1770
|
+
UString CCompressDialog::GetMethodSpec(UString &estimatedName)
|
|
1771
|
+
{
|
|
1772
|
+
estimatedName.Empty();
|
|
1773
|
+
if (m_Method.GetCount() < 1)
|
|
1774
|
+
return estimatedName;
|
|
1775
|
+
const int methodIdRaw = GetMethodID_RAW();
|
|
1776
|
+
int methodId = methodIdRaw;
|
|
1777
|
+
if (methodIdRaw < 0)
|
|
1778
|
+
methodId = _auto_MethodId;
|
|
1779
|
+
UString s;
|
|
1780
|
+
if (methodId >= 0)
|
|
1781
|
+
{
|
|
1782
|
+
if ((unsigned)methodId < Z7_ARRAY_SIZE(kMethodsNames))
|
|
1783
|
+
estimatedName = kMethodsNames[methodId];
|
|
1784
|
+
else
|
|
1785
|
+
estimatedName = ExternalMethods[(unsigned)methodId - (unsigned)Z7_ARRAY_SIZE(kMethodsNames)];
|
|
1786
|
+
if (methodIdRaw >= 0)
|
|
1787
|
+
s = estimatedName;
|
|
1788
|
+
}
|
|
1789
|
+
return s;
|
|
1790
|
+
}
|
|
1791
|
+
|
|
1792
|
+
|
|
1793
|
+
UString CCompressDialog::GetMethodSpec()
|
|
1794
|
+
{
|
|
1795
|
+
UString estimatedName;
|
|
1796
|
+
UString s = GetMethodSpec(estimatedName);
|
|
1797
|
+
return s;
|
|
1798
|
+
}
|
|
1799
|
+
|
|
1800
|
+
bool CCompressDialog::IsMethodEqualTo(const UString &s)
|
|
1801
|
+
{
|
|
1802
|
+
UString estimatedName;
|
|
1803
|
+
const UString shortName = GetMethodSpec(estimatedName);
|
|
1804
|
+
if (s.IsEmpty())
|
|
1805
|
+
return shortName.IsEmpty();
|
|
1806
|
+
return s.IsEqualTo_NoCase(estimatedName);
|
|
1807
|
+
}
|
|
1808
|
+
|
|
1809
|
+
|
|
1810
|
+
UString CCompressDialog::GetEncryptionMethodSpec()
|
|
1811
|
+
{
|
|
1812
|
+
UString s;
|
|
1813
|
+
if (_encryptionMethod.GetCount() > 0
|
|
1814
|
+
&& _encryptionMethod.GetCurSel() != _default_encryptionMethod_Index)
|
|
1815
|
+
{
|
|
1816
|
+
_encryptionMethod.GetText(s);
|
|
1817
|
+
s.RemoveChar(L'-');
|
|
1818
|
+
}
|
|
1819
|
+
return s;
|
|
1820
|
+
}
|
|
1821
|
+
|
|
1822
|
+
|
|
1823
|
+
static const size_t k_Auto_Dict = (size_t)0 - 1;
|
|
1824
|
+
|
|
1825
|
+
static int Combo_AddDict2(NWindows::NControl::CComboBox &cb, size_t sizeReal, size_t sizeShow)
|
|
1826
|
+
{
|
|
1827
|
+
char c = 0;
|
|
1828
|
+
unsigned moveBits = 0;
|
|
1829
|
+
if ((sizeShow & 0xFFFFF) == 0) { moveBits = 20; c = 'M'; }
|
|
1830
|
+
else if ((sizeShow & 0x3FF) == 0) { moveBits = 10; c = 'K'; }
|
|
1831
|
+
AString s;
|
|
1832
|
+
s.Add_UInt64(sizeShow >> moveBits);
|
|
1833
|
+
s.Add_Space();
|
|
1834
|
+
if (c != 0)
|
|
1835
|
+
s.Add_Char(c);
|
|
1836
|
+
s.Add_Char('B');
|
|
1837
|
+
if (sizeReal == k_Auto_Dict)
|
|
1838
|
+
Modify_Auto(s);
|
|
1839
|
+
return (int)ComboBox_AddStringAscii_SetItemData(cb, s, (LPARAM)sizeReal);
|
|
1840
|
+
}
|
|
1841
|
+
|
|
1842
|
+
int CCompressDialog::AddDict2(size_t sizeReal, size_t sizeShow)
|
|
1843
|
+
{
|
|
1844
|
+
return Combo_AddDict2(m_Dictionary, sizeReal, sizeShow);
|
|
1845
|
+
}
|
|
1846
|
+
|
|
1847
|
+
int CCompressDialog::AddDict(size_t size)
|
|
1848
|
+
{
|
|
1849
|
+
return AddDict2(size, size);
|
|
1850
|
+
}
|
|
1851
|
+
|
|
1852
|
+
/*
|
|
1853
|
+
int CCompressDialog::AddDict_Chain(size_t size)
|
|
1854
|
+
{
|
|
1855
|
+
return Combo_AddDict2(m_Dictionary_Chain, size, size);
|
|
1856
|
+
}
|
|
1857
|
+
*/
|
|
1858
|
+
|
|
1859
|
+
void CCompressDialog::SetDictionary2()
|
|
1860
|
+
{
|
|
1861
|
+
m_Dictionary.ResetContent();
|
|
1862
|
+
// m_Dictionary_Chain.ResetContent();
|
|
1863
|
+
|
|
1864
|
+
// _auto_Dict = (UInt32)1 << 24; // we can use this dictSize to calculate _auto_Solid for unknown method for 7z
|
|
1865
|
+
_auto_Dict = (UInt32)(Int32)-1; // for debug
|
|
1866
|
+
// _auto_Dict_Chain = (UInt32)(Int32)-1; // for debug
|
|
1867
|
+
|
|
1868
|
+
const CArcInfoEx &ai = Get_ArcInfoEx();
|
|
1869
|
+
UInt32 defaultDict = (UInt32)(Int32)-1;
|
|
1870
|
+
// UInt32 defaultDict_Chain = (UInt32)(Int32)-1;
|
|
1871
|
+
{
|
|
1872
|
+
const int index = FindRegistryFormat(ai.Name);
|
|
1873
|
+
if (index >= 0)
|
|
1874
|
+
{
|
|
1875
|
+
const NCompression::CFormatOptions &fo = m_RegistryInfo.Formats[index];
|
|
1876
|
+
if (IsMethodEqualTo(fo.Method))
|
|
1877
|
+
{
|
|
1878
|
+
defaultDict = fo.Dictionary;
|
|
1879
|
+
// defaultDict_Chain = fo.DictionaryChain;
|
|
1880
|
+
}
|
|
1881
|
+
}
|
|
1882
|
+
}
|
|
1883
|
+
|
|
1884
|
+
const int methodID = GetMethodID();
|
|
1885
|
+
const UInt32 level = GetLevel2();
|
|
1886
|
+
|
|
1887
|
+
{
|
|
1888
|
+
RECT r, rLabel;
|
|
1889
|
+
GetClientRectOfItem(IDT_COMPRESS_DICTIONARY, rLabel);
|
|
1890
|
+
GetClientRectOfItem(IDC_COMPRESS_DICTIONARY, r);
|
|
1891
|
+
if (_dictionaryCombo_left == 0)
|
|
1892
|
+
_dictionaryCombo_left = r.left;
|
|
1893
|
+
|
|
1894
|
+
// bool showDict2;
|
|
1895
|
+
int newLableRight;
|
|
1896
|
+
int newDictLeft;
|
|
1897
|
+
|
|
1898
|
+
/*
|
|
1899
|
+
if (methodID == kZSTD)
|
|
1900
|
+
{
|
|
1901
|
+
showDict2 = true;
|
|
1902
|
+
newDictLeft = _dictionaryCombo_left;
|
|
1903
|
+
RECT r2;
|
|
1904
|
+
GetClientRectOfItem(IDC_COMPRESS_DICTIONARY2, r2);
|
|
1905
|
+
newLableRight = r2.left;
|
|
1906
|
+
}
|
|
1907
|
+
else
|
|
1908
|
+
*/
|
|
1909
|
+
{
|
|
1910
|
+
// showDict2 = false;
|
|
1911
|
+
RECT rBig;
|
|
1912
|
+
GetClientRectOfItem(IDC_COMPRESS_METHOD, rBig);
|
|
1913
|
+
newDictLeft= rBig.left;
|
|
1914
|
+
newLableRight = newDictLeft;
|
|
1915
|
+
}
|
|
1916
|
+
|
|
1917
|
+
if (newLableRight != rLabel.right)
|
|
1918
|
+
{
|
|
1919
|
+
rLabel.right = newLableRight;
|
|
1920
|
+
MoveItem_RECT(IDT_COMPRESS_DICTIONARY, rLabel);
|
|
1921
|
+
InvalidateRect(&rLabel);
|
|
1922
|
+
}
|
|
1923
|
+
if (newDictLeft != r.left)
|
|
1924
|
+
{
|
|
1925
|
+
r.left = newDictLeft;
|
|
1926
|
+
MoveItem_RECT(IDC_COMPRESS_DICTIONARY, r);
|
|
1927
|
+
// InvalidateRect(&r);
|
|
1928
|
+
}
|
|
1929
|
+
// ShowItem_Bool(IDC_COMPRESS_DICTIONARY2, showDict2);
|
|
1930
|
+
}
|
|
1931
|
+
|
|
1932
|
+
if (methodID < 0)
|
|
1933
|
+
return;
|
|
1934
|
+
|
|
1935
|
+
switch (methodID)
|
|
1936
|
+
{
|
|
1937
|
+
case kLZMA:
|
|
1938
|
+
case kLZMA2:
|
|
1939
|
+
{
|
|
1940
|
+
{
|
|
1941
|
+
_auto_Dict = level <= 4 ?
|
|
1942
|
+
(UInt32)1 << (level * 2 + 16) :
|
|
1943
|
+
level <= sizeof(size_t) / 2 + 4 ?
|
|
1944
|
+
(UInt32)1 << (level + 20) :
|
|
1945
|
+
(UInt32)1 << (sizeof(size_t) / 2 + 24);
|
|
1946
|
+
}
|
|
1947
|
+
|
|
1948
|
+
// we use threshold 3.75 GiB to switch to kLzmaMaxDictSize.
|
|
1949
|
+
if (defaultDict != (UInt32)(Int32)-1
|
|
1950
|
+
&& defaultDict >= ((UInt32)15 << 28))
|
|
1951
|
+
defaultDict = kLzmaMaxDictSize;
|
|
1952
|
+
|
|
1953
|
+
const size_t kLzmaMaxDictSize_Up = (size_t)1 << (20 + sizeof(size_t) / 4 * 6);
|
|
1954
|
+
|
|
1955
|
+
int curSel = AddDict2(k_Auto_Dict, _auto_Dict);
|
|
1956
|
+
|
|
1957
|
+
for (unsigned i = (16 - 1) * 2; i <= (32 - 1) * 2; i++)
|
|
1958
|
+
{
|
|
1959
|
+
if (i < (20 - 1) * 2
|
|
1960
|
+
&& i != (16 - 1) * 2
|
|
1961
|
+
&& i != (18 - 1) * 2)
|
|
1962
|
+
continue;
|
|
1963
|
+
if (i == (20 - 1) * 2 + 1)
|
|
1964
|
+
continue;
|
|
1965
|
+
const size_t dict_up = (size_t)(2 + (i & 1)) << (i / 2);
|
|
1966
|
+
size_t dict = dict_up;
|
|
1967
|
+
if (dict_up >= kLzmaMaxDictSize)
|
|
1968
|
+
dict = kLzmaMaxDictSize; // we reduce dictionary
|
|
1969
|
+
|
|
1970
|
+
const int index = AddDict(dict);
|
|
1971
|
+
// AddDict2(dict, dict_up); // for debug : we show 4 GB
|
|
1972
|
+
|
|
1973
|
+
// const UInt32 numThreads = 2;
|
|
1974
|
+
// const UInt64 memUsage = GetMemoryUsageComp_Threads_Dict(numThreads, dict);
|
|
1975
|
+
if (defaultDict != (UInt32)(Int32)-1)
|
|
1976
|
+
if (dict <= defaultDict || curSel <= 0)
|
|
1977
|
+
// if (!maxRamSize_Defined || memUsage <= maxRamSize)
|
|
1978
|
+
curSel = index;
|
|
1979
|
+
if (dict_up >= kLzmaMaxDictSize_Up)
|
|
1980
|
+
break;
|
|
1981
|
+
}
|
|
1982
|
+
|
|
1983
|
+
m_Dictionary.SetCurSel(curSel);
|
|
1984
|
+
break;
|
|
1985
|
+
}
|
|
1986
|
+
|
|
1987
|
+
/*
|
|
1988
|
+
case kZSTD:
|
|
1989
|
+
{
|
|
1990
|
+
if (defaultDict != (UInt32)(Int32)-1 &&
|
|
1991
|
+
defaultDict > kZstd_MAX_DictSize)
|
|
1992
|
+
defaultDict = kZstd_MAX_DictSize;
|
|
1993
|
+
|
|
1994
|
+
if (defaultDict_Chain != (UInt32)(Int32)-1 &&
|
|
1995
|
+
defaultDict_Chain > kZstd_MAX_DictSize_Chain)
|
|
1996
|
+
defaultDict_Chain = kZstd_MAX_DictSize_Chain;
|
|
1997
|
+
|
|
1998
|
+
{
|
|
1999
|
+
CZstdEncProps props;
|
|
2000
|
+
ZstdEncProps_Init(&props);
|
|
2001
|
+
// props.level_zstd = level;
|
|
2002
|
+
props.level_7z = level;
|
|
2003
|
+
ZstdEncProps_Set_WindowSize(&props, defaultDict != (UInt32)(Int32)-1 ? defaultDict: 0);
|
|
2004
|
+
ZstdEncProps_NormalizeFull(&props);
|
|
2005
|
+
_auto_Dict_Chain = (UInt32)1 << props.windowLog_Chain;
|
|
2006
|
+
}
|
|
2007
|
+
{
|
|
2008
|
+
CZstdEncProps props;
|
|
2009
|
+
ZstdEncProps_Init(&props);
|
|
2010
|
+
// props.level_zstd = level;
|
|
2011
|
+
props.level_7z = level;
|
|
2012
|
+
ZstdEncProps_Set_WindowChainSize(&props, defaultDict_Chain != (UInt32)(Int32)-1 ? defaultDict_Chain: 0);
|
|
2013
|
+
ZstdEncProps_NormalizeFull(&props);
|
|
2014
|
+
_auto_Dict = (UInt32)1 << props.windowLog;
|
|
2015
|
+
}
|
|
2016
|
+
|
|
2017
|
+
// if there is collision of two window sizes, we reduce dict_Chain
|
|
2018
|
+
if (defaultDict != (UInt32)(Int32)-1 &&
|
|
2019
|
+
defaultDict_Chain != (UInt32)(Int32)-1 &&
|
|
2020
|
+
defaultDict < defaultDict_Chain)
|
|
2021
|
+
defaultDict_Chain = defaultDict;
|
|
2022
|
+
|
|
2023
|
+
{
|
|
2024
|
+
int curSel = AddDict2(k_Auto_Dict, _auto_Dict);
|
|
2025
|
+
|
|
2026
|
+
// defaultDict = 12 << 10; // for debug
|
|
2027
|
+
const UInt32 kWinStart = 18;
|
|
2028
|
+
if (defaultDict != 0 && defaultDict < ((UInt32)1 << kWinStart))
|
|
2029
|
+
curSel = AddDict(defaultDict);
|
|
2030
|
+
|
|
2031
|
+
for (unsigned i = kWinStart; i <= MY_ZSTD_WINDOWLOG_MAX; i++)
|
|
2032
|
+
{
|
|
2033
|
+
const size_t dict = (size_t)1 << i;
|
|
2034
|
+
const int index = AddDict(dict);
|
|
2035
|
+
if (defaultDict != (UInt32)(Int32)-1)
|
|
2036
|
+
if (dict <= defaultDict || curSel <= 0)
|
|
2037
|
+
curSel = index;
|
|
2038
|
+
}
|
|
2039
|
+
m_Dictionary.SetCurSel(curSel);
|
|
2040
|
+
}
|
|
2041
|
+
|
|
2042
|
+
{
|
|
2043
|
+
int curSel = Combo_AddDict2(m_Dictionary_Chain, k_Auto_Dict, _auto_Dict_Chain);
|
|
2044
|
+
|
|
2045
|
+
// defaultDict_Chain = 10 << 10; // for debug
|
|
2046
|
+
const UInt32 kWinChainStart = 15;
|
|
2047
|
+
if (defaultDict_Chain != 0 && defaultDict_Chain < ((UInt32)1 << kWinChainStart))
|
|
2048
|
+
curSel = AddDict_Chain(defaultDict_Chain);
|
|
2049
|
+
|
|
2050
|
+
for (unsigned i = kWinChainStart; i <= kMaxDictChain; i++)
|
|
2051
|
+
{
|
|
2052
|
+
const size_t dict = (size_t)1 << i;
|
|
2053
|
+
if (defaultDict != (UInt32)(Int32)-1 && dict > defaultDict)
|
|
2054
|
+
break;
|
|
2055
|
+
const int index = AddDict_Chain(dict);
|
|
2056
|
+
if (defaultDict_Chain != (UInt32)(Int32)-1)
|
|
2057
|
+
if (dict <= defaultDict_Chain || curSel <= 0)
|
|
2058
|
+
curSel = index;
|
|
2059
|
+
}
|
|
2060
|
+
m_Dictionary_Chain.SetCurSel(curSel);
|
|
2061
|
+
}
|
|
2062
|
+
|
|
2063
|
+
break;
|
|
2064
|
+
}
|
|
2065
|
+
*/
|
|
2066
|
+
|
|
2067
|
+
case kPPMd:
|
|
2068
|
+
{
|
|
2069
|
+
_auto_Dict = (UInt32)1 << (level + 19);
|
|
2070
|
+
|
|
2071
|
+
const UInt32 kPpmd_Default_4g = (UInt32)0 - ((UInt32)1 << 10);
|
|
2072
|
+
const size_t kPpmd_MaxDictSize_Up = (size_t)1 << (29 + sizeof(size_t) / 8);
|
|
2073
|
+
|
|
2074
|
+
if (defaultDict != (UInt32)(Int32)-1
|
|
2075
|
+
&& defaultDict >= ((UInt32)15 << 28)) // threshold
|
|
2076
|
+
defaultDict = kPpmd_Default_4g;
|
|
2077
|
+
|
|
2078
|
+
int curSel = AddDict2(k_Auto_Dict, _auto_Dict);
|
|
2079
|
+
|
|
2080
|
+
for (unsigned i = (20 - 1) * 2; i <= (32 - 1) * 2; i++)
|
|
2081
|
+
{
|
|
2082
|
+
if (i == (20 - 1) * 2 + 1)
|
|
2083
|
+
continue;
|
|
2084
|
+
|
|
2085
|
+
const size_t dict_up = (size_t)(2 + (i & 1)) << (i / 2);
|
|
2086
|
+
size_t dict = dict_up;
|
|
2087
|
+
if (dict_up >= kPpmd_Default_4g)
|
|
2088
|
+
dict = kPpmd_Default_4g;
|
|
2089
|
+
|
|
2090
|
+
const int index = AddDict2(dict, dict_up);
|
|
2091
|
+
// AddDict2((UInt32)((UInt32)0 - 2), dict_up); // for debug
|
|
2092
|
+
// AddDict(dict_up); // for debug
|
|
2093
|
+
// const UInt64 memUsage = GetMemoryUsageComp_Threads_Dict(1, dict);
|
|
2094
|
+
if (defaultDict != (UInt32)(Int32)-1)
|
|
2095
|
+
if (dict <= defaultDict || curSel <= 0)
|
|
2096
|
+
// if (!maxRamSize_Defined || memUsage <= maxRamSize)
|
|
2097
|
+
curSel = index;
|
|
2098
|
+
if (dict_up >= kPpmd_MaxDictSize_Up)
|
|
2099
|
+
break;
|
|
2100
|
+
}
|
|
2101
|
+
m_Dictionary.SetCurSel(curSel);
|
|
2102
|
+
break;
|
|
2103
|
+
}
|
|
2104
|
+
|
|
2105
|
+
case kPPMdZip:
|
|
2106
|
+
{
|
|
2107
|
+
_auto_Dict = (UInt32)1 << (level + 19);
|
|
2108
|
+
|
|
2109
|
+
int curSel = AddDict2(k_Auto_Dict, _auto_Dict);
|
|
2110
|
+
|
|
2111
|
+
for (unsigned i = 20; i <= 28; i++)
|
|
2112
|
+
{
|
|
2113
|
+
const UInt32 dict = (UInt32)1 << i;
|
|
2114
|
+
const int index = AddDict(dict);
|
|
2115
|
+
// const UInt64 memUsage = GetMemoryUsageComp_Threads_Dict(1, dict);
|
|
2116
|
+
if (defaultDict != (UInt32)(Int32)-1)
|
|
2117
|
+
if (dict <= defaultDict || curSel <= 0)
|
|
2118
|
+
// if (!maxRamSize_Defined || memUsage <= maxRamSize)
|
|
2119
|
+
curSel = index;
|
|
2120
|
+
}
|
|
2121
|
+
m_Dictionary.SetCurSel(curSel);
|
|
2122
|
+
break;
|
|
2123
|
+
}
|
|
2124
|
+
|
|
2125
|
+
case kDeflate:
|
|
2126
|
+
case kDeflate64:
|
|
2127
|
+
{
|
|
2128
|
+
const UInt32 dict = (methodID == kDeflate ? (UInt32)(1 << 15) : (UInt32)(1 << 16));
|
|
2129
|
+
_auto_Dict = dict;
|
|
2130
|
+
AddDict2(k_Auto_Dict, _auto_Dict);
|
|
2131
|
+
m_Dictionary.SetCurSel(0);
|
|
2132
|
+
// EnableItem(IDC_COMPRESS_DICTIONARY, false);
|
|
2133
|
+
break;
|
|
2134
|
+
}
|
|
2135
|
+
|
|
2136
|
+
case kBZip2:
|
|
2137
|
+
{
|
|
2138
|
+
{
|
|
2139
|
+
if (level >= 5) _auto_Dict = (900 << 10);
|
|
2140
|
+
else if (level >= 3) _auto_Dict = (500 << 10);
|
|
2141
|
+
else _auto_Dict = (100 << 10);
|
|
2142
|
+
}
|
|
2143
|
+
|
|
2144
|
+
int curSel = AddDict2(k_Auto_Dict, _auto_Dict);
|
|
2145
|
+
|
|
2146
|
+
for (unsigned i = 1; i <= 9; i++)
|
|
2147
|
+
{
|
|
2148
|
+
const UInt32 dict = ((UInt32)i * 100) << 10;
|
|
2149
|
+
AddDict(dict);
|
|
2150
|
+
// AddDict2(i * 100000, dict);
|
|
2151
|
+
if (defaultDict != (UInt32)(Int32)-1)
|
|
2152
|
+
if (i <= defaultDict / 100000 || curSel <= 0)
|
|
2153
|
+
curSel = m_Dictionary.GetCount() - 1;
|
|
2154
|
+
}
|
|
2155
|
+
m_Dictionary.SetCurSel(curSel);
|
|
2156
|
+
break;
|
|
2157
|
+
}
|
|
2158
|
+
|
|
2159
|
+
case kCopy:
|
|
2160
|
+
{
|
|
2161
|
+
_auto_Dict = 0;
|
|
2162
|
+
AddDict(0);
|
|
2163
|
+
m_Dictionary.SetCurSel(0);
|
|
2164
|
+
break;
|
|
2165
|
+
}
|
|
2166
|
+
}
|
|
2167
|
+
}
|
|
2168
|
+
|
|
2169
|
+
|
|
2170
|
+
UInt32 CCompressDialog::GetComboValue(NWindows::NControl::CComboBox &c, int defMax)
|
|
2171
|
+
{
|
|
2172
|
+
if (c.GetCount() <= defMax)
|
|
2173
|
+
return (UInt32)(Int32)-1;
|
|
2174
|
+
return (UInt32)c.GetItemData_of_CurSel();
|
|
2175
|
+
}
|
|
2176
|
+
|
|
2177
|
+
|
|
2178
|
+
UInt64 CCompressDialog::GetComboValue_64(NWindows::NControl::CComboBox &c, int defMax)
|
|
2179
|
+
{
|
|
2180
|
+
if (c.GetCount() <= defMax)
|
|
2181
|
+
return (UInt64)(Int64)-1;
|
|
2182
|
+
// LRESULT is signed. so we cast it to unsigned size_t at first:
|
|
2183
|
+
LRESULT val = c.GetItemData_of_CurSel();
|
|
2184
|
+
if (val == (LPARAM)(INT_PTR)(-1))
|
|
2185
|
+
return (UInt64)(Int64)-1;
|
|
2186
|
+
return (UInt64)(size_t)c.GetItemData_of_CurSel();
|
|
2187
|
+
}
|
|
2188
|
+
|
|
2189
|
+
UInt32 CCompressDialog::GetLevel2()
|
|
2190
|
+
{
|
|
2191
|
+
UInt32 level = GetLevel();
|
|
2192
|
+
if (level == (UInt32)(Int32)-1)
|
|
2193
|
+
level = 5;
|
|
2194
|
+
return level;
|
|
2195
|
+
}
|
|
2196
|
+
|
|
2197
|
+
|
|
2198
|
+
int CCompressDialog::AddOrder(UInt32 size)
|
|
2199
|
+
{
|
|
2200
|
+
char s[32];
|
|
2201
|
+
ConvertUInt32ToString(size, s);
|
|
2202
|
+
return (int)ComboBox_AddStringAscii_SetItemData(m_Order, s, (LPARAM)size);
|
|
2203
|
+
}
|
|
2204
|
+
|
|
2205
|
+
int CCompressDialog::AddOrder_Auto()
|
|
2206
|
+
{
|
|
2207
|
+
AString s;
|
|
2208
|
+
s.Add_UInt32(_auto_Order);
|
|
2209
|
+
Modify_Auto(s);
|
|
2210
|
+
return (int)ComboBox_AddStringAscii_SetItemData(m_Order, s, (LPARAM)(INT_PTR)(-1));
|
|
2211
|
+
}
|
|
2212
|
+
|
|
2213
|
+
void CCompressDialog::SetOrder2()
|
|
2214
|
+
{
|
|
2215
|
+
m_Order.ResetContent();
|
|
2216
|
+
|
|
2217
|
+
_auto_Order = 1;
|
|
2218
|
+
|
|
2219
|
+
const CArcInfoEx &ai = Get_ArcInfoEx();
|
|
2220
|
+
UInt32 defaultOrder = (UInt32)(Int32)-1;
|
|
2221
|
+
|
|
2222
|
+
{
|
|
2223
|
+
const int index = FindRegistryFormat(ai.Name);
|
|
2224
|
+
if (index >= 0)
|
|
2225
|
+
{
|
|
2226
|
+
const NCompression::CFormatOptions &fo = m_RegistryInfo.Formats[index];
|
|
2227
|
+
if (IsMethodEqualTo(fo.Method))
|
|
2228
|
+
defaultOrder = fo.Order;
|
|
2229
|
+
}
|
|
2230
|
+
}
|
|
2231
|
+
|
|
2232
|
+
const int methodID = GetMethodID();
|
|
2233
|
+
const UInt32 level = GetLevel2();
|
|
2234
|
+
if (methodID < 0)
|
|
2235
|
+
return;
|
|
2236
|
+
|
|
2237
|
+
switch (methodID)
|
|
2238
|
+
{
|
|
2239
|
+
case kLZMA:
|
|
2240
|
+
case kLZMA2:
|
|
2241
|
+
{
|
|
2242
|
+
_auto_Order = (level < 7 ? 32 : 64);
|
|
2243
|
+
int curSel = AddOrder_Auto();
|
|
2244
|
+
for (unsigned i = 2 * 2; i < 8 * 2; i++)
|
|
2245
|
+
{
|
|
2246
|
+
UInt32 order = ((UInt32)(2 + (i & 1)) << (i / 2));
|
|
2247
|
+
if (order > 256)
|
|
2248
|
+
order = 273;
|
|
2249
|
+
const int index = AddOrder(order);
|
|
2250
|
+
if (defaultOrder != (UInt32)(Int32)-1)
|
|
2251
|
+
if (order <= defaultOrder || curSel <= 0)
|
|
2252
|
+
curSel = index;
|
|
2253
|
+
}
|
|
2254
|
+
m_Order.SetCurSel(curSel);
|
|
2255
|
+
break;
|
|
2256
|
+
}
|
|
2257
|
+
|
|
2258
|
+
/*
|
|
2259
|
+
case kZSTD:
|
|
2260
|
+
{
|
|
2261
|
+
{
|
|
2262
|
+
CZstdEncProps props;
|
|
2263
|
+
ZstdEncProps_Init(&props);
|
|
2264
|
+
// props.level_zstd = level;
|
|
2265
|
+
props.level_7z = level;
|
|
2266
|
+
ZstdEncProps_NormalizeFull(&props);
|
|
2267
|
+
_auto_Order = props.targetLength;
|
|
2268
|
+
if (props.strategy < ZSTD_strategy_btopt)
|
|
2269
|
+
{
|
|
2270
|
+
// ZSTD_strategy_fast uses targetLength to change fast level.
|
|
2271
|
+
// targetLength probably is used only in ZSTD_strategy_btopt and higher
|
|
2272
|
+
break;
|
|
2273
|
+
}
|
|
2274
|
+
}
|
|
2275
|
+
int curSel = AddOrder_Auto();
|
|
2276
|
+
|
|
2277
|
+
for (unsigned i = 6; i <= 9 * 2; i++)
|
|
2278
|
+
{
|
|
2279
|
+
UInt32 order = ((UInt32)(2 + (i & 1)) << (i / 2));
|
|
2280
|
+
// if (order > 999) order = 999;
|
|
2281
|
+
const int index = AddOrder(order);
|
|
2282
|
+
if (defaultOrder != (UInt32)(Int32)-1)
|
|
2283
|
+
if (order <= defaultOrder || curSel <= 0)
|
|
2284
|
+
curSel = index;
|
|
2285
|
+
}
|
|
2286
|
+
m_Order.SetCurSel(curSel);
|
|
2287
|
+
break;
|
|
2288
|
+
}
|
|
2289
|
+
*/
|
|
2290
|
+
|
|
2291
|
+
case kDeflate:
|
|
2292
|
+
case kDeflate64:
|
|
2293
|
+
{
|
|
2294
|
+
{
|
|
2295
|
+
if (level >= 9) _auto_Order = 128;
|
|
2296
|
+
else if (level >= 7) _auto_Order = 64;
|
|
2297
|
+
else _auto_Order = 32;
|
|
2298
|
+
}
|
|
2299
|
+
int curSel = AddOrder_Auto();
|
|
2300
|
+
for (unsigned i = 2 * 2; i < 8 * 2; i++)
|
|
2301
|
+
{
|
|
2302
|
+
UInt32 order = ((UInt32)(2 + (i & 1)) << (i / 2));
|
|
2303
|
+
if (order > 256)
|
|
2304
|
+
order = (methodID == kDeflate64 ? 257 : 258);
|
|
2305
|
+
const int index = AddOrder(order);
|
|
2306
|
+
if (defaultOrder != (UInt32)(Int32)-1)
|
|
2307
|
+
if (order <= defaultOrder || curSel <= 0)
|
|
2308
|
+
curSel = index;
|
|
2309
|
+
}
|
|
2310
|
+
|
|
2311
|
+
m_Order.SetCurSel(curSel);
|
|
2312
|
+
break;
|
|
2313
|
+
}
|
|
2314
|
+
|
|
2315
|
+
case kPPMd:
|
|
2316
|
+
{
|
|
2317
|
+
{
|
|
2318
|
+
if (level >= 9) _auto_Order = 32;
|
|
2319
|
+
else if (level >= 7) _auto_Order = 16;
|
|
2320
|
+
else if (level >= 5) _auto_Order = 6;
|
|
2321
|
+
else _auto_Order = 4;
|
|
2322
|
+
}
|
|
2323
|
+
|
|
2324
|
+
int curSel = AddOrder_Auto();
|
|
2325
|
+
|
|
2326
|
+
for (unsigned i = 0;; i++)
|
|
2327
|
+
{
|
|
2328
|
+
UInt32 order = i + 2;
|
|
2329
|
+
if (i >= 2)
|
|
2330
|
+
order = (4 + ((i - 2) & 3)) << ((i - 2) / 4);
|
|
2331
|
+
const int index = AddOrder(order);
|
|
2332
|
+
if (defaultOrder != (UInt32)(Int32)-1)
|
|
2333
|
+
if (order <= defaultOrder || curSel <= 0)
|
|
2334
|
+
curSel = index;
|
|
2335
|
+
if (order >= 32)
|
|
2336
|
+
break;
|
|
2337
|
+
}
|
|
2338
|
+
m_Order.SetCurSel(curSel);
|
|
2339
|
+
break;
|
|
2340
|
+
}
|
|
2341
|
+
|
|
2342
|
+
case kPPMdZip:
|
|
2343
|
+
{
|
|
2344
|
+
_auto_Order = level + 3;
|
|
2345
|
+
int curSel = AddOrder_Auto();
|
|
2346
|
+
for (unsigned i = 2; i <= 16; i++)
|
|
2347
|
+
{
|
|
2348
|
+
const int index = AddOrder(i);
|
|
2349
|
+
if (defaultOrder != (UInt32)(Int32)-1)
|
|
2350
|
+
if (i <= defaultOrder || curSel <= 0)
|
|
2351
|
+
curSel = index;
|
|
2352
|
+
}
|
|
2353
|
+
m_Order.SetCurSel(curSel);
|
|
2354
|
+
break;
|
|
2355
|
+
}
|
|
2356
|
+
|
|
2357
|
+
// case kBZip2:
|
|
2358
|
+
default:
|
|
2359
|
+
break;
|
|
2360
|
+
}
|
|
2361
|
+
}
|
|
2362
|
+
|
|
2363
|
+
bool CCompressDialog::GetOrderMode()
|
|
2364
|
+
{
|
|
2365
|
+
switch (GetMethodID())
|
|
2366
|
+
{
|
|
2367
|
+
case kPPMd:
|
|
2368
|
+
case kPPMdZip:
|
|
2369
|
+
return true;
|
|
2370
|
+
}
|
|
2371
|
+
return false;
|
|
2372
|
+
}
|
|
2373
|
+
|
|
2374
|
+
|
|
2375
|
+
static UInt64 Get_Lzma2_ChunkSize(UInt64 dict)
|
|
2376
|
+
{
|
|
2377
|
+
// we use same default chunk sizes as defined in 7z encoder and lzma2 encoder
|
|
2378
|
+
UInt64 cs = (UInt64)dict << 2;
|
|
2379
|
+
const UInt32 kMinSize = (UInt32)1 << 20;
|
|
2380
|
+
const UInt32 kMaxSize = (UInt32)1 << 28;
|
|
2381
|
+
if (cs < kMinSize) cs = kMinSize;
|
|
2382
|
+
if (cs > kMaxSize) cs = kMaxSize;
|
|
2383
|
+
if (cs < dict) cs = dict;
|
|
2384
|
+
cs += (kMinSize - 1);
|
|
2385
|
+
cs &= ~(UInt64)(kMinSize - 1);
|
|
2386
|
+
return cs;
|
|
2387
|
+
}
|
|
2388
|
+
|
|
2389
|
+
|
|
2390
|
+
static void Add_Size(AString &s, UInt64 val)
|
|
2391
|
+
{
|
|
2392
|
+
unsigned moveBits = 0;
|
|
2393
|
+
char c = 0;
|
|
2394
|
+
if ((val & 0x3FFFFFFF) == 0) { moveBits = 30; c = 'G'; }
|
|
2395
|
+
else if ((val & 0xFFFFF) == 0) { moveBits = 20; c = 'M'; }
|
|
2396
|
+
else if ((val & 0x3FF) == 0) { moveBits = 10; c = 'K'; }
|
|
2397
|
+
s.Add_UInt64(val >> moveBits);
|
|
2398
|
+
s.Add_Space();
|
|
2399
|
+
if (moveBits != 0)
|
|
2400
|
+
s.Add_Char(c);
|
|
2401
|
+
s.Add_Char('B');
|
|
2402
|
+
}
|
|
2403
|
+
|
|
2404
|
+
|
|
2405
|
+
void CCompressDialog::SetSolidBlockSize2()
|
|
2406
|
+
{
|
|
2407
|
+
m_Solid.ResetContent();
|
|
2408
|
+
_auto_Solid = 1 << 20;
|
|
2409
|
+
|
|
2410
|
+
const CFormatInfo &fi = g_Formats[GetStaticFormatIndex()];
|
|
2411
|
+
if (!fi.Solid_())
|
|
2412
|
+
return;
|
|
2413
|
+
|
|
2414
|
+
const UInt32 level = GetLevel2();
|
|
2415
|
+
if (level == 0)
|
|
2416
|
+
return;
|
|
2417
|
+
|
|
2418
|
+
UInt64 dict = GetDict2();
|
|
2419
|
+
if (dict == (UInt64)(Int64)-1)
|
|
2420
|
+
{
|
|
2421
|
+
dict = 1 << 25; // default dict for unknown methods
|
|
2422
|
+
// return;
|
|
2423
|
+
}
|
|
2424
|
+
|
|
2425
|
+
|
|
2426
|
+
UInt32 defaultBlockSize = (UInt32)(Int32)-1;
|
|
2427
|
+
|
|
2428
|
+
const CArcInfoEx &ai = Get_ArcInfoEx();
|
|
2429
|
+
|
|
2430
|
+
/*
|
|
2431
|
+
if (usePrevDictionary)
|
|
2432
|
+
defaultBlockSize = GetBlockSizeSpec();
|
|
2433
|
+
else
|
|
2434
|
+
*/
|
|
2435
|
+
{
|
|
2436
|
+
const int index = FindRegistryFormat(ai.Name);
|
|
2437
|
+
if (index >= 0)
|
|
2438
|
+
{
|
|
2439
|
+
const NCompression::CFormatOptions &fo = m_RegistryInfo.Formats[index];
|
|
2440
|
+
if (IsMethodEqualTo(fo.Method))
|
|
2441
|
+
defaultBlockSize = fo.BlockLogSize;
|
|
2442
|
+
}
|
|
2443
|
+
}
|
|
2444
|
+
|
|
2445
|
+
const bool is7z = ai.Is_7z();
|
|
2446
|
+
|
|
2447
|
+
const UInt64 cs = Get_Lzma2_ChunkSize(dict);
|
|
2448
|
+
|
|
2449
|
+
// Solid Block Size
|
|
2450
|
+
UInt64 blockSize = cs; // for xz
|
|
2451
|
+
|
|
2452
|
+
if (is7z)
|
|
2453
|
+
{
|
|
2454
|
+
// we use same default block sizes as defined in 7z encoder
|
|
2455
|
+
UInt64 kMaxSize = (UInt64)1 << 32;
|
|
2456
|
+
const int methodId = GetMethodID();
|
|
2457
|
+
if (methodId == kLZMA2)
|
|
2458
|
+
{
|
|
2459
|
+
blockSize = cs << 6;
|
|
2460
|
+
kMaxSize = (UInt64)1 << 34;
|
|
2461
|
+
}
|
|
2462
|
+
else
|
|
2463
|
+
{
|
|
2464
|
+
UInt64 dict2 = dict;
|
|
2465
|
+
if (methodId == kBZip2)
|
|
2466
|
+
{
|
|
2467
|
+
dict2 /= 100000;
|
|
2468
|
+
if (dict2 < 1)
|
|
2469
|
+
dict2 = 1;
|
|
2470
|
+
dict2 *= 100000;
|
|
2471
|
+
}
|
|
2472
|
+
blockSize = dict2 << 7;
|
|
2473
|
+
}
|
|
2474
|
+
|
|
2475
|
+
const UInt32 kMinSize = (UInt32)1 << 24;
|
|
2476
|
+
if (blockSize < kMinSize) blockSize = kMinSize;
|
|
2477
|
+
if (blockSize > kMaxSize) blockSize = kMaxSize;
|
|
2478
|
+
}
|
|
2479
|
+
|
|
2480
|
+
_auto_Solid = blockSize;
|
|
2481
|
+
|
|
2482
|
+
int curSel;
|
|
2483
|
+
{
|
|
2484
|
+
AString s;
|
|
2485
|
+
Add_Size(s, _auto_Solid);
|
|
2486
|
+
Modify_Auto(s);
|
|
2487
|
+
curSel = (int)ComboBox_AddStringAscii_SetItemData(m_Solid, s, (LPARAM)(UInt32)(Int32)-1);
|
|
2488
|
+
}
|
|
2489
|
+
|
|
2490
|
+
if (is7z)
|
|
2491
|
+
{
|
|
2492
|
+
UString s ('-');
|
|
2493
|
+
// kSolidLog_NoSolid = 0 for xz means default blockSize
|
|
2494
|
+
if (is7z)
|
|
2495
|
+
LangString(IDS_COMPRESS_NON_SOLID, s);
|
|
2496
|
+
const int index = (int)m_Solid.AddString_SetItemData(s, (LPARAM)(UInt32)kSolidLog_NoSolid);
|
|
2497
|
+
if (defaultBlockSize == kSolidLog_NoSolid)
|
|
2498
|
+
curSel = index;
|
|
2499
|
+
}
|
|
2500
|
+
|
|
2501
|
+
for (unsigned i = 20; i <= 36; i++)
|
|
2502
|
+
{
|
|
2503
|
+
AString s;
|
|
2504
|
+
Add_Size(s, (UInt64)1 << i);
|
|
2505
|
+
const int index = (int)ComboBox_AddStringAscii_SetItemData(m_Solid, s, (LPARAM)(UInt32)i);
|
|
2506
|
+
if (defaultBlockSize != (UInt32)(Int32)-1)
|
|
2507
|
+
if (i <= defaultBlockSize || index <= 1)
|
|
2508
|
+
curSel = index;
|
|
2509
|
+
}
|
|
2510
|
+
|
|
2511
|
+
{
|
|
2512
|
+
const int index = (int)m_Solid.AddString_SetItemData(
|
|
2513
|
+
LangString(IDS_COMPRESS_SOLID), (LPARAM)kSolidLog_FullSolid);
|
|
2514
|
+
if (defaultBlockSize == kSolidLog_FullSolid)
|
|
2515
|
+
curSel = index;
|
|
2516
|
+
}
|
|
2517
|
+
|
|
2518
|
+
m_Solid.SetCurSel(curSel);
|
|
2519
|
+
}
|
|
2520
|
+
|
|
2521
|
+
|
|
2522
|
+
/*
|
|
2523
|
+
static void ZstdEncProps_SetDictProps_From_CompressDialog(CZstdEncProps *props, CCompressDialog &cd)
|
|
2524
|
+
{
|
|
2525
|
+
{
|
|
2526
|
+
const UInt64 d64 = cd.GetDictSpec();
|
|
2527
|
+
UInt32 d32 = 0; // 0 is default for ZstdEncProps::windowLog
|
|
2528
|
+
if (d64 != (UInt64)(Int64)-1)
|
|
2529
|
+
{
|
|
2530
|
+
d32 = (UInt32)d64;
|
|
2531
|
+
if (d32 != d64)
|
|
2532
|
+
d32 = (UInt32)(Int32)-2;
|
|
2533
|
+
}
|
|
2534
|
+
ZstdEncProps_Set_WindowSize(props, d32);
|
|
2535
|
+
}
|
|
2536
|
+
{
|
|
2537
|
+
const UInt64 d64 = cd.GetDictChainSpec();
|
|
2538
|
+
UInt32 d32 = 0; // 0 is default for ZstdEncProps::windowLog_Chain
|
|
2539
|
+
if (d64 != (UInt64)(Int64)-1)
|
|
2540
|
+
{
|
|
2541
|
+
d32 = (UInt32)d64;
|
|
2542
|
+
if (d32 != d64)
|
|
2543
|
+
d32 = (UInt32)(Int32)-2;
|
|
2544
|
+
}
|
|
2545
|
+
ZstdEncProps_Set_WindowChainSize(props, d32);
|
|
2546
|
+
}
|
|
2547
|
+
}
|
|
2548
|
+
|
|
2549
|
+
static bool Is_Zstd_Mt_Supported()
|
|
2550
|
+
{
|
|
2551
|
+
if (!GetProcAddress(GetModuleHandle(TEXT("kernel32.dll")), "InitializeConditionVariable"))
|
|
2552
|
+
return false;
|
|
2553
|
+
return true;
|
|
2554
|
+
}
|
|
2555
|
+
*/
|
|
2556
|
+
|
|
2557
|
+
static const char * const k_ST_Threads = " (ST)";
|
|
2558
|
+
|
|
2559
|
+
void CCompressDialog::SetNumThreads2()
|
|
2560
|
+
{
|
|
2561
|
+
_auto_NumThreads = 1;
|
|
2562
|
+
|
|
2563
|
+
m_NumThreads.ResetContent();
|
|
2564
|
+
const CFormatInfo &fi = g_Formats[GetStaticFormatIndex()];
|
|
2565
|
+
if (!fi.MultiThread_())
|
|
2566
|
+
return;
|
|
2567
|
+
|
|
2568
|
+
UInt32 numCPUs = 1; // process threads
|
|
2569
|
+
UInt32 numHardwareThreads = 1; // system threads
|
|
2570
|
+
NSystem::CProcessAffinity threadsInfo;
|
|
2571
|
+
threadsInfo.InitST();
|
|
2572
|
+
#ifndef Z7_ST
|
|
2573
|
+
threadsInfo.Get_and_return_NumProcessThreads_and_SysThreads(numCPUs, numHardwareThreads);
|
|
2574
|
+
#endif
|
|
2575
|
+
|
|
2576
|
+
AString s ("/ ");
|
|
2577
|
+
{
|
|
2578
|
+
s.Add_UInt32(numCPUs);
|
|
2579
|
+
if (numCPUs != numHardwareThreads)
|
|
2580
|
+
{
|
|
2581
|
+
s += " / ";
|
|
2582
|
+
s.Add_UInt32(numHardwareThreads);
|
|
2583
|
+
}
|
|
2584
|
+
SetItemTextA(IDT_COMPRESS_HARDWARE_THREADS, s.Ptr());
|
|
2585
|
+
}
|
|
2586
|
+
|
|
2587
|
+
UInt32 defaultValue = numCPUs;
|
|
2588
|
+
bool useAutoThreads = true;
|
|
2589
|
+
|
|
2590
|
+
{
|
|
2591
|
+
const CArcInfoEx &ai = Get_ArcInfoEx();
|
|
2592
|
+
const int index = FindRegistryFormat(ai.Name);
|
|
2593
|
+
if (index >= 0)
|
|
2594
|
+
{
|
|
2595
|
+
const NCompression::CFormatOptions &fo = m_RegistryInfo.Formats[index];
|
|
2596
|
+
if (IsMethodEqualTo(fo.Method) && fo.NumThreads != (UInt32)(Int32)-1)
|
|
2597
|
+
{
|
|
2598
|
+
defaultValue = fo.NumThreads;
|
|
2599
|
+
useAutoThreads = false;
|
|
2600
|
+
}
|
|
2601
|
+
}
|
|
2602
|
+
}
|
|
2603
|
+
|
|
2604
|
+
// const UInt32 num_ZSTD_threads_MAX = Is_Zstd_Mt_Supported() ? MY_ZSTDMT_NBWORKERS_MAX : 0;
|
|
2605
|
+
|
|
2606
|
+
const int methodID = GetMethodID();
|
|
2607
|
+
const bool isZip = IsZipFormat();
|
|
2608
|
+
|
|
2609
|
+
UInt32 numAlgoThreadsMax = numHardwareThreads * 2; // for unknow methods
|
|
2610
|
+
if (isZip)
|
|
2611
|
+
numAlgoThreadsMax =
|
|
2612
|
+
8 << (sizeof(size_t) / 2); // 32 threads for 32-bit : 128 threads for 64-bit
|
|
2613
|
+
else if (IsXzFormat())
|
|
2614
|
+
numAlgoThreadsMax = 256 * 2; // MTCODER_THREADS_MAX * 2
|
|
2615
|
+
else switch (methodID)
|
|
2616
|
+
{
|
|
2617
|
+
case kLZMA: numAlgoThreadsMax = 2; break;
|
|
2618
|
+
case kLZMA2: numAlgoThreadsMax = 256 * 2; break; // MTCODER_THREADS_MAX * 2
|
|
2619
|
+
case kBZip2: numAlgoThreadsMax = 64; break;
|
|
2620
|
+
// case kZSTD: numAlgoThreadsMax = num_ZSTD_threads_MAX; break;
|
|
2621
|
+
case kCopy:
|
|
2622
|
+
case kPPMd:
|
|
2623
|
+
case kDeflate:
|
|
2624
|
+
case kDeflate64:
|
|
2625
|
+
case kPPMdZip:
|
|
2626
|
+
numAlgoThreadsMax = 1;
|
|
2627
|
+
}
|
|
2628
|
+
UInt32 autoThreads = numCPUs;
|
|
2629
|
+
if (autoThreads > numAlgoThreadsMax)
|
|
2630
|
+
autoThreads = numAlgoThreadsMax;
|
|
2631
|
+
|
|
2632
|
+
const UInt64 memUse_Limit = Get_MemUse_Bytes();
|
|
2633
|
+
|
|
2634
|
+
if (_ramSize_Defined)
|
|
2635
|
+
if (autoThreads > 1
|
|
2636
|
+
// || (autoThreads == 0 && methodID == kZSTD)
|
|
2637
|
+
)
|
|
2638
|
+
{
|
|
2639
|
+
if (isZip)
|
|
2640
|
+
{
|
|
2641
|
+
for (; autoThreads > 1; autoThreads--)
|
|
2642
|
+
{
|
|
2643
|
+
const UInt64 dict64 = GetDict2();
|
|
2644
|
+
UInt64 decompressMemory;
|
|
2645
|
+
const UInt64 usage = GetMemoryUsage_Threads_Dict_DecompMem(autoThreads, dict64, decompressMemory);
|
|
2646
|
+
if (usage <= memUse_Limit)
|
|
2647
|
+
break;
|
|
2648
|
+
}
|
|
2649
|
+
}
|
|
2650
|
+
else if (methodID == kLZMA2)
|
|
2651
|
+
{
|
|
2652
|
+
const UInt64 dict64 = GetDict2();
|
|
2653
|
+
const UInt32 numThreads1 = (GetLevel2() >= 5 ? 2 : 1);
|
|
2654
|
+
UInt32 numBlockThreads = autoThreads / numThreads1;
|
|
2655
|
+
for (; numBlockThreads > 1; numBlockThreads--)
|
|
2656
|
+
{
|
|
2657
|
+
autoThreads = numBlockThreads * numThreads1;
|
|
2658
|
+
UInt64 decompressMemory;
|
|
2659
|
+
const UInt64 usage = GetMemoryUsage_Threads_Dict_DecompMem(autoThreads, dict64, decompressMemory);
|
|
2660
|
+
if (usage <= memUse_Limit)
|
|
2661
|
+
break;
|
|
2662
|
+
}
|
|
2663
|
+
autoThreads = numBlockThreads * numThreads1;
|
|
2664
|
+
}
|
|
2665
|
+
/*
|
|
2666
|
+
else if (methodID == kZSTD)
|
|
2667
|
+
{
|
|
2668
|
+
if (num_ZSTD_threads_MAX != 0)
|
|
2669
|
+
{
|
|
2670
|
+
CZstdEncProps props;
|
|
2671
|
+
ZstdEncProps_Init(&props);
|
|
2672
|
+
// props.level_zstd = level;
|
|
2673
|
+
props.level_7z = GetLevel2();
|
|
2674
|
+
ZstdEncProps_SetDictProps_From_CompressDialog(&props, *this);
|
|
2675
|
+
autoThreads = ZstdEncProps_GetNumThreads_for_MemUsageLimit(&props, memUse_Limit, autoThreads);
|
|
2676
|
+
}
|
|
2677
|
+
}
|
|
2678
|
+
*/
|
|
2679
|
+
}
|
|
2680
|
+
|
|
2681
|
+
_auto_NumThreads = autoThreads;
|
|
2682
|
+
|
|
2683
|
+
int curSel = -1;
|
|
2684
|
+
{
|
|
2685
|
+
s.Empty();
|
|
2686
|
+
s.Add_UInt32(autoThreads);
|
|
2687
|
+
if (autoThreads == 0) s += k_ST_Threads;
|
|
2688
|
+
Modify_Auto(s);
|
|
2689
|
+
const int index = (int)ComboBox_AddStringAscii_SetItemData(m_NumThreads,
|
|
2690
|
+
s, (LPARAM)(INT_PTR)(-1));
|
|
2691
|
+
if (useAutoThreads)
|
|
2692
|
+
curSel = index;
|
|
2693
|
+
}
|
|
2694
|
+
|
|
2695
|
+
if (numAlgoThreadsMax != autoThreads || autoThreads != 1)
|
|
2696
|
+
for (UInt32 i =
|
|
2697
|
+
// (methodID == kZSTD) ? 0 :
|
|
2698
|
+
1;
|
|
2699
|
+
i <= numHardwareThreads * 2 && i <= numAlgoThreadsMax; i++)
|
|
2700
|
+
{
|
|
2701
|
+
s.Empty();
|
|
2702
|
+
s.Add_UInt32(i);
|
|
2703
|
+
if (i == 0) s += k_ST_Threads;
|
|
2704
|
+
const int index = (int)ComboBox_AddStringAscii_SetItemData(m_NumThreads,
|
|
2705
|
+
s, (LPARAM)(UInt32)i);
|
|
2706
|
+
if (!useAutoThreads && i == defaultValue)
|
|
2707
|
+
curSel = index;
|
|
2708
|
+
}
|
|
2709
|
+
|
|
2710
|
+
m_NumThreads.SetCurSel(curSel);
|
|
2711
|
+
}
|
|
2712
|
+
|
|
2713
|
+
|
|
2714
|
+
static void AddMemSize(UString &res, UInt64 size)
|
|
2715
|
+
{
|
|
2716
|
+
char c;
|
|
2717
|
+
unsigned moveBits = 0;
|
|
2718
|
+
if (size >= ((UInt64)1 << 31) && (size & 0x3FFFFFFF) == 0)
|
|
2719
|
+
{ moveBits = 30; c = 'G'; }
|
|
2720
|
+
else // if (size >= ((UInt32)1 << 21) && (size & 0xFFFFF) == 0)
|
|
2721
|
+
{ moveBits = 20; c = 'M'; }
|
|
2722
|
+
// else { moveBits = 10; c = 'K'; }
|
|
2723
|
+
res.Add_UInt64(size >> moveBits);
|
|
2724
|
+
res.Add_Space();
|
|
2725
|
+
if (moveBits != 0)
|
|
2726
|
+
res.Add_Char(c);
|
|
2727
|
+
res.Add_Char('B');
|
|
2728
|
+
}
|
|
2729
|
+
|
|
2730
|
+
|
|
2731
|
+
int CCompressDialog::AddMemComboItem(UInt64 val, bool isPercent, bool isDefault)
|
|
2732
|
+
{
|
|
2733
|
+
UString sUser;
|
|
2734
|
+
UString sRegistry;
|
|
2735
|
+
if (isPercent)
|
|
2736
|
+
{
|
|
2737
|
+
UString s;
|
|
2738
|
+
s.Add_UInt64(val);
|
|
2739
|
+
s.Add_Char('%');
|
|
2740
|
+
if (isDefault)
|
|
2741
|
+
sUser = k_Auto_Prefix;
|
|
2742
|
+
else
|
|
2743
|
+
sRegistry = s;
|
|
2744
|
+
sUser += s;
|
|
2745
|
+
}
|
|
2746
|
+
else
|
|
2747
|
+
{
|
|
2748
|
+
AddMemSize(sUser, val);
|
|
2749
|
+
sRegistry = sUser;
|
|
2750
|
+
for (;;)
|
|
2751
|
+
{
|
|
2752
|
+
const int pos = sRegistry.Find(L' ');
|
|
2753
|
+
if (pos < 0)
|
|
2754
|
+
break;
|
|
2755
|
+
sRegistry.Delete(pos);
|
|
2756
|
+
}
|
|
2757
|
+
if (!sRegistry.IsEmpty())
|
|
2758
|
+
if (sRegistry.Back() == 'B')
|
|
2759
|
+
sRegistry.DeleteBack();
|
|
2760
|
+
}
|
|
2761
|
+
const unsigned dataIndex = _memUse_Strings.Add(sRegistry);
|
|
2762
|
+
return (int)m_MemUse.AddString_SetItemData(sUser, (LPARAM)dataIndex);
|
|
2763
|
+
}
|
|
2764
|
+
|
|
2765
|
+
|
|
2766
|
+
|
|
2767
|
+
void CCompressDialog::SetMemUseCombo()
|
|
2768
|
+
{
|
|
2769
|
+
_memUse_Strings.Clear();
|
|
2770
|
+
m_MemUse.ResetContent();
|
|
2771
|
+
const CFormatInfo &fi = g_Formats[GetStaticFormatIndex()];
|
|
2772
|
+
|
|
2773
|
+
{
|
|
2774
|
+
const bool enable = fi.MemUse_();
|
|
2775
|
+
ShowItem_Bool(IDT_COMPRESS_MEMORY, enable);
|
|
2776
|
+
ShowItem_Bool(IDT_COMPRESS_MEMORY_VALUE, enable);
|
|
2777
|
+
ShowItem_Bool(IDT_COMPRESS_MEMORY_DE, enable);
|
|
2778
|
+
ShowItem_Bool(IDT_COMPRESS_MEMORY_DE_VALUE, enable);
|
|
2779
|
+
ShowItem_Bool(IDC_COMPRESS_MEM_USE, enable);
|
|
2780
|
+
EnableItem(IDC_COMPRESS_MEM_USE, enable);
|
|
2781
|
+
if (!enable)
|
|
2782
|
+
return;
|
|
2783
|
+
}
|
|
2784
|
+
|
|
2785
|
+
UInt64 curMem_Bytes = 0;
|
|
2786
|
+
UInt64 curMem_Percents = 0;
|
|
2787
|
+
bool needSetCur_Bytes = false;
|
|
2788
|
+
bool needSetCur_Percents = false;
|
|
2789
|
+
{
|
|
2790
|
+
const NCompression::CFormatOptions &fo = Get_FormatOptions();
|
|
2791
|
+
if (!fo.MemUse.IsEmpty())
|
|
2792
|
+
{
|
|
2793
|
+
NCompression::CMemUse mu;
|
|
2794
|
+
mu.Parse(fo.MemUse);
|
|
2795
|
+
if (mu.IsDefined)
|
|
2796
|
+
{
|
|
2797
|
+
if (mu.IsPercent)
|
|
2798
|
+
{
|
|
2799
|
+
curMem_Percents = mu.Val;
|
|
2800
|
+
needSetCur_Percents = true;
|
|
2801
|
+
}
|
|
2802
|
+
else
|
|
2803
|
+
{
|
|
2804
|
+
curMem_Bytes = mu.GetBytes(_ramSize_Reduced);
|
|
2805
|
+
needSetCur_Bytes = true;
|
|
2806
|
+
}
|
|
2807
|
+
}
|
|
2808
|
+
}
|
|
2809
|
+
}
|
|
2810
|
+
|
|
2811
|
+
|
|
2812
|
+
// 80% - is auto usage limit in handlers
|
|
2813
|
+
AddMemComboItem(80, true, true);
|
|
2814
|
+
m_MemUse.SetCurSel(0);
|
|
2815
|
+
|
|
2816
|
+
{
|
|
2817
|
+
for (unsigned i = 10;; i += 10)
|
|
2818
|
+
{
|
|
2819
|
+
UInt64 size = i;
|
|
2820
|
+
if (i > 100)
|
|
2821
|
+
size = (UInt64)(Int64)-1;
|
|
2822
|
+
if (needSetCur_Percents && size >= curMem_Percents)
|
|
2823
|
+
{
|
|
2824
|
+
const int index = AddMemComboItem(curMem_Percents, true);
|
|
2825
|
+
m_MemUse.SetCurSel(index);
|
|
2826
|
+
needSetCur_Percents = false;
|
|
2827
|
+
if (size == curMem_Percents)
|
|
2828
|
+
continue;
|
|
2829
|
+
}
|
|
2830
|
+
if (size == (UInt64)(Int64)-1)
|
|
2831
|
+
break;
|
|
2832
|
+
AddMemComboItem(size, true);
|
|
2833
|
+
}
|
|
2834
|
+
}
|
|
2835
|
+
{
|
|
2836
|
+
for (unsigned i = (27) * 2;; i++)
|
|
2837
|
+
{
|
|
2838
|
+
UInt64 size = (UInt64)(2 + (i & 1)) << (i / 2);
|
|
2839
|
+
if (i > (20 + sizeof(size_t) * 3 - 1) * 2)
|
|
2840
|
+
size = (UInt64)(Int64)-1;
|
|
2841
|
+
if (needSetCur_Bytes && size >= curMem_Bytes)
|
|
2842
|
+
{
|
|
2843
|
+
const int index = AddMemComboItem(curMem_Bytes);
|
|
2844
|
+
m_MemUse.SetCurSel(index);
|
|
2845
|
+
needSetCur_Bytes = false;
|
|
2846
|
+
if (size == curMem_Bytes)
|
|
2847
|
+
continue;
|
|
2848
|
+
}
|
|
2849
|
+
if (size == (UInt64)(Int64)-1)
|
|
2850
|
+
break;
|
|
2851
|
+
AddMemComboItem(size);
|
|
2852
|
+
}
|
|
2853
|
+
}
|
|
2854
|
+
}
|
|
2855
|
+
|
|
2856
|
+
|
|
2857
|
+
UString CCompressDialog::Get_MemUse_Spec()
|
|
2858
|
+
{
|
|
2859
|
+
if (m_MemUse.GetCount() < 1)
|
|
2860
|
+
return UString();
|
|
2861
|
+
return _memUse_Strings[(unsigned)m_MemUse.GetItemData_of_CurSel()];
|
|
2862
|
+
}
|
|
2863
|
+
|
|
2864
|
+
|
|
2865
|
+
UInt64 CCompressDialog::Get_MemUse_Bytes()
|
|
2866
|
+
{
|
|
2867
|
+
const UString mus = Get_MemUse_Spec();
|
|
2868
|
+
NCompression::CMemUse mu;
|
|
2869
|
+
if (!mus.IsEmpty())
|
|
2870
|
+
{
|
|
2871
|
+
mu.Parse(mus);
|
|
2872
|
+
if (mu.IsDefined)
|
|
2873
|
+
return mu.GetBytes(_ramSize_Reduced);
|
|
2874
|
+
}
|
|
2875
|
+
return _ramUsage_Auto; // _ramSize_Reduced; // _ramSize;;
|
|
2876
|
+
}
|
|
2877
|
+
|
|
2878
|
+
|
|
2879
|
+
|
|
2880
|
+
UInt64 CCompressDialog::GetMemoryUsage_DecompMem(UInt64 &decompressMemory)
|
|
2881
|
+
{
|
|
2882
|
+
return GetMemoryUsage_Dict_DecompMem(GetDict2(), decompressMemory);
|
|
2883
|
+
}
|
|
2884
|
+
|
|
2885
|
+
|
|
2886
|
+
/*
|
|
2887
|
+
we could use that function to reduce the dictionary if small RAM
|
|
2888
|
+
UInt64 CCompressDialog::GetMemoryUsageComp_Threads_Dict(UInt32 numThreads, UInt64 dict64)
|
|
2889
|
+
{
|
|
2890
|
+
UInt64 decompressMemory;
|
|
2891
|
+
return GetMemoryUsage_Threads_Dict_DecompMem(numThreads, dict64, decompressMemory);
|
|
2892
|
+
}
|
|
2893
|
+
*/
|
|
2894
|
+
|
|
2895
|
+
|
|
2896
|
+
UInt64 CCompressDialog::GetMemoryUsage_Dict_DecompMem(UInt64 dict64, UInt64 &decompressMemory)
|
|
2897
|
+
{
|
|
2898
|
+
return GetMemoryUsage_Threads_Dict_DecompMem(GetNumThreads2(), dict64, decompressMemory);
|
|
2899
|
+
}
|
|
2900
|
+
|
|
2901
|
+
UInt64 CCompressDialog::GetMemoryUsage_Threads_Dict_DecompMem(UInt32 numThreads, UInt64 dict64, UInt64 &decompressMemory)
|
|
2902
|
+
{
|
|
2903
|
+
decompressMemory = (UInt64)(Int64)-1;
|
|
2904
|
+
|
|
2905
|
+
const UInt32 level = GetLevel2();
|
|
2906
|
+
if (level == 0 && !Get_ArcInfoEx().Is_Zstd())
|
|
2907
|
+
{
|
|
2908
|
+
decompressMemory = (1 << 20);
|
|
2909
|
+
return decompressMemory;
|
|
2910
|
+
}
|
|
2911
|
+
UInt64 size = 0;
|
|
2912
|
+
|
|
2913
|
+
const CFormatInfo &fi = g_Formats[GetStaticFormatIndex()];
|
|
2914
|
+
if (fi.Filter_() && level >= 9)
|
|
2915
|
+
size += (12 << 20) * 2 + (5 << 20);
|
|
2916
|
+
// UInt32 numThreads = GetNumThreads2();
|
|
2917
|
+
|
|
2918
|
+
UInt32 numMainZipThreads = 1;
|
|
2919
|
+
|
|
2920
|
+
if (IsZipFormat())
|
|
2921
|
+
{
|
|
2922
|
+
UInt32 numSubThreads = 1;
|
|
2923
|
+
if (GetMethodID() == kLZMA && numThreads > 1 && level >= 5)
|
|
2924
|
+
numSubThreads = 2;
|
|
2925
|
+
numMainZipThreads = numThreads / numSubThreads;
|
|
2926
|
+
if (numMainZipThreads > 1)
|
|
2927
|
+
size += (UInt64)numMainZipThreads * ((size_t)sizeof(size_t) << 23);
|
|
2928
|
+
else
|
|
2929
|
+
numMainZipThreads = 1;
|
|
2930
|
+
}
|
|
2931
|
+
|
|
2932
|
+
const int methodId = GetMethodID();
|
|
2933
|
+
|
|
2934
|
+
if (dict64 == (UInt64)(Int64)-1
|
|
2935
|
+
// && methodId != kZSTD
|
|
2936
|
+
)
|
|
2937
|
+
return (UInt64)(Int64)-1;
|
|
2938
|
+
|
|
2939
|
+
|
|
2940
|
+
switch (methodId)
|
|
2941
|
+
{
|
|
2942
|
+
case kLZMA:
|
|
2943
|
+
case kLZMA2:
|
|
2944
|
+
{
|
|
2945
|
+
const UInt32 dict = (dict64 >= kLzmaMaxDictSize ? kLzmaMaxDictSize : (UInt32)dict64);
|
|
2946
|
+
UInt32 hs = dict - 1;
|
|
2947
|
+
hs |= (hs >> 1);
|
|
2948
|
+
hs |= (hs >> 2);
|
|
2949
|
+
hs |= (hs >> 4);
|
|
2950
|
+
hs |= (hs >> 8);
|
|
2951
|
+
hs >>= 1;
|
|
2952
|
+
if (hs >= (1 << 24))
|
|
2953
|
+
hs >>= 1;
|
|
2954
|
+
hs |= (1 << 16) - 1;
|
|
2955
|
+
// if (numHashBytes >= 5)
|
|
2956
|
+
if (level < 5)
|
|
2957
|
+
hs |= (256 << 10) - 1;
|
|
2958
|
+
hs++;
|
|
2959
|
+
UInt64 size1 = (UInt64)hs * 4;
|
|
2960
|
+
size1 += (UInt64)dict * 4;
|
|
2961
|
+
if (level >= 5)
|
|
2962
|
+
size1 += (UInt64)dict * 4;
|
|
2963
|
+
size1 += (2 << 20);
|
|
2964
|
+
|
|
2965
|
+
UInt32 numThreads1 = 1;
|
|
2966
|
+
if (numThreads > 1 && level >= 5)
|
|
2967
|
+
{
|
|
2968
|
+
size1 += (2 << 20) + (4 << 20);
|
|
2969
|
+
numThreads1 = 2;
|
|
2970
|
+
}
|
|
2971
|
+
|
|
2972
|
+
UInt32 numBlockThreads = numThreads / numThreads1;
|
|
2973
|
+
|
|
2974
|
+
UInt64 chunkSize = 0; // it's solid chunk
|
|
2975
|
+
|
|
2976
|
+
if (methodId != kLZMA && numBlockThreads != 1)
|
|
2977
|
+
{
|
|
2978
|
+
chunkSize = Get_Lzma2_ChunkSize(dict);
|
|
2979
|
+
|
|
2980
|
+
if (IsXzFormat())
|
|
2981
|
+
{
|
|
2982
|
+
UInt32 blockSizeLog = GetBlockSizeSpec();
|
|
2983
|
+
if (blockSizeLog != (UInt32)(Int32)-1)
|
|
2984
|
+
{
|
|
2985
|
+
if (blockSizeLog == kSolidLog_FullSolid)
|
|
2986
|
+
{
|
|
2987
|
+
numBlockThreads = 1;
|
|
2988
|
+
chunkSize = 0;
|
|
2989
|
+
}
|
|
2990
|
+
else if (blockSizeLog != kSolidLog_NoSolid)
|
|
2991
|
+
chunkSize = (UInt64)1 << blockSizeLog;
|
|
2992
|
+
}
|
|
2993
|
+
}
|
|
2994
|
+
}
|
|
2995
|
+
|
|
2996
|
+
if (chunkSize == 0)
|
|
2997
|
+
{
|
|
2998
|
+
const UInt32 kBlockSizeMax = (UInt32)0 - (UInt32)(1 << 16);
|
|
2999
|
+
UInt64 blockSize = (UInt64)dict + (1 << 16)
|
|
3000
|
+
+ (numThreads1 > 1 ? (1 << 20) : 0);
|
|
3001
|
+
blockSize += (blockSize >> (blockSize < ((UInt32)1 << 30) ? 1 : 2));
|
|
3002
|
+
if (blockSize >= kBlockSizeMax)
|
|
3003
|
+
blockSize = kBlockSizeMax;
|
|
3004
|
+
size += numBlockThreads * (size1 + blockSize);
|
|
3005
|
+
}
|
|
3006
|
+
else
|
|
3007
|
+
{
|
|
3008
|
+
size += numBlockThreads * (size1 + chunkSize);
|
|
3009
|
+
const UInt32 numPackChunks = numBlockThreads + (numBlockThreads / 8) + 1;
|
|
3010
|
+
if (chunkSize < ((UInt32)1 << 26)) numBlockThreads++;
|
|
3011
|
+
if (chunkSize < ((UInt32)1 << 24)) numBlockThreads++;
|
|
3012
|
+
if (chunkSize < ((UInt32)1 << 22)) numBlockThreads++;
|
|
3013
|
+
size += numPackChunks * chunkSize;
|
|
3014
|
+
}
|
|
3015
|
+
|
|
3016
|
+
decompressMemory = dict + (2 << 20);
|
|
3017
|
+
return size;
|
|
3018
|
+
}
|
|
3019
|
+
|
|
3020
|
+
/*
|
|
3021
|
+
case kZSTD:
|
|
3022
|
+
{
|
|
3023
|
+
CZstdEncProps props;
|
|
3024
|
+
ZstdEncProps_Init(&props);
|
|
3025
|
+
// props.level_zstd = level;
|
|
3026
|
+
props.level_7z = level;
|
|
3027
|
+
props.nbWorkers = numThreads;
|
|
3028
|
+
ZstdEncProps_SetDictProps_From_CompressDialog(&props, *this);
|
|
3029
|
+
ZstdEncProps_NormalizeFull(&props);
|
|
3030
|
+
size = ZstdEncProps_GetMemUsage(&props);
|
|
3031
|
+
decompressMemory = (UInt64)1 << props.windowLog;
|
|
3032
|
+
return size;
|
|
3033
|
+
}
|
|
3034
|
+
*/
|
|
3035
|
+
|
|
3036
|
+
case kPPMd:
|
|
3037
|
+
{
|
|
3038
|
+
decompressMemory = dict64 + (2 << 20);
|
|
3039
|
+
return size + decompressMemory;
|
|
3040
|
+
}
|
|
3041
|
+
|
|
3042
|
+
case kDeflate:
|
|
3043
|
+
case kDeflate64:
|
|
3044
|
+
{
|
|
3045
|
+
UInt64 size1 = 3 << 20;
|
|
3046
|
+
// if (level >= 7)
|
|
3047
|
+
size1 += (1 << 20);
|
|
3048
|
+
size += size1 * numMainZipThreads;
|
|
3049
|
+
decompressMemory = (2 << 20);
|
|
3050
|
+
return size;
|
|
3051
|
+
}
|
|
3052
|
+
|
|
3053
|
+
case kBZip2:
|
|
3054
|
+
{
|
|
3055
|
+
decompressMemory = (7 << 20);
|
|
3056
|
+
UInt64 memForOneThread = (10 << 20);
|
|
3057
|
+
return size + memForOneThread * numThreads;
|
|
3058
|
+
}
|
|
3059
|
+
|
|
3060
|
+
case kPPMdZip:
|
|
3061
|
+
{
|
|
3062
|
+
decompressMemory = dict64 + (2 << 20);
|
|
3063
|
+
return size + (UInt64)decompressMemory * numThreads;
|
|
3064
|
+
}
|
|
3065
|
+
}
|
|
3066
|
+
|
|
3067
|
+
return (UInt64)(Int64)-1;
|
|
3068
|
+
}
|
|
3069
|
+
|
|
3070
|
+
|
|
3071
|
+
|
|
3072
|
+
static void AddMemUsage(UString &s, UInt64 v)
|
|
3073
|
+
{
|
|
3074
|
+
const char *post;
|
|
3075
|
+
if (v <= ((UInt64)16 << 30))
|
|
3076
|
+
{
|
|
3077
|
+
v = (v + (1 << 20) - 1) >> 20;
|
|
3078
|
+
post = "MB";
|
|
3079
|
+
}
|
|
3080
|
+
else if (v <= ((UInt64)64 << 40))
|
|
3081
|
+
{
|
|
3082
|
+
v = (v + (1 << 30) - 1) >> 30;
|
|
3083
|
+
post = "GB";
|
|
3084
|
+
}
|
|
3085
|
+
else
|
|
3086
|
+
{
|
|
3087
|
+
const UInt64 v2 = v + ((UInt64)1 << 40) - 1;
|
|
3088
|
+
if (v <= v2)
|
|
3089
|
+
v = v2;
|
|
3090
|
+
v >>= 40;
|
|
3091
|
+
post = "TB";
|
|
3092
|
+
}
|
|
3093
|
+
s.Add_UInt64(v);
|
|
3094
|
+
s.Add_Space();
|
|
3095
|
+
s += post;
|
|
3096
|
+
}
|
|
3097
|
+
|
|
3098
|
+
|
|
3099
|
+
void CCompressDialog::PrintMemUsage(UINT res, UInt64 value)
|
|
3100
|
+
{
|
|
3101
|
+
if (value == (UInt64)(Int64)-1)
|
|
3102
|
+
{
|
|
3103
|
+
SetItemText(res, TEXT("?"));
|
|
3104
|
+
return;
|
|
3105
|
+
}
|
|
3106
|
+
UString s;
|
|
3107
|
+
AddMemUsage(s, value);
|
|
3108
|
+
if (res == IDT_COMPRESS_MEMORY_VALUE)
|
|
3109
|
+
{
|
|
3110
|
+
const UString mus = Get_MemUse_Spec();
|
|
3111
|
+
NCompression::CMemUse mu;
|
|
3112
|
+
if (!mus.IsEmpty())
|
|
3113
|
+
mu.Parse(mus);
|
|
3114
|
+
if (mu.IsDefined)
|
|
3115
|
+
{
|
|
3116
|
+
s += " / ";
|
|
3117
|
+
AddMemUsage(s, mu.GetBytes(_ramSize_Reduced));
|
|
3118
|
+
}
|
|
3119
|
+
else if (_ramSize_Defined)
|
|
3120
|
+
{
|
|
3121
|
+
s += " / ";
|
|
3122
|
+
AddMemUsage(s, _ramUsage_Auto);
|
|
3123
|
+
}
|
|
3124
|
+
|
|
3125
|
+
if (_ramSize_Defined)
|
|
3126
|
+
{
|
|
3127
|
+
s += " / ";
|
|
3128
|
+
AddMemUsage(s, _ramSize);
|
|
3129
|
+
}
|
|
3130
|
+
}
|
|
3131
|
+
SetItemText(res, s);
|
|
3132
|
+
}
|
|
3133
|
+
|
|
3134
|
+
|
|
3135
|
+
void CCompressDialog::SetMemoryUsage()
|
|
3136
|
+
{
|
|
3137
|
+
UInt64 decompressMem;
|
|
3138
|
+
const UInt64 memUsage = GetMemoryUsage_DecompMem(decompressMem);
|
|
3139
|
+
PrintMemUsage(IDT_COMPRESS_MEMORY_VALUE, memUsage);
|
|
3140
|
+
PrintMemUsage(IDT_COMPRESS_MEMORY_DE_VALUE, decompressMem);
|
|
3141
|
+
#ifdef PRINT_PARAMS
|
|
3142
|
+
Print_Params();
|
|
3143
|
+
#endif
|
|
3144
|
+
}
|
|
3145
|
+
|
|
3146
|
+
|
|
3147
|
+
|
|
3148
|
+
#ifdef PRINT_PARAMS
|
|
3149
|
+
|
|
3150
|
+
static const char kPropDelimeter = ' '; // ':'
|
|
3151
|
+
|
|
3152
|
+
static void AddPropName(AString &s, const char *name)
|
|
3153
|
+
{
|
|
3154
|
+
if (!s.IsEmpty())
|
|
3155
|
+
s += kPropDelimeter;
|
|
3156
|
+
s += name;
|
|
3157
|
+
}
|
|
3158
|
+
|
|
3159
|
+
static void AddProp(AString &s, const char *name, unsigned v)
|
|
3160
|
+
{
|
|
3161
|
+
AddPropName(s, name);
|
|
3162
|
+
s.Add_UInt32(v);
|
|
3163
|
+
}
|
|
3164
|
+
|
|
3165
|
+
static void AddProp_switch(AString &s, const char *name, E_ZSTD_paramSwitch_e e)
|
|
3166
|
+
{
|
|
3167
|
+
AddPropName(s, name);
|
|
3168
|
+
s += e == k_ZSTD_ps_enable ? "" : "-";
|
|
3169
|
+
}
|
|
3170
|
+
|
|
3171
|
+
static void PrintPropAsLog(AString &s, const char *name, size_t v)
|
|
3172
|
+
{
|
|
3173
|
+
AddPropName(s, name);
|
|
3174
|
+
for (unsigned i = 0; i < sizeof(size_t) * 8; i++)
|
|
3175
|
+
{
|
|
3176
|
+
if (((size_t)1 << i) == v)
|
|
3177
|
+
{
|
|
3178
|
+
s.Add_UInt32(i);
|
|
3179
|
+
return;
|
|
3180
|
+
}
|
|
3181
|
+
}
|
|
3182
|
+
char c = 'b';
|
|
3183
|
+
if ((v & 0x3FFFFFFF) == 0) { v >>= 30; c = 'G'; }
|
|
3184
|
+
else if ((v & 0xFFFFF) == 0) { v >>= 20; c = 'M'; }
|
|
3185
|
+
else if ((v & 0x3FF) == 0) { v >>= 10; c = 'K'; }
|
|
3186
|
+
s.Add_UInt64(v);
|
|
3187
|
+
s += c;
|
|
3188
|
+
}
|
|
3189
|
+
|
|
3190
|
+
static void ZstdEncProps_Print(CZstdEncProps *props, AString &s)
|
|
3191
|
+
{
|
|
3192
|
+
if (props->level_zstd >= 0)
|
|
3193
|
+
AddProp(s, "zx", props->level_zstd);
|
|
3194
|
+
else
|
|
3195
|
+
AddProp(s, "zf", -(props->level_zstd));
|
|
3196
|
+
AddProp(s, "a", props->strategy);
|
|
3197
|
+
AddProp(s, "d", props->windowLog);
|
|
3198
|
+
AddProp(s, "zclog", props->chainLog);
|
|
3199
|
+
AddProp(s, "zhb", props->hashLog);
|
|
3200
|
+
AddProp(s, "mml", props->minMatch);
|
|
3201
|
+
AddProp(s, "mcb", props->searchLog);
|
|
3202
|
+
AddProp(s, "fb", props->targetLength);
|
|
3203
|
+
AddProp(s, "mt", props->nbWorkers);
|
|
3204
|
+
PrintPropAsLog(s, "c", props->jobSize);
|
|
3205
|
+
AddProp(s, "zov", props->overlapLog);
|
|
3206
|
+
PrintPropAsLog(s, "ztps", props->targetPrefixSize);
|
|
3207
|
+
AddProp_switch(s, "zmfr", props->useRowMatchFinder);
|
|
3208
|
+
if (props->ldmParams.enableLdm == k_ZSTD_ps_enable)
|
|
3209
|
+
{
|
|
3210
|
+
AddProp_switch(s, "zle", props->ldmParams.enableLdm);
|
|
3211
|
+
AddProp(s, "zlhb", props->ldmParams.hashLog);
|
|
3212
|
+
AddProp(s, "zlbb", props->ldmParams.bucketSizeLog);
|
|
3213
|
+
AddProp(s, "zlmml", props->ldmParams.minMatchLength);
|
|
3214
|
+
AddProp(s, "zlhrb", props->ldmParams.hashRateLog);
|
|
3215
|
+
}
|
|
3216
|
+
}
|
|
3217
|
+
|
|
3218
|
+
void CCompressDialog::Print_Params()
|
|
3219
|
+
{
|
|
3220
|
+
{
|
|
3221
|
+
CZstdEncProps props;
|
|
3222
|
+
ZstdEncProps_Init(&props);
|
|
3223
|
+
// props.level_zstd = level;
|
|
3224
|
+
props.level_7z = GetLevel2();
|
|
3225
|
+
ZstdEncProps_SetDictProps_From_CompressDialog(&props, *this);
|
|
3226
|
+
{
|
|
3227
|
+
UInt32 order = GetOrderSpec();
|
|
3228
|
+
if (order != (UInt32)(Int32)-1)
|
|
3229
|
+
props.targetLength = GetOrderSpec();
|
|
3230
|
+
}
|
|
3231
|
+
props.nbWorkers = GetNumThreads2();
|
|
3232
|
+
// props.windowLog = 18; // for debug
|
|
3233
|
+
ZstdEncProps_NormalizeFull(&props);
|
|
3234
|
+
AString s;
|
|
3235
|
+
ZstdEncProps_Print(&props, s);
|
|
3236
|
+
SetItemTextA(IDT_COMPRESS_PARAMS_INFO, s);
|
|
3237
|
+
}
|
|
3238
|
+
}
|
|
3239
|
+
|
|
3240
|
+
#endif // PRINT_PARAMS
|
|
3241
|
+
|
|
3242
|
+
|
|
3243
|
+
|
|
3244
|
+
void CCompressDialog::SetParams()
|
|
3245
|
+
{
|
|
3246
|
+
const CArcInfoEx &ai = Get_ArcInfoEx();
|
|
3247
|
+
m_Params.SetText(TEXT(""));
|
|
3248
|
+
const int index = FindRegistryFormat(ai.Name);
|
|
3249
|
+
if (index >= 0)
|
|
3250
|
+
{
|
|
3251
|
+
const NCompression::CFormatOptions &fo = m_RegistryInfo.Formats[index];
|
|
3252
|
+
m_Params.SetText(fo.Options);
|
|
3253
|
+
}
|
|
3254
|
+
}
|
|
3255
|
+
|
|
3256
|
+
void CCompressDialog::SaveOptionsInMem()
|
|
3257
|
+
{
|
|
3258
|
+
/* these options are for (Info.FormatIndex).
|
|
3259
|
+
If it's called just after format changing,
|
|
3260
|
+
then it's format that was selected before format changing
|
|
3261
|
+
So we store previous format properties */
|
|
3262
|
+
|
|
3263
|
+
m_Params.GetText(Info.Options);
|
|
3264
|
+
Info.Options.Trim();
|
|
3265
|
+
|
|
3266
|
+
const CArcInfoEx &ai = (*ArcFormats)[Info.FormatIndex];
|
|
3267
|
+
const unsigned index = FindRegistryFormat_Always(ai.Name);
|
|
3268
|
+
NCompression::CFormatOptions &fo = m_RegistryInfo.Formats[index];
|
|
3269
|
+
fo.Options = Info.Options;
|
|
3270
|
+
fo.Level = GetLevelSpec();
|
|
3271
|
+
{
|
|
3272
|
+
const UInt64 dict64 = GetDictSpec();
|
|
3273
|
+
UInt32 dict32;
|
|
3274
|
+
if (dict64 == (UInt64)(Int64)-1)
|
|
3275
|
+
dict32 = (UInt32)(Int32)-1;
|
|
3276
|
+
else
|
|
3277
|
+
{
|
|
3278
|
+
dict32 = (UInt32)dict64;
|
|
3279
|
+
if (dict64 != dict32)
|
|
3280
|
+
{
|
|
3281
|
+
/* here we must write 32-bit value for registry that indicates big_value
|
|
3282
|
+
(UInt32)(Int32)-1 : is used as marker for default size
|
|
3283
|
+
(UInt32)(Int32)-2 : it can be used to indicate big value (4 GiB)
|
|
3284
|
+
the value must be larger than threshold
|
|
3285
|
+
*/
|
|
3286
|
+
dict32 = (UInt32)(Int32)-2;
|
|
3287
|
+
// dict32 = kLzmaMaxDictSize; // it must be larger than threshold
|
|
3288
|
+
}
|
|
3289
|
+
}
|
|
3290
|
+
fo.Dictionary = dict32;
|
|
3291
|
+
}
|
|
3292
|
+
/*
|
|
3293
|
+
{
|
|
3294
|
+
const UInt64 dict64 = GetDictChainSpec();
|
|
3295
|
+
UInt32 dict32;
|
|
3296
|
+
if (dict64 == (UInt64)(Int64)-1)
|
|
3297
|
+
dict32 = (UInt32)(Int32)-1;
|
|
3298
|
+
else
|
|
3299
|
+
{
|
|
3300
|
+
dict32 = (UInt32)dict64;
|
|
3301
|
+
if (dict64 != dict32)
|
|
3302
|
+
{
|
|
3303
|
+
dict32 = (UInt32)(Int32)-2;
|
|
3304
|
+
// dict32 = k_Zstd_MAX_DictSize; // it must be larger than threshold
|
|
3305
|
+
}
|
|
3306
|
+
}
|
|
3307
|
+
fo.DictionaryChain = dict32;
|
|
3308
|
+
}
|
|
3309
|
+
*/
|
|
3310
|
+
|
|
3311
|
+
fo.Order = GetOrderSpec();
|
|
3312
|
+
fo.Method = GetMethodSpec();
|
|
3313
|
+
fo.EncryptionMethod = GetEncryptionMethodSpec();
|
|
3314
|
+
fo.NumThreads = GetNumThreadsSpec();
|
|
3315
|
+
fo.BlockLogSize = GetBlockSizeSpec();
|
|
3316
|
+
fo.MemUse = Get_MemUse_Spec();
|
|
3317
|
+
}
|
|
3318
|
+
|
|
3319
|
+
|
|
3320
|
+
unsigned CCompressDialog::GetFormatIndex()
|
|
3321
|
+
{
|
|
3322
|
+
return (unsigned)m_Format.GetItemData_of_CurSel();
|
|
3323
|
+
}
|
|
3324
|
+
|
|
3325
|
+
|
|
3326
|
+
|
|
3327
|
+
static void AddText_from_BoolPair(AString &s, const char *name, const CBoolPair &bp)
|
|
3328
|
+
{
|
|
3329
|
+
if (bp.Def)
|
|
3330
|
+
{
|
|
3331
|
+
s.Add_OptSpaced(name);
|
|
3332
|
+
if (!bp.Val)
|
|
3333
|
+
s += "-";
|
|
3334
|
+
}
|
|
3335
|
+
/*
|
|
3336
|
+
else if (bp.Val)
|
|
3337
|
+
{
|
|
3338
|
+
s.Add_OptSpaced("[");
|
|
3339
|
+
s += name;
|
|
3340
|
+
s += "]";
|
|
3341
|
+
}
|
|
3342
|
+
*/
|
|
3343
|
+
}
|
|
3344
|
+
|
|
3345
|
+
|
|
3346
|
+
static void AddText_from_Bool1(AString &s, const char *name, const CBool1 &b)
|
|
3347
|
+
{
|
|
3348
|
+
if (b.Supported && b.Val)
|
|
3349
|
+
s.Add_OptSpaced(name);
|
|
3350
|
+
}
|
|
3351
|
+
|
|
3352
|
+
|
|
3353
|
+
void CCompressDialog::ShowOptionsString()
|
|
3354
|
+
{
|
|
3355
|
+
NCompression::CFormatOptions &fo = Get_FormatOptions();
|
|
3356
|
+
|
|
3357
|
+
AString s;
|
|
3358
|
+
if (fo.IsSet_TimePrec())
|
|
3359
|
+
{
|
|
3360
|
+
s.Add_OptSpaced("tp");
|
|
3361
|
+
s.Add_UInt32(fo.TimePrec);
|
|
3362
|
+
}
|
|
3363
|
+
AddText_from_BoolPair(s, "tm", fo.MTime);
|
|
3364
|
+
AddText_from_BoolPair(s, "tc", fo.CTime);
|
|
3365
|
+
AddText_from_BoolPair(s, "ta", fo.ATime);
|
|
3366
|
+
AddText_from_BoolPair(s, "-stl", fo.SetArcMTime);
|
|
3367
|
+
|
|
3368
|
+
// const CArcInfoEx &ai = Get_ArcInfoEx();
|
|
3369
|
+
AddText_from_Bool1(s, "SL", SymLinks);
|
|
3370
|
+
AddText_from_Bool1(s, "HL", HardLinks);
|
|
3371
|
+
AddText_from_Bool1(s, "AS", AltStreams);
|
|
3372
|
+
AddText_from_Bool1(s, "Sec", NtSecurity);
|
|
3373
|
+
|
|
3374
|
+
// AddText_from_Bool1(s, "Preserve", PreserveATime);
|
|
3375
|
+
|
|
3376
|
+
SetItemText(IDT_COMPRESS_OPTIONS, GetUnicodeString(s));
|
|
3377
|
+
}
|
|
3378
|
+
|
|
3379
|
+
|
|
3380
|
+
|
|
3381
|
+
|
|
3382
|
+
|
|
3383
|
+
// ---------- OPTIONS ----------
|
|
3384
|
+
|
|
3385
|
+
|
|
3386
|
+
void COptionsDialog::CheckButton_Bool1(UINT id, const CBool1 &b1)
|
|
3387
|
+
{
|
|
3388
|
+
CheckButton(id, b1.Val);
|
|
3389
|
+
}
|
|
3390
|
+
|
|
3391
|
+
void COptionsDialog::GetButton_Bool1(UINT id, CBool1 &b1)
|
|
3392
|
+
{
|
|
3393
|
+
b1.Val = IsButtonCheckedBool(id);
|
|
3394
|
+
}
|
|
3395
|
+
|
|
3396
|
+
|
|
3397
|
+
void COptionsDialog::CheckButton_BoolBox(
|
|
3398
|
+
bool supported, const CBoolPair &b2, CBoolBox &bb)
|
|
3399
|
+
{
|
|
3400
|
+
const bool isSet = b2.Def;
|
|
3401
|
+
const bool val = isSet ? b2.Val : bb.DefaultVal;
|
|
3402
|
+
|
|
3403
|
+
bb.IsSupported = supported;
|
|
3404
|
+
|
|
3405
|
+
CheckButton (bb.Set_Id, isSet);
|
|
3406
|
+
ShowItem_Bool (bb.Set_Id, supported);
|
|
3407
|
+
CheckButton (bb.Id, val);
|
|
3408
|
+
EnableItem (bb.Id, isSet);
|
|
3409
|
+
ShowItem_Bool (bb.Id, supported);
|
|
3410
|
+
}
|
|
3411
|
+
|
|
3412
|
+
void COptionsDialog::GetButton_BoolBox(CBoolBox &bb)
|
|
3413
|
+
{
|
|
3414
|
+
// we save value for invisible buttons too
|
|
3415
|
+
bb.BoolPair.Val = IsButtonCheckedBool (bb.Id);
|
|
3416
|
+
bb.BoolPair.Def = IsButtonCheckedBool (bb.Set_Id);
|
|
3417
|
+
}
|
|
3418
|
+
|
|
3419
|
+
|
|
3420
|
+
void COptionsDialog::Store_TimeBoxes()
|
|
3421
|
+
{
|
|
3422
|
+
TimePrec = GetPrecSpec();
|
|
3423
|
+
GetButton_BoolBox (MTime);
|
|
3424
|
+
GetButton_BoolBox (CTime);
|
|
3425
|
+
GetButton_BoolBox (ATime);
|
|
3426
|
+
GetButton_BoolBox (ZTime);
|
|
3427
|
+
}
|
|
3428
|
+
|
|
3429
|
+
|
|
3430
|
+
UInt32 COptionsDialog::GetComboValue(NWindows::NControl::CComboBox &c, int defMax)
|
|
3431
|
+
{
|
|
3432
|
+
if (c.GetCount() <= defMax)
|
|
3433
|
+
return (UInt32)(Int32)-1;
|
|
3434
|
+
return (UInt32)c.GetItemData_of_CurSel();
|
|
3435
|
+
}
|
|
3436
|
+
|
|
3437
|
+
static const unsigned kTimePrec_Win = 0;
|
|
3438
|
+
static const unsigned kTimePrec_Unix = 1;
|
|
3439
|
+
static const unsigned kTimePrec_DOS = 2;
|
|
3440
|
+
static const unsigned kTimePrec_1ns = 3;
|
|
3441
|
+
|
|
3442
|
+
static void AddTimeOption(UString &s, UInt32 val, const UString &unit, const char *sys = NULL)
|
|
3443
|
+
{
|
|
3444
|
+
// s += " : ";
|
|
3445
|
+
s.Add_UInt32(val);
|
|
3446
|
+
s.Add_Space();
|
|
3447
|
+
s += unit;
|
|
3448
|
+
if (sys)
|
|
3449
|
+
{
|
|
3450
|
+
s += " : ";
|
|
3451
|
+
s += sys;
|
|
3452
|
+
}
|
|
3453
|
+
}
|
|
3454
|
+
|
|
3455
|
+
int COptionsDialog::AddPrec(unsigned prec, bool isDefault)
|
|
3456
|
+
{
|
|
3457
|
+
UString s;
|
|
3458
|
+
UInt32 writePrec = prec;
|
|
3459
|
+
if (isDefault)
|
|
3460
|
+
{
|
|
3461
|
+
// s += "* ";
|
|
3462
|
+
// writePrec = (UInt32)(Int32)-1;
|
|
3463
|
+
}
|
|
3464
|
+
if (prec == kTimePrec_Win) AddTimeOption(s, 100, NsString, "Windows");
|
|
3465
|
+
else if (prec == kTimePrec_Unix) AddTimeOption(s, 1, SecString, "Unix");
|
|
3466
|
+
else if (prec == kTimePrec_DOS) AddTimeOption(s, 2, SecString, "DOS");
|
|
3467
|
+
else if (prec == kTimePrec_1ns) AddTimeOption(s, 1, NsString, "Linux");
|
|
3468
|
+
else if (prec == k_PropVar_TimePrec_Base) AddTimeOption(s, 1, SecString);
|
|
3469
|
+
else if (prec >= k_PropVar_TimePrec_Base)
|
|
3470
|
+
{
|
|
3471
|
+
UInt32 d = 1;
|
|
3472
|
+
for (unsigned i = prec; i < k_PropVar_TimePrec_Base + 9; i++)
|
|
3473
|
+
d *= 10;
|
|
3474
|
+
AddTimeOption(s, d, NsString);
|
|
3475
|
+
}
|
|
3476
|
+
else
|
|
3477
|
+
s.Add_UInt32(prec);
|
|
3478
|
+
return (int)m_Prec.AddString_SetItemData(s, (LPARAM)writePrec);
|
|
3479
|
+
}
|
|
3480
|
+
|
|
3481
|
+
|
|
3482
|
+
void COptionsDialog::SetPrec()
|
|
3483
|
+
{
|
|
3484
|
+
// const CFormatInfo &fi = g_Formats[cd->GetStaticFormatIndex()];
|
|
3485
|
+
const CArcInfoEx &ai = cd->Get_ArcInfoEx();
|
|
3486
|
+
|
|
3487
|
+
// UInt32 flags = fi.Flags;
|
|
3488
|
+
|
|
3489
|
+
UInt32 flags = ai.Get_TimePrecFlags();
|
|
3490
|
+
UInt32 defaultPrec = ai.Get_DefaultTimePrec();
|
|
3491
|
+
if (defaultPrec != 0)
|
|
3492
|
+
flags |= ((UInt32)1 << defaultPrec);
|
|
3493
|
+
|
|
3494
|
+
// const NCompression::CFormatOptions &fo = cd->Get_FormatOptions();
|
|
3495
|
+
|
|
3496
|
+
// unsigned defaultPrec = kTimePrec_Win;
|
|
3497
|
+
|
|
3498
|
+
if (ai.Is_GZip())
|
|
3499
|
+
defaultPrec = kTimePrec_Unix;
|
|
3500
|
+
|
|
3501
|
+
{
|
|
3502
|
+
UString s;
|
|
3503
|
+
s += GetNameOfProperty(kpidType, L"type");
|
|
3504
|
+
s += ": ";
|
|
3505
|
+
s += ai.Name;
|
|
3506
|
+
if (ai.Is_Tar())
|
|
3507
|
+
{
|
|
3508
|
+
const int methodID = cd->GetMethodID();
|
|
3509
|
+
|
|
3510
|
+
// for debug
|
|
3511
|
+
// defaultPrec = kTimePrec_Unix;
|
|
3512
|
+
// flags = (UInt32)1 << kTimePrec_Unix;
|
|
3513
|
+
|
|
3514
|
+
s.Add_Colon();
|
|
3515
|
+
if (methodID >= 0 && (unsigned)methodID < Z7_ARRAY_SIZE(kMethodsNames))
|
|
3516
|
+
s += kMethodsNames[methodID];
|
|
3517
|
+
if (methodID == kPosix)
|
|
3518
|
+
{
|
|
3519
|
+
// for debug
|
|
3520
|
+
// flags |= (UInt32)1 << kTimePrec_Win;
|
|
3521
|
+
// flags |= (UInt32)1 << kTimePrec_1ns;
|
|
3522
|
+
}
|
|
3523
|
+
}
|
|
3524
|
+
else
|
|
3525
|
+
{
|
|
3526
|
+
// if (is_for_MethodChanging) return;
|
|
3527
|
+
}
|
|
3528
|
+
|
|
3529
|
+
SetItemText(IDT_COMPRESS_TIME_INFO, s);
|
|
3530
|
+
}
|
|
3531
|
+
|
|
3532
|
+
m_Prec.ResetContent();
|
|
3533
|
+
_auto_Prec = defaultPrec;
|
|
3534
|
+
|
|
3535
|
+
unsigned selectedPrec = defaultPrec;
|
|
3536
|
+
{
|
|
3537
|
+
// if (TimePrec >= kTimePrec_Win && TimePrec <= kTimePrec_DOS)
|
|
3538
|
+
if ((Int32)TimePrec >= 0)
|
|
3539
|
+
selectedPrec = TimePrec;
|
|
3540
|
+
}
|
|
3541
|
+
|
|
3542
|
+
int curSel = -1;
|
|
3543
|
+
int defaultPrecIndex = -1;
|
|
3544
|
+
for (unsigned prec = 0;
|
|
3545
|
+
// prec <= k_PropVar_TimePrec_HighPrec;
|
|
3546
|
+
prec <= k_PropVar_TimePrec_1ns;
|
|
3547
|
+
prec++)
|
|
3548
|
+
{
|
|
3549
|
+
if (((flags >> prec) & 1) == 0)
|
|
3550
|
+
continue;
|
|
3551
|
+
const bool isDefault = (defaultPrec == prec);
|
|
3552
|
+
const int index = AddPrec(prec, isDefault);
|
|
3553
|
+
if (isDefault)
|
|
3554
|
+
defaultPrecIndex = index;
|
|
3555
|
+
if (selectedPrec == prec)
|
|
3556
|
+
curSel = index;
|
|
3557
|
+
}
|
|
3558
|
+
|
|
3559
|
+
if (curSel < 0 && selectedPrec > kTimePrec_DOS)
|
|
3560
|
+
curSel = AddPrec(selectedPrec, false); // isDefault
|
|
3561
|
+
if (curSel < 0)
|
|
3562
|
+
curSel = defaultPrecIndex;
|
|
3563
|
+
if (curSel >= 0)
|
|
3564
|
+
m_Prec.SetCurSel(curSel);
|
|
3565
|
+
|
|
3566
|
+
{
|
|
3567
|
+
const bool isSet = IsSet_TimePrec();
|
|
3568
|
+
const int count = m_Prec.GetCount();
|
|
3569
|
+
const bool showPrec = (count != 0);
|
|
3570
|
+
ShowItem_Bool(IDC_COMPRESS_TIME_PREC, showPrec);
|
|
3571
|
+
ShowItem_Bool(IDT_COMPRESS_TIME_PREC, showPrec);
|
|
3572
|
+
EnableItem(IDC_COMPRESS_TIME_PREC, isSet && (count > 1));
|
|
3573
|
+
|
|
3574
|
+
CheckButton(IDX_COMPRESS_PREC_SET, isSet);
|
|
3575
|
+
const bool setIsSupported = isSet || (count > 1);
|
|
3576
|
+
EnableItem(IDX_COMPRESS_PREC_SET, setIsSupported);
|
|
3577
|
+
ShowItem_Bool(IDX_COMPRESS_PREC_SET, setIsSupported);
|
|
3578
|
+
}
|
|
3579
|
+
|
|
3580
|
+
SetTimeMAC();
|
|
3581
|
+
}
|
|
3582
|
+
|
|
3583
|
+
|
|
3584
|
+
void COptionsDialog::SetTimeMAC()
|
|
3585
|
+
{
|
|
3586
|
+
const CArcInfoEx &ai = cd->Get_ArcInfoEx();
|
|
3587
|
+
|
|
3588
|
+
const
|
|
3589
|
+
bool m_allow = ai.Flags_MTime();
|
|
3590
|
+
bool c_allow = ai.Flags_CTime();
|
|
3591
|
+
bool a_allow = ai.Flags_ATime();
|
|
3592
|
+
|
|
3593
|
+
if (ai.Is_Tar())
|
|
3594
|
+
{
|
|
3595
|
+
const int methodID = cd->GetMethodID();
|
|
3596
|
+
c_allow = false;
|
|
3597
|
+
a_allow = false;
|
|
3598
|
+
if (methodID == kPosix)
|
|
3599
|
+
{
|
|
3600
|
+
// c_allow = true; // do we need it as change time ?
|
|
3601
|
+
a_allow = true;
|
|
3602
|
+
}
|
|
3603
|
+
}
|
|
3604
|
+
|
|
3605
|
+
if (ai.Is_Zip())
|
|
3606
|
+
{
|
|
3607
|
+
// const int methodID = GetMethodID();
|
|
3608
|
+
UInt32 prec = GetPrec();
|
|
3609
|
+
if (prec == (UInt32)(Int32)-1)
|
|
3610
|
+
prec = _auto_Prec;
|
|
3611
|
+
if (prec != kTimePrec_Win)
|
|
3612
|
+
{
|
|
3613
|
+
c_allow = false;
|
|
3614
|
+
a_allow = false;
|
|
3615
|
+
}
|
|
3616
|
+
}
|
|
3617
|
+
|
|
3618
|
+
|
|
3619
|
+
/*
|
|
3620
|
+
MTime.DefaultVal = true;
|
|
3621
|
+
CTime.DefaultVal = false;
|
|
3622
|
+
ATime.DefaultVal = false;
|
|
3623
|
+
*/
|
|
3624
|
+
|
|
3625
|
+
MTime.DefaultVal = ai.Flags_MTime_Default();
|
|
3626
|
+
CTime.DefaultVal = ai.Flags_CTime_Default();
|
|
3627
|
+
ATime.DefaultVal = ai.Flags_ATime_Default();
|
|
3628
|
+
|
|
3629
|
+
ZTime.DefaultVal = false;
|
|
3630
|
+
|
|
3631
|
+
const NCompression::CFormatOptions &fo = cd->Get_FormatOptions();
|
|
3632
|
+
|
|
3633
|
+
CheckButton_BoolBox (m_allow, fo.MTime, MTime );
|
|
3634
|
+
CheckButton_BoolBox (c_allow, fo.CTime, CTime );
|
|
3635
|
+
CheckButton_BoolBox (a_allow, fo.ATime, ATime );
|
|
3636
|
+
CheckButton_BoolBox (true, fo.SetArcMTime, ZTime);
|
|
3637
|
+
|
|
3638
|
+
if (m_allow && !fo.MTime.Def)
|
|
3639
|
+
{
|
|
3640
|
+
const bool isSingleFile = ai.Flags_KeepName();
|
|
3641
|
+
if (!isSingleFile)
|
|
3642
|
+
{
|
|
3643
|
+
// we can hide changing checkboxes for MTime here:
|
|
3644
|
+
ShowItem_Bool (MTime.Set_Id, false);
|
|
3645
|
+
EnableItem (MTime.Id, false);
|
|
3646
|
+
}
|
|
3647
|
+
}
|
|
3648
|
+
// On_CheckBoxSet_Prec_Clicked();
|
|
3649
|
+
// const bool isSingleFile = ai.Flags_KeepName();
|
|
3650
|
+
// mtime for Gz can be
|
|
3651
|
+
}
|
|
3652
|
+
|
|
3653
|
+
|
|
3654
|
+
|
|
3655
|
+
void COptionsDialog::On_CheckBoxSet_Prec_Clicked()
|
|
3656
|
+
{
|
|
3657
|
+
const bool isSet = IsButtonCheckedBool(IDX_COMPRESS_PREC_SET);
|
|
3658
|
+
if (!isSet)
|
|
3659
|
+
{
|
|
3660
|
+
// We save current MAC boxes to memory before SetPrec()
|
|
3661
|
+
Store_TimeBoxes();
|
|
3662
|
+
Reset_TimePrec();
|
|
3663
|
+
SetPrec();
|
|
3664
|
+
}
|
|
3665
|
+
EnableItem(IDC_COMPRESS_TIME_PREC, isSet);
|
|
3666
|
+
}
|
|
3667
|
+
|
|
3668
|
+
void COptionsDialog::On_CheckBoxSet_Clicked(const CBoolBox &bb)
|
|
3669
|
+
{
|
|
3670
|
+
const bool isSet = IsButtonCheckedBool(bb.Set_Id);
|
|
3671
|
+
if (!isSet)
|
|
3672
|
+
CheckButton(bb.Id, bb.DefaultVal);
|
|
3673
|
+
EnableItem(bb.Id, isSet);
|
|
3674
|
+
}
|
|
3675
|
+
|
|
3676
|
+
|
|
3677
|
+
|
|
3678
|
+
|
|
3679
|
+
#ifdef Z7_LANG
|
|
3680
|
+
static const UInt32 kLangIDs_Options[] =
|
|
3681
|
+
{
|
|
3682
|
+
IDX_COMPRESS_NT_SYM_LINKS,
|
|
3683
|
+
IDX_COMPRESS_NT_HARD_LINKS,
|
|
3684
|
+
IDX_COMPRESS_NT_ALT_STREAMS,
|
|
3685
|
+
IDX_COMPRESS_NT_SECUR,
|
|
3686
|
+
|
|
3687
|
+
IDG_COMPRESS_TIME,
|
|
3688
|
+
IDT_COMPRESS_TIME_PREC,
|
|
3689
|
+
IDX_COMPRESS_MTIME,
|
|
3690
|
+
IDX_COMPRESS_CTIME,
|
|
3691
|
+
IDX_COMPRESS_ATIME,
|
|
3692
|
+
IDX_COMPRESS_ZTIME,
|
|
3693
|
+
IDX_COMPRESS_PRESERVE_ATIME
|
|
3694
|
+
};
|
|
3695
|
+
#endif
|
|
3696
|
+
|
|
3697
|
+
|
|
3698
|
+
bool COptionsDialog::OnInit()
|
|
3699
|
+
{
|
|
3700
|
+
#ifdef Z7_LANG
|
|
3701
|
+
LangSetWindowText(*this, IDB_COMPRESS_OPTIONS); // IDS_OPTIONS
|
|
3702
|
+
LangSetDlgItems(*this, kLangIDs_Options, Z7_ARRAY_SIZE(kLangIDs_Options));
|
|
3703
|
+
// LangSetDlgItemText(*this, IDB_COMPRESS_TIME_DEFAULT, IDB_COMPRESS_TIME_DEFAULT);
|
|
3704
|
+
// LangSetDlgItemText(*this, IDX_COMPRESS_TIME_DEFAULT, IDX_COMPRESS_TIME_DEFAULT);
|
|
3705
|
+
#endif
|
|
3706
|
+
|
|
3707
|
+
LangString(IDS_COMPRESS_SEC, SecString);
|
|
3708
|
+
if (SecString.IsEmpty())
|
|
3709
|
+
SecString = "sec";
|
|
3710
|
+
LangString(IDS_COMPRESS_NS, NsString);
|
|
3711
|
+
if (NsString.IsEmpty())
|
|
3712
|
+
NsString = "ns";
|
|
3713
|
+
|
|
3714
|
+
{
|
|
3715
|
+
// const CArcInfoEx &ai = cd->Get_ArcInfoEx();
|
|
3716
|
+
|
|
3717
|
+
ShowItem_Bool ( IDX_COMPRESS_NT_SYM_LINKS, cd->SymLinks.Supported);
|
|
3718
|
+
ShowItem_Bool ( IDX_COMPRESS_NT_HARD_LINKS, cd->HardLinks.Supported);
|
|
3719
|
+
ShowItem_Bool ( IDX_COMPRESS_NT_ALT_STREAMS, cd->AltStreams.Supported);
|
|
3720
|
+
ShowItem_Bool ( IDX_COMPRESS_NT_SECUR, cd->NtSecurity.Supported);
|
|
3721
|
+
|
|
3722
|
+
ShowItem_Bool ( IDG_COMPRESS_NTFS,
|
|
3723
|
+
cd->SymLinks.Supported
|
|
3724
|
+
|| cd->HardLinks.Supported
|
|
3725
|
+
|| cd->AltStreams.Supported
|
|
3726
|
+
|| cd->NtSecurity.Supported);
|
|
3727
|
+
}
|
|
3728
|
+
|
|
3729
|
+
/* we read property from two sources:
|
|
3730
|
+
1) command line : (Info)
|
|
3731
|
+
2) registry : (m_RegistryInfo)
|
|
3732
|
+
(Info) has priority, if both are no defined */
|
|
3733
|
+
|
|
3734
|
+
CheckButton_Bool1 ( IDX_COMPRESS_NT_SYM_LINKS, cd->SymLinks);
|
|
3735
|
+
CheckButton_Bool1 ( IDX_COMPRESS_NT_HARD_LINKS, cd->HardLinks);
|
|
3736
|
+
CheckButton_Bool1 ( IDX_COMPRESS_NT_ALT_STREAMS, cd->AltStreams);
|
|
3737
|
+
CheckButton_Bool1 ( IDX_COMPRESS_NT_SECUR, cd->NtSecurity);
|
|
3738
|
+
|
|
3739
|
+
CheckButton_Bool1 (IDX_COMPRESS_PRESERVE_ATIME, cd->PreserveATime);
|
|
3740
|
+
|
|
3741
|
+
m_Prec.Attach (GetItem(IDC_COMPRESS_TIME_PREC));
|
|
3742
|
+
|
|
3743
|
+
MTime.SetIDs ( IDX_COMPRESS_MTIME, IDX_COMPRESS_MTIME_SET);
|
|
3744
|
+
CTime.SetIDs ( IDX_COMPRESS_CTIME, IDX_COMPRESS_CTIME_SET);
|
|
3745
|
+
ATime.SetIDs ( IDX_COMPRESS_ATIME, IDX_COMPRESS_ATIME_SET);
|
|
3746
|
+
ZTime.SetIDs ( IDX_COMPRESS_ZTIME, IDX_COMPRESS_ZTIME_SET);
|
|
3747
|
+
|
|
3748
|
+
{
|
|
3749
|
+
const NCompression::CFormatOptions &fo = cd->Get_FormatOptions();
|
|
3750
|
+
TimePrec = fo.TimePrec;
|
|
3751
|
+
MTime.BoolPair = fo.MTime;
|
|
3752
|
+
CTime.BoolPair = fo.CTime;
|
|
3753
|
+
ATime.BoolPair = fo.ATime;
|
|
3754
|
+
ZTime.BoolPair = fo.SetArcMTime;
|
|
3755
|
+
}
|
|
3756
|
+
|
|
3757
|
+
SetPrec();
|
|
3758
|
+
|
|
3759
|
+
NormalizePosition();
|
|
3760
|
+
|
|
3761
|
+
return CModalDialog::OnInit();
|
|
3762
|
+
}
|
|
3763
|
+
|
|
3764
|
+
|
|
3765
|
+
bool COptionsDialog::OnCommand(unsigned code, unsigned itemID, LPARAM lParam)
|
|
3766
|
+
{
|
|
3767
|
+
if (code == CBN_SELCHANGE)
|
|
3768
|
+
{
|
|
3769
|
+
switch (itemID)
|
|
3770
|
+
{
|
|
3771
|
+
case IDC_COMPRESS_TIME_PREC:
|
|
3772
|
+
{
|
|
3773
|
+
Store_TimeBoxes();
|
|
3774
|
+
SetTimeMAC(); // for zip/tar
|
|
3775
|
+
return true;
|
|
3776
|
+
}
|
|
3777
|
+
}
|
|
3778
|
+
}
|
|
3779
|
+
return CModalDialog::OnCommand(code, itemID, lParam);
|
|
3780
|
+
}
|
|
3781
|
+
|
|
3782
|
+
|
|
3783
|
+
bool COptionsDialog::OnButtonClicked(unsigned buttonID, HWND buttonHWND)
|
|
3784
|
+
{
|
|
3785
|
+
switch (buttonID)
|
|
3786
|
+
{
|
|
3787
|
+
case IDX_COMPRESS_PREC_SET: { On_CheckBoxSet_Prec_Clicked(); return true; }
|
|
3788
|
+
case IDX_COMPRESS_MTIME_SET: { On_CheckBoxSet_Clicked (MTime); return true; }
|
|
3789
|
+
case IDX_COMPRESS_CTIME_SET: { On_CheckBoxSet_Clicked (CTime); return true; }
|
|
3790
|
+
case IDX_COMPRESS_ATIME_SET: { On_CheckBoxSet_Clicked (ATime); return true; }
|
|
3791
|
+
case IDX_COMPRESS_ZTIME_SET: { On_CheckBoxSet_Clicked (ZTime); return true; }
|
|
3792
|
+
}
|
|
3793
|
+
return CModalDialog::OnButtonClicked(buttonID, buttonHWND);
|
|
3794
|
+
}
|
|
3795
|
+
|
|
3796
|
+
|
|
3797
|
+
void COptionsDialog::OnOK()
|
|
3798
|
+
{
|
|
3799
|
+
GetButton_Bool1 (IDX_COMPRESS_NT_SYM_LINKS, cd->SymLinks);
|
|
3800
|
+
GetButton_Bool1 (IDX_COMPRESS_NT_HARD_LINKS, cd->HardLinks);
|
|
3801
|
+
GetButton_Bool1 (IDX_COMPRESS_NT_ALT_STREAMS, cd->AltStreams);
|
|
3802
|
+
GetButton_Bool1 (IDX_COMPRESS_NT_SECUR, cd->NtSecurity);
|
|
3803
|
+
GetButton_Bool1 (IDX_COMPRESS_PRESERVE_ATIME, cd->PreserveATime);
|
|
3804
|
+
|
|
3805
|
+
Store_TimeBoxes();
|
|
3806
|
+
{
|
|
3807
|
+
NCompression::CFormatOptions &fo = cd->Get_FormatOptions();
|
|
3808
|
+
fo.TimePrec = TimePrec;
|
|
3809
|
+
fo.MTime = MTime.BoolPair;
|
|
3810
|
+
fo.CTime = CTime.BoolPair;
|
|
3811
|
+
fo.ATime = ATime.BoolPair;
|
|
3812
|
+
fo.SetArcMTime = ZTime.BoolPair;
|
|
3813
|
+
}
|
|
3814
|
+
|
|
3815
|
+
CModalDialog::OnOK();
|
|
3816
|
+
}
|
|
3817
|
+
|
|
3818
|
+
void COptionsDialog::OnHelp()
|
|
3819
|
+
{
|
|
3820
|
+
ShowHelpWindow(kHelpTopic_Options);
|
|
3821
|
+
}
|