7zip-native 0.0.0-stage → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1327) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +293 -2
  3. package/THIRD_PARTY_NOTICES.md +23 -0
  4. package/bench/args.mts +69 -0
  5. package/bench/benchmark.mts +102 -0
  6. package/bench/compare.mts +546 -0
  7. package/bench/concurrency.mts +196 -0
  8. package/binding.gyp +51 -0
  9. package/dist/index.cjs +528 -0
  10. package/dist/index.d.cts +63 -0
  11. package/dist/index.d.mts +63 -0
  12. package/dist/index.d.ts +63 -0
  13. package/dist/index.mjs +524 -0
  14. package/docs/architecture.md +112 -0
  15. package/examples/basic.mts +19 -0
  16. package/native/addon.cpp +2154 -0
  17. package/package.json +85 -5
  18. package/prebuilds/darwin-arm64/7zip_native.node +0 -0
  19. package/prebuilds/darwin-arm64/lib7z.dylib +0 -0
  20. package/prebuilds/darwin-x64/7zip_native.node +0 -0
  21. package/prebuilds/darwin-x64/lib7z.dylib +0 -0
  22. package/prebuilds/linux-arm/7z.so +0 -0
  23. package/prebuilds/linux-arm/7zip_native.node +0 -0
  24. package/prebuilds/linux-arm64/7z.so +0 -0
  25. package/prebuilds/linux-arm64/7zip_native.node +0 -0
  26. package/prebuilds/linux-ia32/7z.so +0 -0
  27. package/prebuilds/linux-ia32/7zip_native.node +0 -0
  28. package/prebuilds/linux-x64/7z.so +0 -0
  29. package/prebuilds/linux-x64/7zip_native.node +0 -0
  30. package/prebuilds/win32-arm64/7z.dll +0 -0
  31. package/prebuilds/win32-arm64/7zip_native.node +0 -0
  32. package/prebuilds/win32-x64/7z.dll +0 -0
  33. package/prebuilds/win32-x64/7zip_native.node +0 -0
  34. package/vendor/7zip/.gitattributes +2 -0
  35. package/vendor/7zip/Asm/arm/7zCrcOpt.asm +100 -0
  36. package/vendor/7zip/Asm/arm64/7zAsm.S +187 -0
  37. package/vendor/7zip/Asm/arm64/LzmaDecOpt.S +1487 -0
  38. package/vendor/7zip/Asm/x86/7zAsm.asm +341 -0
  39. package/vendor/7zip/Asm/x86/7zCrcOpt.asm +258 -0
  40. package/vendor/7zip/Asm/x86/AesOpt.asm +742 -0
  41. package/vendor/7zip/Asm/x86/LzFindOpt.asm +540 -0
  42. package/vendor/7zip/Asm/x86/LzmaDecOpt.asm +1339 -0
  43. package/vendor/7zip/Asm/x86/Sha1Opt.asm +263 -0
  44. package/vendor/7zip/Asm/x86/Sha256Opt.asm +275 -0
  45. package/vendor/7zip/Asm/x86/Sort.asm +860 -0
  46. package/vendor/7zip/Asm/x86/XzCrc64Opt.asm +523 -0
  47. package/vendor/7zip/C/7z.h +204 -0
  48. package/vendor/7zip/C/7zAlloc.c +89 -0
  49. package/vendor/7zip/C/7zAlloc.h +19 -0
  50. package/vendor/7zip/C/7zArcIn.c +1701 -0
  51. package/vendor/7zip/C/7zBuf.c +36 -0
  52. package/vendor/7zip/C/7zBuf.h +35 -0
  53. package/vendor/7zip/C/7zBuf2.c +52 -0
  54. package/vendor/7zip/C/7zCrc.c +420 -0
  55. package/vendor/7zip/C/7zCrc.h +28 -0
  56. package/vendor/7zip/C/7zCrcOpt.c +199 -0
  57. package/vendor/7zip/C/7zDec.c +672 -0
  58. package/vendor/7zip/C/7zFile.c +443 -0
  59. package/vendor/7zip/C/7zFile.h +91 -0
  60. package/vendor/7zip/C/7zStream.c +199 -0
  61. package/vendor/7zip/C/7zTypes.h +600 -0
  62. package/vendor/7zip/C/7zVersion.h +27 -0
  63. package/vendor/7zip/C/7zVersion.rc +55 -0
  64. package/vendor/7zip/C/7zWindows.h +107 -0
  65. package/vendor/7zip/C/7zip_gcc_c.mak +366 -0
  66. package/vendor/7zip/C/Aes.c +429 -0
  67. package/vendor/7zip/C/Aes.h +60 -0
  68. package/vendor/7zip/C/AesOpt.c +1002 -0
  69. package/vendor/7zip/C/Alloc.c +774 -0
  70. package/vendor/7zip/C/Alloc.h +76 -0
  71. package/vendor/7zip/C/Asm_c.mak +12 -0
  72. package/vendor/7zip/C/Bcj2.c +290 -0
  73. package/vendor/7zip/C/Bcj2.h +332 -0
  74. package/vendor/7zip/C/Bcj2Enc.c +509 -0
  75. package/vendor/7zip/C/Blake2.h +105 -0
  76. package/vendor/7zip/C/Blake2s.c +2672 -0
  77. package/vendor/7zip/C/Bra.c +709 -0
  78. package/vendor/7zip/C/Bra.h +105 -0
  79. package/vendor/7zip/C/Bra86.c +187 -0
  80. package/vendor/7zip/C/BraIA64.c +14 -0
  81. package/vendor/7zip/C/BwtSort.c +630 -0
  82. package/vendor/7zip/C/BwtSort.h +27 -0
  83. package/vendor/7zip/C/Compiler.h +287 -0
  84. package/vendor/7zip/C/CpuArch.c +970 -0
  85. package/vendor/7zip/C/CpuArch.h +719 -0
  86. package/vendor/7zip/C/Delta.c +169 -0
  87. package/vendor/7zip/C/Delta.h +19 -0
  88. package/vendor/7zip/C/DllSecur.c +99 -0
  89. package/vendor/7zip/C/DllSecur.h +20 -0
  90. package/vendor/7zip/C/HuffEnc.c +361 -0
  91. package/vendor/7zip/C/HuffEnc.h +23 -0
  92. package/vendor/7zip/C/LzFind.c +1746 -0
  93. package/vendor/7zip/C/LzFind.h +160 -0
  94. package/vendor/7zip/C/LzFindMt.c +1422 -0
  95. package/vendor/7zip/C/LzFindMt.h +114 -0
  96. package/vendor/7zip/C/LzFindOpt.c +578 -0
  97. package/vendor/7zip/C/LzHash.h +34 -0
  98. package/vendor/7zip/C/Lzma2Dec.c +493 -0
  99. package/vendor/7zip/C/Lzma2Dec.h +121 -0
  100. package/vendor/7zip/C/Lzma2DecMt.c +1095 -0
  101. package/vendor/7zip/C/Lzma2DecMt.h +81 -0
  102. package/vendor/7zip/C/Lzma2Enc.c +799 -0
  103. package/vendor/7zip/C/Lzma2Enc.h +58 -0
  104. package/vendor/7zip/C/Lzma86.h +111 -0
  105. package/vendor/7zip/C/Lzma86Dec.c +53 -0
  106. package/vendor/7zip/C/Lzma86Enc.c +103 -0
  107. package/vendor/7zip/C/LzmaDec.c +1367 -0
  108. package/vendor/7zip/C/LzmaDec.h +237 -0
  109. package/vendor/7zip/C/LzmaEnc.c +3154 -0
  110. package/vendor/7zip/C/LzmaEnc.h +85 -0
  111. package/vendor/7zip/C/LzmaLib.c +42 -0
  112. package/vendor/7zip/C/LzmaLib.h +138 -0
  113. package/vendor/7zip/C/Md5.c +206 -0
  114. package/vendor/7zip/C/Md5.h +34 -0
  115. package/vendor/7zip/C/MtCoder.c +604 -0
  116. package/vendor/7zip/C/MtCoder.h +144 -0
  117. package/vendor/7zip/C/MtDec.c +1124 -0
  118. package/vendor/7zip/C/MtDec.h +202 -0
  119. package/vendor/7zip/C/Ppmd.h +169 -0
  120. package/vendor/7zip/C/Ppmd7.c +1131 -0
  121. package/vendor/7zip/C/Ppmd7.h +181 -0
  122. package/vendor/7zip/C/Ppmd7Dec.c +312 -0
  123. package/vendor/7zip/C/Ppmd7Enc.c +340 -0
  124. package/vendor/7zip/C/Ppmd7aDec.c +295 -0
  125. package/vendor/7zip/C/Ppmd8.c +1574 -0
  126. package/vendor/7zip/C/Ppmd8.h +181 -0
  127. package/vendor/7zip/C/Ppmd8Dec.c +295 -0
  128. package/vendor/7zip/C/Ppmd8Enc.c +337 -0
  129. package/vendor/7zip/C/Precomp.h +127 -0
  130. package/vendor/7zip/C/RotateDefs.h +50 -0
  131. package/vendor/7zip/C/Sha1.c +441 -0
  132. package/vendor/7zip/C/Sha1.h +86 -0
  133. package/vendor/7zip/C/Sha1Opt.c +424 -0
  134. package/vendor/7zip/C/Sha256.c +492 -0
  135. package/vendor/7zip/C/Sha256.h +86 -0
  136. package/vendor/7zip/C/Sha256Opt.c +451 -0
  137. package/vendor/7zip/C/Sha3.c +359 -0
  138. package/vendor/7zip/C/Sha3.h +36 -0
  139. package/vendor/7zip/C/Sha512.c +711 -0
  140. package/vendor/7zip/C/Sha512.h +86 -0
  141. package/vendor/7zip/C/Sha512Opt.c +395 -0
  142. package/vendor/7zip/C/Sort.c +268 -0
  143. package/vendor/7zip/C/Sort.h +15 -0
  144. package/vendor/7zip/C/SwapBytes.c +835 -0
  145. package/vendor/7zip/C/SwapBytes.h +17 -0
  146. package/vendor/7zip/C/Threads.c +826 -0
  147. package/vendor/7zip/C/Threads.h +260 -0
  148. package/vendor/7zip/C/Util/7z/7z.dsp +249 -0
  149. package/vendor/7zip/C/Util/7z/7z.dsw +29 -0
  150. package/vendor/7zip/C/Util/7z/7zMain.c +1210 -0
  151. package/vendor/7zip/C/Util/7z/Precomp.c +4 -0
  152. package/vendor/7zip/C/Util/7z/Precomp.h +13 -0
  153. package/vendor/7zip/C/Util/7z/makefile +44 -0
  154. package/vendor/7zip/C/Util/7z/makefile.gcc +32 -0
  155. package/vendor/7zip/C/Util/7zipInstall/7zip.ico +0 -0
  156. package/vendor/7zip/C/Util/7zipInstall/7zipInstall.c +1699 -0
  157. package/vendor/7zip/C/Util/7zipInstall/7zipInstall.dsp +248 -0
  158. package/vendor/7zip/C/Util/7zipInstall/7zipInstall.dsw +29 -0
  159. package/vendor/7zip/C/Util/7zipInstall/7zipInstall.manifest +18 -0
  160. package/vendor/7zip/C/Util/7zipInstall/Precomp.c +4 -0
  161. package/vendor/7zip/C/Util/7zipInstall/Precomp.h +13 -0
  162. package/vendor/7zip/C/Util/7zipInstall/makefile +47 -0
  163. package/vendor/7zip/C/Util/7zipInstall/resource.h +9 -0
  164. package/vendor/7zip/C/Util/7zipInstall/resource.rc +48 -0
  165. package/vendor/7zip/C/Util/7zipUninstall/7zipUninstall.c +1234 -0
  166. package/vendor/7zip/C/Util/7zipUninstall/7zipUninstall.dsp +132 -0
  167. package/vendor/7zip/C/Util/7zipUninstall/7zipUninstall.dsw +29 -0
  168. package/vendor/7zip/C/Util/7zipUninstall/7zipUninstall.ico +0 -0
  169. package/vendor/7zip/C/Util/7zipUninstall/7zipUninstall.manifest +18 -0
  170. package/vendor/7zip/C/Util/7zipUninstall/Precomp.c +4 -0
  171. package/vendor/7zip/C/Util/7zipUninstall/Precomp.h +13 -0
  172. package/vendor/7zip/C/Util/7zipUninstall/makefile +18 -0
  173. package/vendor/7zip/C/Util/7zipUninstall/resource.h +9 -0
  174. package/vendor/7zip/C/Util/7zipUninstall/resource.rc +48 -0
  175. package/vendor/7zip/C/Util/Lzma/LzmaUtil.c +313 -0
  176. package/vendor/7zip/C/Util/Lzma/LzmaUtil.dsp +192 -0
  177. package/vendor/7zip/C/Util/Lzma/LzmaUtil.dsw +29 -0
  178. package/vendor/7zip/C/Util/Lzma/Precomp.h +13 -0
  179. package/vendor/7zip/C/Util/Lzma/makefile +30 -0
  180. package/vendor/7zip/C/Util/Lzma/makefile.gcc +21 -0
  181. package/vendor/7zip/C/Util/LzmaLib/LzmaLib.def +4 -0
  182. package/vendor/7zip/C/Util/LzmaLib/LzmaLib.dsp +206 -0
  183. package/vendor/7zip/C/Util/LzmaLib/LzmaLib.dsw +29 -0
  184. package/vendor/7zip/C/Util/LzmaLib/LzmaLibExports.c +15 -0
  185. package/vendor/7zip/C/Util/LzmaLib/Precomp.c +4 -0
  186. package/vendor/7zip/C/Util/LzmaLib/Precomp.h +13 -0
  187. package/vendor/7zip/C/Util/LzmaLib/makefile +59 -0
  188. package/vendor/7zip/C/Util/LzmaLib/resource.rc +3 -0
  189. package/vendor/7zip/C/Util/SfxSetup/Precomp.c +4 -0
  190. package/vendor/7zip/C/Util/SfxSetup/Precomp.h +13 -0
  191. package/vendor/7zip/C/Util/SfxSetup/SfxSetup.c +657 -0
  192. package/vendor/7zip/C/Util/SfxSetup/SfxSetup.dsp +231 -0
  193. package/vendor/7zip/C/Util/SfxSetup/SfxSetup.dsw +29 -0
  194. package/vendor/7zip/C/Util/SfxSetup/makefile +44 -0
  195. package/vendor/7zip/C/Util/SfxSetup/makefile_con +40 -0
  196. package/vendor/7zip/C/Util/SfxSetup/resource.rc +5 -0
  197. package/vendor/7zip/C/Util/SfxSetup/setup.ico +0 -0
  198. package/vendor/7zip/C/Xxh64.c +389 -0
  199. package/vendor/7zip/C/Xxh64.h +50 -0
  200. package/vendor/7zip/C/Xz.c +92 -0
  201. package/vendor/7zip/C/Xz.h +542 -0
  202. package/vendor/7zip/C/XzCrc64.c +140 -0
  203. package/vendor/7zip/C/XzCrc64.h +26 -0
  204. package/vendor/7zip/C/XzCrc64Opt.c +261 -0
  205. package/vendor/7zip/C/XzDec.c +2865 -0
  206. package/vendor/7zip/C/XzEnc.c +1374 -0
  207. package/vendor/7zip/C/XzEnc.h +62 -0
  208. package/vendor/7zip/C/XzIn.c +385 -0
  209. package/vendor/7zip/C/ZstdDec.c +4067 -0
  210. package/vendor/7zip/C/ZstdDec.h +173 -0
  211. package/vendor/7zip/C/var_clang.mak +11 -0
  212. package/vendor/7zip/C/var_clang_arm64.mak +12 -0
  213. package/vendor/7zip/C/var_clang_x64.mak +11 -0
  214. package/vendor/7zip/C/var_clang_x86.mak +11 -0
  215. package/vendor/7zip/C/var_gcc.mak +12 -0
  216. package/vendor/7zip/C/var_gcc_arm64.mak +12 -0
  217. package/vendor/7zip/C/var_gcc_x64.mak +10 -0
  218. package/vendor/7zip/C/var_gcc_x86.mak +10 -0
  219. package/vendor/7zip/C/var_mac_arm64.mak +13 -0
  220. package/vendor/7zip/C/var_mac_x64.mak +13 -0
  221. package/vendor/7zip/C/warn_clang.mak +1 -0
  222. package/vendor/7zip/C/warn_clang_mac.mak +1 -0
  223. package/vendor/7zip/C/warn_gcc.mak +51 -0
  224. package/vendor/7zip/CPP/7zip/7zip.mak +240 -0
  225. package/vendor/7zip/CPP/7zip/7zip_gcc.mak +1376 -0
  226. package/vendor/7zip/CPP/7zip/Aes.mak +10 -0
  227. package/vendor/7zip/CPP/7zip/Archive/7z/7z.dsp +650 -0
  228. package/vendor/7zip/CPP/7zip/Archive/7z/7z.dsw +29 -0
  229. package/vendor/7zip/CPP/7zip/Archive/7z/7zCompressionMode.cpp +3 -0
  230. package/vendor/7zip/CPP/7zip/Archive/7z/7zCompressionMode.h +92 -0
  231. package/vendor/7zip/CPP/7zip/Archive/7z/7zDecode.cpp +599 -0
  232. package/vendor/7zip/CPP/7zip/Archive/7z/7zDecode.h +73 -0
  233. package/vendor/7zip/CPP/7zip/Archive/7z/7zEncode.cpp +702 -0
  234. package/vendor/7zip/CPP/7zip/Archive/7z/7zEncode.h +95 -0
  235. package/vendor/7zip/CPP/7zip/Archive/7z/7zExtract.cpp +444 -0
  236. package/vendor/7zip/CPP/7zip/Archive/7z/7zFolderInStream.cpp +264 -0
  237. package/vendor/7zip/CPP/7zip/Archive/7z/7zFolderInStream.h +101 -0
  238. package/vendor/7zip/CPP/7zip/Archive/7z/7zHandler.cpp +800 -0
  239. package/vendor/7zip/CPP/7zip/Archive/7z/7zHandler.h +178 -0
  240. package/vendor/7zip/CPP/7zip/Archive/7z/7zHandlerOut.cpp +1162 -0
  241. package/vendor/7zip/CPP/7zip/Archive/7z/7zHeader.cpp +19 -0
  242. package/vendor/7zip/CPP/7zip/Archive/7z/7zHeader.h +156 -0
  243. package/vendor/7zip/CPP/7zip/Archive/7z/7zIn.cpp +1815 -0
  244. package/vendor/7zip/CPP/7zip/Archive/7z/7zIn.h +454 -0
  245. package/vendor/7zip/CPP/7zip/Archive/7z/7zItem.h +207 -0
  246. package/vendor/7zip/CPP/7zip/Archive/7z/7zOut.cpp +1026 -0
  247. package/vendor/7zip/CPP/7zip/Archive/7z/7zOut.h +346 -0
  248. package/vendor/7zip/CPP/7zip/Archive/7z/7zProperties.cpp +182 -0
  249. package/vendor/7zip/CPP/7zip/Archive/7z/7zProperties.h +26 -0
  250. package/vendor/7zip/CPP/7zip/Archive/7z/7zRegister.cpp +27 -0
  251. package/vendor/7zip/CPP/7zip/Archive/7z/7zSpecStream.cpp +31 -0
  252. package/vendor/7zip/CPP/7zip/Archive/7z/7zSpecStream.h +49 -0
  253. package/vendor/7zip/CPP/7zip/Archive/7z/7zUpdate.cpp +3087 -0
  254. package/vendor/7zip/CPP/7zip/Archive/7z/7zUpdate.h +167 -0
  255. package/vendor/7zip/CPP/7zip/Archive/7z/StdAfx.cpp +3 -0
  256. package/vendor/7zip/CPP/7zip/Archive/7z/StdAfx.h +11 -0
  257. package/vendor/7zip/CPP/7zip/Archive/7z/makefile +81 -0
  258. package/vendor/7zip/CPP/7zip/Archive/7z/resource.rc +11 -0
  259. package/vendor/7zip/CPP/7zip/Archive/ApfsHandler.cpp +4470 -0
  260. package/vendor/7zip/CPP/7zip/Archive/ApmHandler.cpp +420 -0
  261. package/vendor/7zip/CPP/7zip/Archive/ArHandler.cpp +844 -0
  262. package/vendor/7zip/CPP/7zip/Archive/Archive.def +15 -0
  263. package/vendor/7zip/CPP/7zip/Archive/Archive2.def +22 -0
  264. package/vendor/7zip/CPP/7zip/Archive/ArchiveExports.cpp +158 -0
  265. package/vendor/7zip/CPP/7zip/Archive/ArjHandler.cpp +977 -0
  266. package/vendor/7zip/CPP/7zip/Archive/AvbHandler.cpp +616 -0
  267. package/vendor/7zip/CPP/7zip/Archive/Base64Handler.cpp +488 -0
  268. package/vendor/7zip/CPP/7zip/Archive/Bz2Handler.cpp +482 -0
  269. package/vendor/7zip/CPP/7zip/Archive/Cab/CabBlockInStream.cpp +122 -0
  270. package/vendor/7zip/CPP/7zip/Archive/Cab/CabBlockInStream.h +28 -0
  271. package/vendor/7zip/CPP/7zip/Archive/Cab/CabHandler.cpp +1270 -0
  272. package/vendor/7zip/CPP/7zip/Archive/Cab/CabHandler.h +29 -0
  273. package/vendor/7zip/CPP/7zip/Archive/Cab/CabHeader.cpp +15 -0
  274. package/vendor/7zip/CPP/7zip/Archive/Cab/CabHeader.h +41 -0
  275. package/vendor/7zip/CPP/7zip/Archive/Cab/CabIn.cpp +485 -0
  276. package/vendor/7zip/CPP/7zip/Archive/Cab/CabIn.h +169 -0
  277. package/vendor/7zip/CPP/7zip/Archive/Cab/CabItem.h +69 -0
  278. package/vendor/7zip/CPP/7zip/Archive/Cab/CabRegister.cpp +19 -0
  279. package/vendor/7zip/CPP/7zip/Archive/Cab/StdAfx.h +11 -0
  280. package/vendor/7zip/CPP/7zip/Archive/Chm/ChmHandler.cpp +790 -0
  281. package/vendor/7zip/CPP/7zip/Archive/Chm/ChmHandler.h +27 -0
  282. package/vendor/7zip/CPP/7zip/Archive/Chm/ChmIn.cpp +1026 -0
  283. package/vendor/7zip/CPP/7zip/Archive/Chm/ChmIn.h +282 -0
  284. package/vendor/7zip/CPP/7zip/Archive/Chm/StdAfx.h +11 -0
  285. package/vendor/7zip/CPP/7zip/Archive/ComHandler.cpp +1449 -0
  286. package/vendor/7zip/CPP/7zip/Archive/Common/CoderMixer2.cpp +1144 -0
  287. package/vendor/7zip/CPP/7zip/Archive/Common/CoderMixer2.h +447 -0
  288. package/vendor/7zip/CPP/7zip/Archive/Common/DummyOutStream.cpp +17 -0
  289. package/vendor/7zip/CPP/7zip/Archive/Common/DummyOutStream.h +23 -0
  290. package/vendor/7zip/CPP/7zip/Archive/Common/FindSignature.cpp +90 -0
  291. package/vendor/7zip/CPP/7zip/Archive/Common/FindSignature.h +12 -0
  292. package/vendor/7zip/CPP/7zip/Archive/Common/HandlerOut.cpp +315 -0
  293. package/vendor/7zip/CPP/7zip/Archive/Common/HandlerOut.h +169 -0
  294. package/vendor/7zip/CPP/7zip/Archive/Common/InStreamWithCRC.cpp +57 -0
  295. package/vendor/7zip/CPP/7zip/Archive/Common/InStreamWithCRC.h +64 -0
  296. package/vendor/7zip/CPP/7zip/Archive/Common/ItemNameUtils.cpp +140 -0
  297. package/vendor/7zip/CPP/7zip/Archive/Common/ItemNameUtils.h +33 -0
  298. package/vendor/7zip/CPP/7zip/Archive/Common/MultiStream.cpp +193 -0
  299. package/vendor/7zip/CPP/7zip/Archive/Common/MultiStream.h +86 -0
  300. package/vendor/7zip/CPP/7zip/Archive/Common/OutStreamWithCRC.cpp +18 -0
  301. package/vendor/7zip/CPP/7zip/Archive/Common/OutStreamWithCRC.h +35 -0
  302. package/vendor/7zip/CPP/7zip/Archive/Common/OutStreamWithSha1.cpp +29 -0
  303. package/vendor/7zip/CPP/7zip/Archive/Common/OutStreamWithSha1.h +61 -0
  304. package/vendor/7zip/CPP/7zip/Archive/Common/ParseProperties.cpp +3 -0
  305. package/vendor/7zip/CPP/7zip/Archive/Common/ParseProperties.h +6 -0
  306. package/vendor/7zip/CPP/7zip/Archive/Common/StdAfx.h +11 -0
  307. package/vendor/7zip/CPP/7zip/Archive/CpioHandler.cpp +1110 -0
  308. package/vendor/7zip/CPP/7zip/Archive/CramfsHandler.cpp +784 -0
  309. package/vendor/7zip/CPP/7zip/Archive/DeflateProps.cpp +3 -0
  310. package/vendor/7zip/CPP/7zip/Archive/DeflateProps.h +6 -0
  311. package/vendor/7zip/CPP/7zip/Archive/DllExports.cpp +96 -0
  312. package/vendor/7zip/CPP/7zip/Archive/DllExports2.cpp +184 -0
  313. package/vendor/7zip/CPP/7zip/Archive/DmgHandler.cpp +2336 -0
  314. package/vendor/7zip/CPP/7zip/Archive/ElfHandler.cpp +1284 -0
  315. package/vendor/7zip/CPP/7zip/Archive/ExtHandler.cpp +2860 -0
  316. package/vendor/7zip/CPP/7zip/Archive/FatHandler.cpp +1325 -0
  317. package/vendor/7zip/CPP/7zip/Archive/FlvHandler.cpp +521 -0
  318. package/vendor/7zip/CPP/7zip/Archive/GptHandler.cpp +473 -0
  319. package/vendor/7zip/CPP/7zip/Archive/GzHandler.cpp +1200 -0
  320. package/vendor/7zip/CPP/7zip/Archive/HandlerCont.cpp +320 -0
  321. package/vendor/7zip/CPP/7zip/Archive/HandlerCont.h +134 -0
  322. package/vendor/7zip/CPP/7zip/Archive/HfsHandler.cpp +2631 -0
  323. package/vendor/7zip/CPP/7zip/Archive/HfsHandler.h +87 -0
  324. package/vendor/7zip/CPP/7zip/Archive/IArchive.h +755 -0
  325. package/vendor/7zip/CPP/7zip/Archive/Icons/7z.ico +0 -0
  326. package/vendor/7zip/CPP/7zip/Archive/Icons/apfs.ico +0 -0
  327. package/vendor/7zip/CPP/7zip/Archive/Icons/arj.ico +0 -0
  328. package/vendor/7zip/CPP/7zip/Archive/Icons/bz2.ico +0 -0
  329. package/vendor/7zip/CPP/7zip/Archive/Icons/cab.ico +0 -0
  330. package/vendor/7zip/CPP/7zip/Archive/Icons/cpio.ico +0 -0
  331. package/vendor/7zip/CPP/7zip/Archive/Icons/deb.ico +0 -0
  332. package/vendor/7zip/CPP/7zip/Archive/Icons/dmg.ico +0 -0
  333. package/vendor/7zip/CPP/7zip/Archive/Icons/fat.ico +0 -0
  334. package/vendor/7zip/CPP/7zip/Archive/Icons/gz.ico +0 -0
  335. package/vendor/7zip/CPP/7zip/Archive/Icons/hfs.ico +0 -0
  336. package/vendor/7zip/CPP/7zip/Archive/Icons/iso.ico +0 -0
  337. package/vendor/7zip/CPP/7zip/Archive/Icons/lzh.ico +0 -0
  338. package/vendor/7zip/CPP/7zip/Archive/Icons/lzma.ico +0 -0
  339. package/vendor/7zip/CPP/7zip/Archive/Icons/ntfs.ico +0 -0
  340. package/vendor/7zip/CPP/7zip/Archive/Icons/rar.ico +0 -0
  341. package/vendor/7zip/CPP/7zip/Archive/Icons/rpm.ico +0 -0
  342. package/vendor/7zip/CPP/7zip/Archive/Icons/split.ico +0 -0
  343. package/vendor/7zip/CPP/7zip/Archive/Icons/squashfs.ico +0 -0
  344. package/vendor/7zip/CPP/7zip/Archive/Icons/tar.ico +0 -0
  345. package/vendor/7zip/CPP/7zip/Archive/Icons/vhd.ico +0 -0
  346. package/vendor/7zip/CPP/7zip/Archive/Icons/wim.ico +0 -0
  347. package/vendor/7zip/CPP/7zip/Archive/Icons/xar.ico +0 -0
  348. package/vendor/7zip/CPP/7zip/Archive/Icons/xz.ico +0 -0
  349. package/vendor/7zip/CPP/7zip/Archive/Icons/z.ico +0 -0
  350. package/vendor/7zip/CPP/7zip/Archive/Icons/zip.ico +0 -0
  351. package/vendor/7zip/CPP/7zip/Archive/Icons/zst.ico +0 -0
  352. package/vendor/7zip/CPP/7zip/Archive/IhexHandler.cpp +493 -0
  353. package/vendor/7zip/CPP/7zip/Archive/Iso/IsoHandler.cpp +498 -0
  354. package/vendor/7zip/CPP/7zip/Archive/Iso/IsoHandler.h +24 -0
  355. package/vendor/7zip/CPP/7zip/Archive/Iso/IsoHeader.cpp +12 -0
  356. package/vendor/7zip/CPP/7zip/Archive/Iso/IsoHeader.h +64 -0
  357. package/vendor/7zip/CPP/7zip/Archive/Iso/IsoIn.cpp +801 -0
  358. package/vendor/7zip/CPP/7zip/Archive/Iso/IsoIn.h +328 -0
  359. package/vendor/7zip/CPP/7zip/Archive/Iso/IsoItem.h +316 -0
  360. package/vendor/7zip/CPP/7zip/Archive/Iso/IsoRegister.cpp +21 -0
  361. package/vendor/7zip/CPP/7zip/Archive/Iso/StdAfx.h +11 -0
  362. package/vendor/7zip/CPP/7zip/Archive/LpHandler.cpp +1172 -0
  363. package/vendor/7zip/CPP/7zip/Archive/LvmHandler.cpp +1108 -0
  364. package/vendor/7zip/CPP/7zip/Archive/LzhHandler.cpp +719 -0
  365. package/vendor/7zip/CPP/7zip/Archive/LzmaHandler.cpp +606 -0
  366. package/vendor/7zip/CPP/7zip/Archive/MachoHandler.cpp +1075 -0
  367. package/vendor/7zip/CPP/7zip/Archive/MbrHandler.cpp +648 -0
  368. package/vendor/7zip/CPP/7zip/Archive/MslzHandler.cpp +389 -0
  369. package/vendor/7zip/CPP/7zip/Archive/MubHandler.cpp +248 -0
  370. package/vendor/7zip/CPP/7zip/Archive/Nsis/NsisDecode.cpp +295 -0
  371. package/vendor/7zip/CPP/7zip/Archive/Nsis/NsisDecode.h +97 -0
  372. package/vendor/7zip/CPP/7zip/Archive/Nsis/NsisHandler.cpp +703 -0
  373. package/vendor/7zip/CPP/7zip/Archive/Nsis/NsisHandler.h +30 -0
  374. package/vendor/7zip/CPP/7zip/Archive/Nsis/NsisIn.cpp +6231 -0
  375. package/vendor/7zip/CPP/7zip/Archive/Nsis/NsisIn.h +462 -0
  376. package/vendor/7zip/CPP/7zip/Archive/Nsis/NsisRegister.cpp +20 -0
  377. package/vendor/7zip/CPP/7zip/Archive/Nsis/StdAfx.h +11 -0
  378. package/vendor/7zip/CPP/7zip/Archive/NtfsHandler.cpp +2944 -0
  379. package/vendor/7zip/CPP/7zip/Archive/PeHandler.cpp +3427 -0
  380. package/vendor/7zip/CPP/7zip/Archive/PpmdHandler.cpp +414 -0
  381. package/vendor/7zip/CPP/7zip/Archive/QcowHandler.cpp +713 -0
  382. package/vendor/7zip/CPP/7zip/Archive/Rar/Rar5Handler.cpp +3483 -0
  383. package/vendor/7zip/CPP/7zip/Archive/Rar/Rar5Handler.h +527 -0
  384. package/vendor/7zip/CPP/7zip/Archive/Rar/RarHandler.cpp +1775 -0
  385. package/vendor/7zip/CPP/7zip/Archive/Rar/RarHandler.h +115 -0
  386. package/vendor/7zip/CPP/7zip/Archive/Rar/RarHeader.h +209 -0
  387. package/vendor/7zip/CPP/7zip/Archive/Rar/RarItem.h +97 -0
  388. package/vendor/7zip/CPP/7zip/Archive/Rar/RarVol.h +136 -0
  389. package/vendor/7zip/CPP/7zip/Archive/Rar/StdAfx.cpp +3 -0
  390. package/vendor/7zip/CPP/7zip/Archive/Rar/StdAfx.h +11 -0
  391. package/vendor/7zip/CPP/7zip/Archive/RpmHandler.cpp +775 -0
  392. package/vendor/7zip/CPP/7zip/Archive/SparseHandler.cpp +558 -0
  393. package/vendor/7zip/CPP/7zip/Archive/SplitHandler.cpp +353 -0
  394. package/vendor/7zip/CPP/7zip/Archive/SquashfsHandler.cpp +2373 -0
  395. package/vendor/7zip/CPP/7zip/Archive/StdAfx.h +11 -0
  396. package/vendor/7zip/CPP/7zip/Archive/SwfHandler.cpp +996 -0
  397. package/vendor/7zip/CPP/7zip/Archive/Tar/StdAfx.h +11 -0
  398. package/vendor/7zip/CPP/7zip/Archive/Tar/TarHandler.cpp +1105 -0
  399. package/vendor/7zip/CPP/7zip/Archive/Tar/TarHandler.h +57 -0
  400. package/vendor/7zip/CPP/7zip/Archive/Tar/TarHandlerOut.cpp +332 -0
  401. package/vendor/7zip/CPP/7zip/Archive/Tar/TarHeader.cpp +99 -0
  402. package/vendor/7zip/CPP/7zip/Archive/Tar/TarHeader.h +90 -0
  403. package/vendor/7zip/CPP/7zip/Archive/Tar/TarIn.cpp +1151 -0
  404. package/vendor/7zip/CPP/7zip/Archive/Tar/TarIn.h +151 -0
  405. package/vendor/7zip/CPP/7zip/Archive/Tar/TarItem.h +365 -0
  406. package/vendor/7zip/CPP/7zip/Archive/Tar/TarOut.cpp +644 -0
  407. package/vendor/7zip/CPP/7zip/Archive/Tar/TarOut.h +53 -0
  408. package/vendor/7zip/CPP/7zip/Archive/Tar/TarRegister.cpp +31 -0
  409. package/vendor/7zip/CPP/7zip/Archive/Tar/TarUpdate.cpp +563 -0
  410. package/vendor/7zip/CPP/7zip/Archive/Tar/TarUpdate.h +74 -0
  411. package/vendor/7zip/CPP/7zip/Archive/Udf/StdAfx.h +11 -0
  412. package/vendor/7zip/CPP/7zip/Archive/Udf/UdfHandler.cpp +427 -0
  413. package/vendor/7zip/CPP/7zip/Archive/Udf/UdfHandler.h +32 -0
  414. package/vendor/7zip/CPP/7zip/Archive/Udf/UdfIn.cpp +1756 -0
  415. package/vendor/7zip/CPP/7zip/Archive/Udf/UdfIn.h +508 -0
  416. package/vendor/7zip/CPP/7zip/Archive/UefiHandler.cpp +1884 -0
  417. package/vendor/7zip/CPP/7zip/Archive/VdiHandler.cpp +433 -0
  418. package/vendor/7zip/CPP/7zip/Archive/VhdHandler.cpp +1106 -0
  419. package/vendor/7zip/CPP/7zip/Archive/VhdxHandler.cpp +2085 -0
  420. package/vendor/7zip/CPP/7zip/Archive/VmdkHandler.cpp +1530 -0
  421. package/vendor/7zip/CPP/7zip/Archive/Wim/StdAfx.h +11 -0
  422. package/vendor/7zip/CPP/7zip/Archive/Wim/WimHandler.cpp +1291 -0
  423. package/vendor/7zip/CPP/7zip/Archive/Wim/WimHandler.h +117 -0
  424. package/vendor/7zip/CPP/7zip/Archive/Wim/WimHandlerOut.cpp +2008 -0
  425. package/vendor/7zip/CPP/7zip/Archive/Wim/WimIn.cpp +2104 -0
  426. package/vendor/7zip/CPP/7zip/Archive/Wim/WimIn.h +719 -0
  427. package/vendor/7zip/CPP/7zip/Archive/Wim/WimRegister.cpp +29 -0
  428. package/vendor/7zip/CPP/7zip/Archive/XarHandler.cpp +1316 -0
  429. package/vendor/7zip/CPP/7zip/Archive/XzHandler.cpp +1452 -0
  430. package/vendor/7zip/CPP/7zip/Archive/XzHandler.h +11 -0
  431. package/vendor/7zip/CPP/7zip/Archive/ZHandler.cpp +208 -0
  432. package/vendor/7zip/CPP/7zip/Archive/Zip/StdAfx.h +11 -0
  433. package/vendor/7zip/CPP/7zip/Archive/Zip/ZipAddCommon.cpp +484 -0
  434. package/vendor/7zip/CPP/7zip/Archive/Zip/ZipAddCommon.h +76 -0
  435. package/vendor/7zip/CPP/7zip/Archive/Zip/ZipCompressionMode.h +62 -0
  436. package/vendor/7zip/CPP/7zip/Archive/Zip/ZipHandler.cpp +1679 -0
  437. package/vendor/7zip/CPP/7zip/Archive/Zip/ZipHandler.h +94 -0
  438. package/vendor/7zip/CPP/7zip/Archive/Zip/ZipHandlerOut.cpp +626 -0
  439. package/vendor/7zip/CPP/7zip/Archive/Zip/ZipHeader.h +201 -0
  440. package/vendor/7zip/CPP/7zip/Archive/Zip/ZipIn.cpp +3474 -0
  441. package/vendor/7zip/CPP/7zip/Archive/Zip/ZipIn.h +456 -0
  442. package/vendor/7zip/CPP/7zip/Archive/Zip/ZipItem.cpp +464 -0
  443. package/vendor/7zip/CPP/7zip/Archive/Zip/ZipItem.h +356 -0
  444. package/vendor/7zip/CPP/7zip/Archive/Zip/ZipOut.cpp +428 -0
  445. package/vendor/7zip/CPP/7zip/Archive/Zip/ZipOut.h +103 -0
  446. package/vendor/7zip/CPP/7zip/Archive/Zip/ZipRegister.cpp +38 -0
  447. package/vendor/7zip/CPP/7zip/Archive/Zip/ZipUpdate.cpp +2165 -0
  448. package/vendor/7zip/CPP/7zip/Archive/Zip/ZipUpdate.h +107 -0
  449. package/vendor/7zip/CPP/7zip/Archive/ZstdHandler.cpp +1147 -0
  450. package/vendor/7zip/CPP/7zip/Archive/makefile +23 -0
  451. package/vendor/7zip/CPP/7zip/Asm.mak +12 -0
  452. package/vendor/7zip/CPP/7zip/Bundles/Alone/Alone.dsp +3324 -0
  453. package/vendor/7zip/CPP/7zip/Bundles/Alone/Alone.dsw +29 -0
  454. package/vendor/7zip/CPP/7zip/Bundles/Alone/StdAfx.cpp +3 -0
  455. package/vendor/7zip/CPP/7zip/Bundles/Alone/StdAfx.h +11 -0
  456. package/vendor/7zip/CPP/7zip/Bundles/Alone/makefile +245 -0
  457. package/vendor/7zip/CPP/7zip/Bundles/Alone/makefile.gcc +354 -0
  458. package/vendor/7zip/CPP/7zip/Bundles/Alone/resource.rc +7 -0
  459. package/vendor/7zip/CPP/7zip/Bundles/Alone2/StdAfx.cpp +3 -0
  460. package/vendor/7zip/CPP/7zip/Bundles/Alone2/StdAfx.h +11 -0
  461. package/vendor/7zip/CPP/7zip/Bundles/Alone2/makefile +31 -0
  462. package/vendor/7zip/CPP/7zip/Bundles/Alone2/makefile.gcc +108 -0
  463. package/vendor/7zip/CPP/7zip/Bundles/Alone2/resource.rc +7 -0
  464. package/vendor/7zip/CPP/7zip/Bundles/Alone7z/Alone.dsp +2090 -0
  465. package/vendor/7zip/CPP/7zip/Bundles/Alone7z/Alone.dsw +29 -0
  466. package/vendor/7zip/CPP/7zip/Bundles/Alone7z/StdAfx.cpp +3 -0
  467. package/vendor/7zip/CPP/7zip/Bundles/Alone7z/StdAfx.h +11 -0
  468. package/vendor/7zip/CPP/7zip/Bundles/Alone7z/makefile +168 -0
  469. package/vendor/7zip/CPP/7zip/Bundles/Alone7z/makefile.gcc +276 -0
  470. package/vendor/7zip/CPP/7zip/Bundles/Alone7z/resource.rc +7 -0
  471. package/vendor/7zip/CPP/7zip/Bundles/Fm/FM.dsp +2275 -0
  472. package/vendor/7zip/CPP/7zip/Bundles/Fm/FM.dsw +29 -0
  473. package/vendor/7zip/CPP/7zip/Bundles/Fm/StdAfx.cpp +3 -0
  474. package/vendor/7zip/CPP/7zip/Bundles/Fm/StdAfx.h +6 -0
  475. package/vendor/7zip/CPP/7zip/Bundles/Fm/makefile +82 -0
  476. package/vendor/7zip/CPP/7zip/Bundles/Fm/resource.rc +7 -0
  477. package/vendor/7zip/CPP/7zip/Bundles/Format7z/StdAfx.cpp +3 -0
  478. package/vendor/7zip/CPP/7zip/Bundles/Format7z/StdAfx.h +11 -0
  479. package/vendor/7zip/CPP/7zip/Bundles/Format7z/makefile +148 -0
  480. package/vendor/7zip/CPP/7zip/Bundles/Format7z/resource.rc +5 -0
  481. package/vendor/7zip/CPP/7zip/Bundles/Format7zExtract/StdAfx.cpp +3 -0
  482. package/vendor/7zip/CPP/7zip/Bundles/Format7zExtract/StdAfx.h +11 -0
  483. package/vendor/7zip/CPP/7zip/Bundles/Format7zExtract/makefile +116 -0
  484. package/vendor/7zip/CPP/7zip/Bundles/Format7zExtract/resource.rc +5 -0
  485. package/vendor/7zip/CPP/7zip/Bundles/Format7zExtractR/StdAfx.cpp +3 -0
  486. package/vendor/7zip/CPP/7zip/Bundles/Format7zExtractR/StdAfx.h +11 -0
  487. package/vendor/7zip/CPP/7zip/Bundles/Format7zExtractR/makefile +98 -0
  488. package/vendor/7zip/CPP/7zip/Bundles/Format7zExtractR/resource.rc +5 -0
  489. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/Arc.mak +310 -0
  490. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/Arc_gcc.mak +395 -0
  491. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/Format7z.dsp +3486 -0
  492. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/Format7z.dsw +29 -0
  493. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/StdAfx.cpp +3 -0
  494. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/StdAfx.h +11 -0
  495. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/makefile +20 -0
  496. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/makefile.gcc +55 -0
  497. package/vendor/7zip/CPP/7zip/Bundles/Format7zF/resource.rc +39 -0
  498. package/vendor/7zip/CPP/7zip/Bundles/Format7zR/StdAfx.cpp +3 -0
  499. package/vendor/7zip/CPP/7zip/Bundles/Format7zR/StdAfx.h +11 -0
  500. package/vendor/7zip/CPP/7zip/Bundles/Format7zR/makefile +121 -0
  501. package/vendor/7zip/CPP/7zip/Bundles/Format7zR/resource.rc +5 -0
  502. package/vendor/7zip/CPP/7zip/Bundles/LzmaCon/LzmaAlone.cpp +815 -0
  503. package/vendor/7zip/CPP/7zip/Bundles/LzmaCon/LzmaCon.dsp +540 -0
  504. package/vendor/7zip/CPP/7zip/Bundles/LzmaCon/LzmaCon.dsw +29 -0
  505. package/vendor/7zip/CPP/7zip/Bundles/LzmaCon/StdAfx.cpp +3 -0
  506. package/vendor/7zip/CPP/7zip/Bundles/LzmaCon/StdAfx.h +11 -0
  507. package/vendor/7zip/CPP/7zip/Bundles/LzmaCon/makefile +68 -0
  508. package/vendor/7zip/CPP/7zip/Bundles/LzmaCon/makefile.gcc +131 -0
  509. package/vendor/7zip/CPP/7zip/Bundles/LzmaCon/resource.rc +3 -0
  510. package/vendor/7zip/CPP/7zip/Bundles/SFXCon/7z.ico +0 -0
  511. package/vendor/7zip/CPP/7zip/Bundles/SFXCon/SFXCon.dsp +1017 -0
  512. package/vendor/7zip/CPP/7zip/Bundles/SFXCon/SFXCon.dsw +29 -0
  513. package/vendor/7zip/CPP/7zip/Bundles/SFXCon/SfxCon.cpp +521 -0
  514. package/vendor/7zip/CPP/7zip/Bundles/SFXCon/StdAfx.cpp +3 -0
  515. package/vendor/7zip/CPP/7zip/Bundles/SFXCon/StdAfx.h +11 -0
  516. package/vendor/7zip/CPP/7zip/Bundles/SFXCon/makefile +137 -0
  517. package/vendor/7zip/CPP/7zip/Bundles/SFXCon/makefile.gcc +215 -0
  518. package/vendor/7zip/CPP/7zip/Bundles/SFXCon/resource.rc +9 -0
  519. package/vendor/7zip/CPP/7zip/Bundles/SFXSetup/ExtractCallbackSfx.cpp +246 -0
  520. package/vendor/7zip/CPP/7zip/Bundles/SFXSetup/ExtractCallbackSfx.h +83 -0
  521. package/vendor/7zip/CPP/7zip/Bundles/SFXSetup/ExtractEngine.cpp +135 -0
  522. package/vendor/7zip/CPP/7zip/Bundles/SFXSetup/ExtractEngine.h +11 -0
  523. package/vendor/7zip/CPP/7zip/Bundles/SFXSetup/SFXSetup.dsp +872 -0
  524. package/vendor/7zip/CPP/7zip/Bundles/SFXSetup/SFXSetup.dsw +29 -0
  525. package/vendor/7zip/CPP/7zip/Bundles/SFXSetup/SfxSetup.cpp +359 -0
  526. package/vendor/7zip/CPP/7zip/Bundles/SFXSetup/StdAfx.cpp +3 -0
  527. package/vendor/7zip/CPP/7zip/Bundles/SFXSetup/StdAfx.h +6 -0
  528. package/vendor/7zip/CPP/7zip/Bundles/SFXSetup/makefile +121 -0
  529. package/vendor/7zip/CPP/7zip/Bundles/SFXSetup/resource.h +6 -0
  530. package/vendor/7zip/CPP/7zip/Bundles/SFXSetup/resource.rc +16 -0
  531. package/vendor/7zip/CPP/7zip/Bundles/SFXSetup/setup.ico +0 -0
  532. package/vendor/7zip/CPP/7zip/Bundles/SFXWin/7z.ico +0 -0
  533. package/vendor/7zip/CPP/7zip/Bundles/SFXWin/SFXWin.dsp +1074 -0
  534. package/vendor/7zip/CPP/7zip/Bundles/SFXWin/SFXWin.dsw +29 -0
  535. package/vendor/7zip/CPP/7zip/Bundles/SFXWin/SfxWin.cpp +268 -0
  536. package/vendor/7zip/CPP/7zip/Bundles/SFXWin/StdAfx.cpp +3 -0
  537. package/vendor/7zip/CPP/7zip/Bundles/SFXWin/StdAfx.h +6 -0
  538. package/vendor/7zip/CPP/7zip/Bundles/SFXWin/makefile +159 -0
  539. package/vendor/7zip/CPP/7zip/Bundles/SFXWin/resource.h +1 -0
  540. package/vendor/7zip/CPP/7zip/Bundles/SFXWin/resource.rc +55 -0
  541. package/vendor/7zip/CPP/7zip/Bundles/makefile +19 -0
  542. package/vendor/7zip/CPP/7zip/Common/CWrappers.cpp +358 -0
  543. package/vendor/7zip/CPP/7zip/Common/CWrappers.h +182 -0
  544. package/vendor/7zip/CPP/7zip/Common/CreateCoder.cpp +548 -0
  545. package/vendor/7zip/CPP/7zip/Common/CreateCoder.h +200 -0
  546. package/vendor/7zip/CPP/7zip/Common/FilePathAutoRename.cpp +46 -0
  547. package/vendor/7zip/CPP/7zip/Common/FilePathAutoRename.h +10 -0
  548. package/vendor/7zip/CPP/7zip/Common/FileStreams.cpp +923 -0
  549. package/vendor/7zip/CPP/7zip/Common/FileStreams.h +205 -0
  550. package/vendor/7zip/CPP/7zip/Common/FilterCoder.cpp +582 -0
  551. package/vendor/7zip/CPP/7zip/Common/FilterCoder.h +201 -0
  552. package/vendor/7zip/CPP/7zip/Common/InBuffer.cpp +182 -0
  553. package/vendor/7zip/CPP/7zip/Common/InBuffer.h +121 -0
  554. package/vendor/7zip/CPP/7zip/Common/InOutTempBuffer.cpp +237 -0
  555. package/vendor/7zip/CPP/7zip/Common/InOutTempBuffer.h +45 -0
  556. package/vendor/7zip/CPP/7zip/Common/LimitedStreams.cpp +395 -0
  557. package/vendor/7zip/CPP/7zip/Common/LimitedStreams.h +221 -0
  558. package/vendor/7zip/CPP/7zip/Common/LockedStream.cpp +3 -0
  559. package/vendor/7zip/CPP/7zip/Common/LockedStream.h +6 -0
  560. package/vendor/7zip/CPP/7zip/Common/MemBlocks.cpp +215 -0
  561. package/vendor/7zip/CPP/7zip/Common/MemBlocks.h +72 -0
  562. package/vendor/7zip/CPP/7zip/Common/MethodId.cpp +3 -0
  563. package/vendor/7zip/CPP/7zip/Common/MethodId.h +10 -0
  564. package/vendor/7zip/CPP/7zip/Common/MethodProps.cpp +765 -0
  565. package/vendor/7zip/CPP/7zip/Common/MethodProps.h +348 -0
  566. package/vendor/7zip/CPP/7zip/Common/MultiOutStream.cpp +855 -0
  567. package/vendor/7zip/CPP/7zip/Common/MultiOutStream.h +160 -0
  568. package/vendor/7zip/CPP/7zip/Common/OffsetStream.cpp +37 -0
  569. package/vendor/7zip/CPP/7zip/Common/OffsetStream.h +22 -0
  570. package/vendor/7zip/CPP/7zip/Common/OutBuffer.cpp +111 -0
  571. package/vendor/7zip/CPP/7zip/Common/OutBuffer.h +133 -0
  572. package/vendor/7zip/CPP/7zip/Common/OutMemStream.cpp +158 -0
  573. package/vendor/7zip/CPP/7zip/Common/OutMemStream.h +104 -0
  574. package/vendor/7zip/CPP/7zip/Common/ProgressMt.cpp +53 -0
  575. package/vendor/7zip/CPP/7zip/Common/ProgressMt.h +43 -0
  576. package/vendor/7zip/CPP/7zip/Common/ProgressUtils.cpp +51 -0
  577. package/vendor/7zip/CPP/7zip/Common/ProgressUtils.h +33 -0
  578. package/vendor/7zip/CPP/7zip/Common/PropId.cpp +115 -0
  579. package/vendor/7zip/CPP/7zip/Common/RegisterArc.h +80 -0
  580. package/vendor/7zip/CPP/7zip/Common/RegisterCodec.h +106 -0
  581. package/vendor/7zip/CPP/7zip/Common/StdAfx.h +11 -0
  582. package/vendor/7zip/CPP/7zip/Common/StreamBinder.cpp +151 -0
  583. package/vendor/7zip/CPP/7zip/Common/StreamBinder.h +78 -0
  584. package/vendor/7zip/CPP/7zip/Common/StreamObjects.cpp +290 -0
  585. package/vendor/7zip/CPP/7zip/Common/StreamObjects.h +146 -0
  586. package/vendor/7zip/CPP/7zip/Common/StreamUtils.cpp +101 -0
  587. package/vendor/7zip/CPP/7zip/Common/StreamUtils.h +31 -0
  588. package/vendor/7zip/CPP/7zip/Common/UniqBlocks.cpp +57 -0
  589. package/vendor/7zip/CPP/7zip/Common/UniqBlocks.h +41 -0
  590. package/vendor/7zip/CPP/7zip/Common/VirtThread.cpp +47 -0
  591. package/vendor/7zip/CPP/7zip/Common/VirtThread.h +24 -0
  592. package/vendor/7zip/CPP/7zip/Compress/BZip2Const.h +71 -0
  593. package/vendor/7zip/CPP/7zip/Compress/BZip2Crc.cpp +28 -0
  594. package/vendor/7zip/CPP/7zip/Compress/BZip2Crc.h +31 -0
  595. package/vendor/7zip/CPP/7zip/Compress/BZip2Decoder.cpp +1777 -0
  596. package/vendor/7zip/CPP/7zip/Compress/BZip2Decoder.h +388 -0
  597. package/vendor/7zip/CPP/7zip/Compress/BZip2Encoder.cpp +1116 -0
  598. package/vendor/7zip/CPP/7zip/Compress/BZip2Encoder.h +273 -0
  599. package/vendor/7zip/CPP/7zip/Compress/BZip2Register.cpp +25 -0
  600. package/vendor/7zip/CPP/7zip/Compress/Bcj2Coder.cpp +867 -0
  601. package/vendor/7zip/CPP/7zip/Compress/Bcj2Coder.h +127 -0
  602. package/vendor/7zip/CPP/7zip/Compress/Bcj2Register.cpp +24 -0
  603. package/vendor/7zip/CPP/7zip/Compress/BcjCoder.cpp +24 -0
  604. package/vendor/7zip/CPP/7zip/Compress/BcjCoder.h +37 -0
  605. package/vendor/7zip/CPP/7zip/Compress/BcjRegister.cpp +17 -0
  606. package/vendor/7zip/CPP/7zip/Compress/BitlDecoder.cpp +32 -0
  607. package/vendor/7zip/CPP/7zip/Compress/BitlDecoder.h +225 -0
  608. package/vendor/7zip/CPP/7zip/Compress/BitlEncoder.h +57 -0
  609. package/vendor/7zip/CPP/7zip/Compress/BitmDecoder.h +106 -0
  610. package/vendor/7zip/CPP/7zip/Compress/BitmEncoder.h +90 -0
  611. package/vendor/7zip/CPP/7zip/Compress/BranchMisc.cpp +106 -0
  612. package/vendor/7zip/CPP/7zip/Compress/BranchMisc.h +59 -0
  613. package/vendor/7zip/CPP/7zip/Compress/BranchRegister.cpp +58 -0
  614. package/vendor/7zip/CPP/7zip/Compress/ByteSwap.cpp +91 -0
  615. package/vendor/7zip/CPP/7zip/Compress/Codec.def +7 -0
  616. package/vendor/7zip/CPP/7zip/Compress/CodecExports.cpp +378 -0
  617. package/vendor/7zip/CPP/7zip/Compress/CopyCoder.cpp +153 -0
  618. package/vendor/7zip/CPP/7zip/Compress/CopyCoder.h +34 -0
  619. package/vendor/7zip/CPP/7zip/Compress/CopyRegister.cpp +15 -0
  620. package/vendor/7zip/CPP/7zip/Compress/Deflate64Register.cpp +25 -0
  621. package/vendor/7zip/CPP/7zip/Compress/DeflateConst.h +131 -0
  622. package/vendor/7zip/CPP/7zip/Compress/DeflateDecoder.cpp +566 -0
  623. package/vendor/7zip/CPP/7zip/Compress/DeflateDecoder.h +154 -0
  624. package/vendor/7zip/CPP/7zip/Compress/DeflateEncoder.cpp +1045 -0
  625. package/vendor/7zip/CPP/7zip/Compress/DeflateEncoder.h +203 -0
  626. package/vendor/7zip/CPP/7zip/Compress/DeflateRegister.cpp +25 -0
  627. package/vendor/7zip/CPP/7zip/Compress/DeltaFilter.cpp +126 -0
  628. package/vendor/7zip/CPP/7zip/Compress/DllExports2Compress.cpp +38 -0
  629. package/vendor/7zip/CPP/7zip/Compress/DllExportsCompress.cpp +59 -0
  630. package/vendor/7zip/CPP/7zip/Compress/HuffmanDecoder.h +528 -0
  631. package/vendor/7zip/CPP/7zip/Compress/ImplodeDecoder.cpp +250 -0
  632. package/vendor/7zip/CPP/7zip/Compress/ImplodeDecoder.h +61 -0
  633. package/vendor/7zip/CPP/7zip/Compress/ImplodeHuffmanDecoder.cpp +3 -0
  634. package/vendor/7zip/CPP/7zip/Compress/ImplodeHuffmanDecoder.h +6 -0
  635. package/vendor/7zip/CPP/7zip/Compress/LzOutWindow.cpp +14 -0
  636. package/vendor/7zip/CPP/7zip/Compress/LzOutWindow.h +102 -0
  637. package/vendor/7zip/CPP/7zip/Compress/LzfseDecoder.cpp +950 -0
  638. package/vendor/7zip/CPP/7zip/Compress/LzfseDecoder.h +63 -0
  639. package/vendor/7zip/CPP/7zip/Compress/LzhDecoder.cpp +220 -0
  640. package/vendor/7zip/CPP/7zip/Compress/LzhDecoder.h +68 -0
  641. package/vendor/7zip/CPP/7zip/Compress/Lzma2Decoder.cpp +267 -0
  642. package/vendor/7zip/CPP/7zip/Compress/Lzma2Decoder.h +87 -0
  643. package/vendor/7zip/CPP/7zip/Compress/Lzma2Encoder.cpp +134 -0
  644. package/vendor/7zip/CPP/7zip/Compress/Lzma2Encoder.h +30 -0
  645. package/vendor/7zip/CPP/7zip/Compress/Lzma2Register.cpp +22 -0
  646. package/vendor/7zip/CPP/7zip/Compress/LzmaDecoder.cpp +350 -0
  647. package/vendor/7zip/CPP/7zip/Compress/LzmaDecoder.h +113 -0
  648. package/vendor/7zip/CPP/7zip/Compress/LzmaEncoder.cpp +374 -0
  649. package/vendor/7zip/CPP/7zip/Compress/LzmaEncoder.h +45 -0
  650. package/vendor/7zip/CPP/7zip/Compress/LzmaRegister.cpp +22 -0
  651. package/vendor/7zip/CPP/7zip/Compress/LzmsDecoder.cpp +619 -0
  652. package/vendor/7zip/CPP/7zip/Compress/LzmsDecoder.h +209 -0
  653. package/vendor/7zip/CPP/7zip/Compress/Lzx.h +61 -0
  654. package/vendor/7zip/CPP/7zip/Compress/LzxDecoder.cpp +1517 -0
  655. package/vendor/7zip/CPP/7zip/Compress/LzxDecoder.h +106 -0
  656. package/vendor/7zip/CPP/7zip/Compress/Mtf8.h +225 -0
  657. package/vendor/7zip/CPP/7zip/Compress/PpmdDecoder.cpp +219 -0
  658. package/vendor/7zip/CPP/7zip/Compress/PpmdDecoder.h +87 -0
  659. package/vendor/7zip/CPP/7zip/Compress/PpmdEncoder.cpp +193 -0
  660. package/vendor/7zip/CPP/7zip/Compress/PpmdEncoder.h +49 -0
  661. package/vendor/7zip/CPP/7zip/Compress/PpmdRegister.cpp +22 -0
  662. package/vendor/7zip/CPP/7zip/Compress/PpmdZip.cpp +309 -0
  663. package/vendor/7zip/CPP/7zip/Compress/PpmdZip.h +78 -0
  664. package/vendor/7zip/CPP/7zip/Compress/QuantumDecoder.cpp +355 -0
  665. package/vendor/7zip/CPP/7zip/Compress/QuantumDecoder.h +60 -0
  666. package/vendor/7zip/CPP/7zip/Compress/Rar1Decoder.cpp +518 -0
  667. package/vendor/7zip/CPP/7zip/Compress/Rar1Decoder.h +70 -0
  668. package/vendor/7zip/CPP/7zip/Compress/Rar2Decoder.cpp +472 -0
  669. package/vendor/7zip/CPP/7zip/Compress/Rar2Decoder.h +111 -0
  670. package/vendor/7zip/CPP/7zip/Compress/Rar3Decoder.cpp +939 -0
  671. package/vendor/7zip/CPP/7zip/Compress/Rar3Decoder.h +283 -0
  672. package/vendor/7zip/CPP/7zip/Compress/Rar3Vm.cpp +1153 -0
  673. package/vendor/7zip/CPP/7zip/Compress/Rar3Vm.h +195 -0
  674. package/vendor/7zip/CPP/7zip/Compress/Rar5Decoder.cpp +2060 -0
  675. package/vendor/7zip/CPP/7zip/Compress/Rar5Decoder.h +132 -0
  676. package/vendor/7zip/CPP/7zip/Compress/RarCodecsRegister.cpp +33 -0
  677. package/vendor/7zip/CPP/7zip/Compress/ShrinkDecoder.cpp +290 -0
  678. package/vendor/7zip/CPP/7zip/Compress/ShrinkDecoder.h +38 -0
  679. package/vendor/7zip/CPP/7zip/Compress/StdAfx.h +11 -0
  680. package/vendor/7zip/CPP/7zip/Compress/XpressDecoder.cpp +399 -0
  681. package/vendor/7zip/CPP/7zip/Compress/XpressDecoder.h +18 -0
  682. package/vendor/7zip/CPP/7zip/Compress/XzDecoder.cpp +151 -0
  683. package/vendor/7zip/CPP/7zip/Compress/XzDecoder.h +86 -0
  684. package/vendor/7zip/CPP/7zip/Compress/XzEncoder.cpp +243 -0
  685. package/vendor/7zip/CPP/7zip/Compress/XzEncoder.h +35 -0
  686. package/vendor/7zip/CPP/7zip/Compress/ZDecoder.cpp +392 -0
  687. package/vendor/7zip/CPP/7zip/Compress/ZDecoder.h +41 -0
  688. package/vendor/7zip/CPP/7zip/Compress/ZlibDecoder.cpp +136 -0
  689. package/vendor/7zip/CPP/7zip/Compress/ZlibDecoder.h +78 -0
  690. package/vendor/7zip/CPP/7zip/Compress/ZlibEncoder.cpp +61 -0
  691. package/vendor/7zip/CPP/7zip/Compress/ZlibEncoder.h +42 -0
  692. package/vendor/7zip/CPP/7zip/Compress/ZstdDecoder.cpp +437 -0
  693. package/vendor/7zip/CPP/7zip/Compress/ZstdDecoder.h +98 -0
  694. package/vendor/7zip/CPP/7zip/Compress/makefile +7 -0
  695. package/vendor/7zip/CPP/7zip/Crc.mak +8 -0
  696. package/vendor/7zip/CPP/7zip/Crc64.mak +8 -0
  697. package/vendor/7zip/CPP/7zip/Crypto/7zAes.cpp +315 -0
  698. package/vendor/7zip/CPP/7zip/Crypto/7zAes.h +130 -0
  699. package/vendor/7zip/CPP/7zip/Crypto/7zAesRegister.cpp +17 -0
  700. package/vendor/7zip/CPP/7zip/Crypto/Codec.def +4 -0
  701. package/vendor/7zip/CPP/7zip/Crypto/HmacSha1.cpp +94 -0
  702. package/vendor/7zip/CPP/7zip/Crypto/HmacSha1.h +31 -0
  703. package/vendor/7zip/CPP/7zip/Crypto/HmacSha256.cpp +53 -0
  704. package/vendor/7zip/CPP/7zip/Crypto/HmacSha256.h +27 -0
  705. package/vendor/7zip/CPP/7zip/Crypto/MyAes.cpp +277 -0
  706. package/vendor/7zip/CPP/7zip/Crypto/MyAes.h +122 -0
  707. package/vendor/7zip/CPP/7zip/Crypto/MyAesReg.cpp +29 -0
  708. package/vendor/7zip/CPP/7zip/Crypto/Pbkdf2HmacSha1.cpp +48 -0
  709. package/vendor/7zip/CPP/7zip/Crypto/Pbkdf2HmacSha1.h +19 -0
  710. package/vendor/7zip/CPP/7zip/Crypto/RandGen.cpp +242 -0
  711. package/vendor/7zip/CPP/7zip/Crypto/RandGen.h +41 -0
  712. package/vendor/7zip/CPP/7zip/Crypto/Rar20Crypto.cpp +130 -0
  713. package/vendor/7zip/CPP/7zip/Crypto/Rar20Crypto.h +54 -0
  714. package/vendor/7zip/CPP/7zip/Crypto/Rar5Aes.cpp +273 -0
  715. package/vendor/7zip/CPP/7zip/Crypto/Rar5Aes.h +97 -0
  716. package/vendor/7zip/CPP/7zip/Crypto/RarAes.cpp +202 -0
  717. package/vendor/7zip/CPP/7zip/Crypto/RarAes.h +54 -0
  718. package/vendor/7zip/CPP/7zip/Crypto/Sha1Cls.h +37 -0
  719. package/vendor/7zip/CPP/7zip/Crypto/StdAfx.h +11 -0
  720. package/vendor/7zip/CPP/7zip/Crypto/WzAes.cpp +231 -0
  721. package/vendor/7zip/CPP/7zip/Crypto/WzAes.h +161 -0
  722. package/vendor/7zip/CPP/7zip/Crypto/ZipCrypto.cpp +114 -0
  723. package/vendor/7zip/CPP/7zip/Crypto/ZipCrypto.h +80 -0
  724. package/vendor/7zip/CPP/7zip/Crypto/ZipStrong.cpp +265 -0
  725. package/vendor/7zip/CPP/7zip/Crypto/ZipStrong.h +73 -0
  726. package/vendor/7zip/CPP/7zip/GuiCommon.rc +119 -0
  727. package/vendor/7zip/CPP/7zip/Guid.txt +243 -0
  728. package/vendor/7zip/CPP/7zip/ICoder.h +480 -0
  729. package/vendor/7zip/CPP/7zip/IDecl.h +76 -0
  730. package/vendor/7zip/CPP/7zip/IPassword.h +54 -0
  731. package/vendor/7zip/CPP/7zip/IProgress.h +20 -0
  732. package/vendor/7zip/CPP/7zip/IStream.h +210 -0
  733. package/vendor/7zip/CPP/7zip/LzFindOpt.mak +7 -0
  734. package/vendor/7zip/CPP/7zip/LzmaDec.mak +7 -0
  735. package/vendor/7zip/CPP/7zip/LzmaDec_gcc.mak +14 -0
  736. package/vendor/7zip/CPP/7zip/MyVersion.h +2 -0
  737. package/vendor/7zip/CPP/7zip/MyVersionInfo.rc +2 -0
  738. package/vendor/7zip/CPP/7zip/PropID.h +178 -0
  739. package/vendor/7zip/CPP/7zip/Sha1.mak +13 -0
  740. package/vendor/7zip/CPP/7zip/Sha256.mak +13 -0
  741. package/vendor/7zip/CPP/7zip/Sort.mak +6 -0
  742. package/vendor/7zip/CPP/7zip/SubBuild.mak +3 -0
  743. package/vendor/7zip/CPP/7zip/UI/Agent/Agent.cpp +2003 -0
  744. package/vendor/7zip/CPP/7zip/UI/Agent/Agent.h +365 -0
  745. package/vendor/7zip/CPP/7zip/UI/Agent/AgentOut.cpp +776 -0
  746. package/vendor/7zip/CPP/7zip/UI/Agent/AgentProxy.cpp +1098 -0
  747. package/vendor/7zip/CPP/7zip/UI/Agent/AgentProxy.h +198 -0
  748. package/vendor/7zip/CPP/7zip/UI/Agent/ArchiveFolder.cpp +57 -0
  749. package/vendor/7zip/CPP/7zip/UI/Agent/ArchiveFolderOpen.cpp +243 -0
  750. package/vendor/7zip/CPP/7zip/UI/Agent/ArchiveFolderOut.cpp +457 -0
  751. package/vendor/7zip/CPP/7zip/UI/Agent/IFolderArchive.h +123 -0
  752. package/vendor/7zip/CPP/7zip/UI/Agent/StdAfx.h +11 -0
  753. package/vendor/7zip/CPP/7zip/UI/Agent/UpdateCallbackAgent.cpp +208 -0
  754. package/vendor/7zip/CPP/7zip/UI/Agent/UpdateCallbackAgent.h +22 -0
  755. package/vendor/7zip/CPP/7zip/UI/Client7z/Client7z.cpp +1145 -0
  756. package/vendor/7zip/CPP/7zip/UI/Client7z/Client7z.dsp +331 -0
  757. package/vendor/7zip/CPP/7zip/UI/Client7z/Client7z.dsw +29 -0
  758. package/vendor/7zip/CPP/7zip/UI/Client7z/StdAfx.cpp +3 -0
  759. package/vendor/7zip/CPP/7zip/UI/Client7z/StdAfx.h +11 -0
  760. package/vendor/7zip/CPP/7zip/UI/Client7z/makefile +29 -0
  761. package/vendor/7zip/CPP/7zip/UI/Client7z/makefile.gcc +72 -0
  762. package/vendor/7zip/CPP/7zip/UI/Client7z/resource.rc +3 -0
  763. package/vendor/7zip/CPP/7zip/UI/Common/ArchiveCommandLine.cpp +1913 -0
  764. package/vendor/7zip/CPP/7zip/UI/Common/ArchiveCommandLine.h +170 -0
  765. package/vendor/7zip/CPP/7zip/UI/Common/ArchiveExtractCallback.cpp +3243 -0
  766. package/vendor/7zip/CPP/7zip/UI/Common/ArchiveExtractCallback.h +640 -0
  767. package/vendor/7zip/CPP/7zip/UI/Common/ArchiveName.cpp +176 -0
  768. package/vendor/7zip/CPP/7zip/UI/Common/ArchiveName.h +16 -0
  769. package/vendor/7zip/CPP/7zip/UI/Common/ArchiveOpenCallback.cpp +403 -0
  770. package/vendor/7zip/CPP/7zip/UI/Common/ArchiveOpenCallback.h +182 -0
  771. package/vendor/7zip/CPP/7zip/UI/Common/Bench.cpp +5036 -0
  772. package/vendor/7zip/CPP/7zip/UI/Common/Bench.h +121 -0
  773. package/vendor/7zip/CPP/7zip/UI/Common/CompressCall.cpp +343 -0
  774. package/vendor/7zip/CPP/7zip/UI/Common/CompressCall.h +28 -0
  775. package/vendor/7zip/CPP/7zip/UI/Common/CompressCall2.cpp +327 -0
  776. package/vendor/7zip/CPP/7zip/UI/Common/DefaultName.cpp +37 -0
  777. package/vendor/7zip/CPP/7zip/UI/Common/DefaultName.h +11 -0
  778. package/vendor/7zip/CPP/7zip/UI/Common/DirItem.h +407 -0
  779. package/vendor/7zip/CPP/7zip/UI/Common/EnumDirItems.cpp +1637 -0
  780. package/vendor/7zip/CPP/7zip/UI/Common/EnumDirItems.h +38 -0
  781. package/vendor/7zip/CPP/7zip/UI/Common/ExitCode.h +27 -0
  782. package/vendor/7zip/CPP/7zip/UI/Common/Extract.cpp +593 -0
  783. package/vendor/7zip/CPP/7zip/UI/Common/Extract.h +118 -0
  784. package/vendor/7zip/CPP/7zip/UI/Common/ExtractMode.h +44 -0
  785. package/vendor/7zip/CPP/7zip/UI/Common/ExtractingFilePath.cpp +299 -0
  786. package/vendor/7zip/CPP/7zip/UI/Common/ExtractingFilePath.h +31 -0
  787. package/vendor/7zip/CPP/7zip/UI/Common/HashCalc.cpp +2273 -0
  788. package/vendor/7zip/CPP/7zip/UI/Common/HashCalc.h +322 -0
  789. package/vendor/7zip/CPP/7zip/UI/Common/IFileExtractCallback.h +112 -0
  790. package/vendor/7zip/CPP/7zip/UI/Common/LoadCodecs.cpp +1354 -0
  791. package/vendor/7zip/CPP/7zip/UI/Common/LoadCodecs.h +482 -0
  792. package/vendor/7zip/CPP/7zip/UI/Common/OpenArchive.cpp +3690 -0
  793. package/vendor/7zip/CPP/7zip/UI/Common/OpenArchive.h +469 -0
  794. package/vendor/7zip/CPP/7zip/UI/Common/PropIDUtils.cpp +746 -0
  795. package/vendor/7zip/CPP/7zip/UI/Common/PropIDUtils.h +18 -0
  796. package/vendor/7zip/CPP/7zip/UI/Common/Property.h +14 -0
  797. package/vendor/7zip/CPP/7zip/UI/Common/SetProperties.cpp +88 -0
  798. package/vendor/7zip/CPP/7zip/UI/Common/SetProperties.h +10 -0
  799. package/vendor/7zip/CPP/7zip/UI/Common/SortUtils.cpp +25 -0
  800. package/vendor/7zip/CPP/7zip/UI/Common/SortUtils.h +10 -0
  801. package/vendor/7zip/CPP/7zip/UI/Common/StdAfx.h +11 -0
  802. package/vendor/7zip/CPP/7zip/UI/Common/TempFiles.cpp +20 -0
  803. package/vendor/7zip/CPP/7zip/UI/Common/TempFiles.h +19 -0
  804. package/vendor/7zip/CPP/7zip/UI/Common/Update.cpp +1931 -0
  805. package/vendor/7zip/CPP/7zip/UI/Common/Update.h +221 -0
  806. package/vendor/7zip/CPP/7zip/UI/Common/UpdateAction.cpp +64 -0
  807. package/vendor/7zip/CPP/7zip/UI/Common/UpdateAction.h +66 -0
  808. package/vendor/7zip/CPP/7zip/UI/Common/UpdateCallback.cpp +1078 -0
  809. package/vendor/7zip/CPP/7zip/UI/Common/UpdateCallback.h +197 -0
  810. package/vendor/7zip/CPP/7zip/UI/Common/UpdatePair.cpp +303 -0
  811. package/vendor/7zip/CPP/7zip/UI/Common/UpdatePair.h +27 -0
  812. package/vendor/7zip/CPP/7zip/UI/Common/UpdateProduce.cpp +75 -0
  813. package/vendor/7zip/CPP/7zip/UI/Common/UpdateProduce.h +60 -0
  814. package/vendor/7zip/CPP/7zip/UI/Common/WorkDir.cpp +84 -0
  815. package/vendor/7zip/CPP/7zip/UI/Common/WorkDir.h +30 -0
  816. package/vendor/7zip/CPP/7zip/UI/Common/ZipRegistry.cpp +599 -0
  817. package/vendor/7zip/CPP/7zip/UI/Common/ZipRegistry.h +212 -0
  818. package/vendor/7zip/CPP/7zip/UI/Console/BenchCon.cpp +41 -0
  819. package/vendor/7zip/CPP/7zip/UI/Console/BenchCon.h +14 -0
  820. package/vendor/7zip/CPP/7zip/UI/Console/Console.dsp +1052 -0
  821. package/vendor/7zip/CPP/7zip/UI/Console/Console.dsw +29 -0
  822. package/vendor/7zip/CPP/7zip/UI/Console/Console.mak +45 -0
  823. package/vendor/7zip/CPP/7zip/UI/Console/Console.manifest +16 -0
  824. package/vendor/7zip/CPP/7zip/UI/Console/ConsoleClose.cpp +98 -0
  825. package/vendor/7zip/CPP/7zip/UI/Console/ConsoleClose.h +39 -0
  826. package/vendor/7zip/CPP/7zip/UI/Console/ExtractCallbackConsole.cpp +954 -0
  827. package/vendor/7zip/CPP/7zip/UI/Console/ExtractCallbackConsole.h +211 -0
  828. package/vendor/7zip/CPP/7zip/UI/Console/HashCon.cpp +426 -0
  829. package/vendor/7zip/CPP/7zip/UI/Console/HashCon.h +58 -0
  830. package/vendor/7zip/CPP/7zip/UI/Console/List.cpp +1417 -0
  831. package/vendor/7zip/CPP/7zip/UI/Console/List.h +42 -0
  832. package/vendor/7zip/CPP/7zip/UI/Console/Main.cpp +1663 -0
  833. package/vendor/7zip/CPP/7zip/UI/Console/MainAr.cpp +235 -0
  834. package/vendor/7zip/CPP/7zip/UI/Console/OpenCallbackConsole.cpp +115 -0
  835. package/vendor/7zip/CPP/7zip/UI/Console/OpenCallbackConsole.h +73 -0
  836. package/vendor/7zip/CPP/7zip/UI/Console/PercentPrinter.cpp +186 -0
  837. package/vendor/7zip/CPP/7zip/UI/Console/PercentPrinter.h +66 -0
  838. package/vendor/7zip/CPP/7zip/UI/Console/StdAfx.cpp +3 -0
  839. package/vendor/7zip/CPP/7zip/UI/Console/StdAfx.h +11 -0
  840. package/vendor/7zip/CPP/7zip/UI/Console/UpdateCallbackConsole.cpp +1012 -0
  841. package/vendor/7zip/CPP/7zip/UI/Console/UpdateCallbackConsole.h +148 -0
  842. package/vendor/7zip/CPP/7zip/UI/Console/UserInputUtils.cpp +118 -0
  843. package/vendor/7zip/CPP/7zip/UI/Console/UserInputUtils.h +27 -0
  844. package/vendor/7zip/CPP/7zip/UI/Console/makefile +68 -0
  845. package/vendor/7zip/CPP/7zip/UI/Console/makefile.gcc +184 -0
  846. package/vendor/7zip/CPP/7zip/UI/Console/resource.rc +7 -0
  847. package/vendor/7zip/CPP/7zip/UI/Explorer/7-zip.dll.manifest +1 -0
  848. package/vendor/7zip/CPP/7zip/UI/Explorer/ContextMenu.cpp +1837 -0
  849. package/vendor/7zip/CPP/7zip/UI/Explorer/ContextMenu.h +173 -0
  850. package/vendor/7zip/CPP/7zip/UI/Explorer/ContextMenuFlags.h +27 -0
  851. package/vendor/7zip/CPP/7zip/UI/Explorer/DllExportsExplorer.cpp +268 -0
  852. package/vendor/7zip/CPP/7zip/UI/Explorer/Explorer.def +9 -0
  853. package/vendor/7zip/CPP/7zip/UI/Explorer/Explorer.dsp +620 -0
  854. package/vendor/7zip/CPP/7zip/UI/Explorer/Explorer.dsw +29 -0
  855. package/vendor/7zip/CPP/7zip/UI/Explorer/MenuLogo.bmp +0 -0
  856. package/vendor/7zip/CPP/7zip/UI/Explorer/MyExplorerCommand.h +217 -0
  857. package/vendor/7zip/CPP/7zip/UI/Explorer/MyMessages.cpp +43 -0
  858. package/vendor/7zip/CPP/7zip/UI/Explorer/MyMessages.h +16 -0
  859. package/vendor/7zip/CPP/7zip/UI/Explorer/RegistryContextMenu.cpp +225 -0
  860. package/vendor/7zip/CPP/7zip/UI/Explorer/RegistryContextMenu.h +13 -0
  861. package/vendor/7zip/CPP/7zip/UI/Explorer/StdAfx.cpp +3 -0
  862. package/vendor/7zip/CPP/7zip/UI/Explorer/StdAfx.h +6 -0
  863. package/vendor/7zip/CPP/7zip/UI/Explorer/makefile +76 -0
  864. package/vendor/7zip/CPP/7zip/UI/Explorer/resource.h +15 -0
  865. package/vendor/7zip/CPP/7zip/UI/Explorer/resource.rc +10 -0
  866. package/vendor/7zip/CPP/7zip/UI/Explorer/resource2.rc +19 -0
  867. package/vendor/7zip/CPP/7zip/UI/Far/ExtractEngine.cpp +274 -0
  868. package/vendor/7zip/CPP/7zip/UI/Far/ExtractEngine.h +43 -0
  869. package/vendor/7zip/CPP/7zip/UI/Far/Far.cpp +588 -0
  870. package/vendor/7zip/CPP/7zip/UI/Far/Far.def +35 -0
  871. package/vendor/7zip/CPP/7zip/UI/Far/Far.dsp +831 -0
  872. package/vendor/7zip/CPP/7zip/UI/Far/Far.dsw +29 -0
  873. package/vendor/7zip/CPP/7zip/UI/Far/FarPlugin.h +560 -0
  874. package/vendor/7zip/CPP/7zip/UI/Far/FarUtils.cpp +523 -0
  875. package/vendor/7zip/CPP/7zip/UI/Far/FarUtils.h +203 -0
  876. package/vendor/7zip/CPP/7zip/UI/Far/Messages.h +136 -0
  877. package/vendor/7zip/CPP/7zip/UI/Far/OverwriteDialogFar.cpp +145 -0
  878. package/vendor/7zip/CPP/7zip/UI/Far/OverwriteDialogFar.h +37 -0
  879. package/vendor/7zip/CPP/7zip/UI/Far/Plugin.cpp +937 -0
  880. package/vendor/7zip/CPP/7zip/UI/Far/Plugin.h +97 -0
  881. package/vendor/7zip/CPP/7zip/UI/Far/PluginCommon.cpp +50 -0
  882. package/vendor/7zip/CPP/7zip/UI/Far/PluginDelete.cpp +144 -0
  883. package/vendor/7zip/CPP/7zip/UI/Far/PluginRead.cpp +301 -0
  884. package/vendor/7zip/CPP/7zip/UI/Far/PluginWrite.cpp +840 -0
  885. package/vendor/7zip/CPP/7zip/UI/Far/ProgressBox.cpp +305 -0
  886. package/vendor/7zip/CPP/7zip/UI/Far/ProgressBox.h +85 -0
  887. package/vendor/7zip/CPP/7zip/UI/Far/StdAfx.cpp +3 -0
  888. package/vendor/7zip/CPP/7zip/UI/Far/StdAfx.h +11 -0
  889. package/vendor/7zip/CPP/7zip/UI/Far/UpdateCallbackFar.cpp +327 -0
  890. package/vendor/7zip/CPP/7zip/UI/Far/UpdateCallbackFar.h +58 -0
  891. package/vendor/7zip/CPP/7zip/UI/Far/makefile +105 -0
  892. package/vendor/7zip/CPP/7zip/UI/Far/resource.rc +3 -0
  893. package/vendor/7zip/CPP/7zip/UI/FileManager/7zFM.exe.manifest +23 -0
  894. package/vendor/7zip/CPP/7zip/UI/FileManager/7zipLogo.ico +0 -0
  895. package/vendor/7zip/CPP/7zip/UI/FileManager/AboutDialog.cpp +81 -0
  896. package/vendor/7zip/CPP/7zip/UI/FileManager/AboutDialog.h +19 -0
  897. package/vendor/7zip/CPP/7zip/UI/FileManager/AboutDialog.rc +26 -0
  898. package/vendor/7zip/CPP/7zip/UI/FileManager/AboutDialogRes.h +8 -0
  899. package/vendor/7zip/CPP/7zip/UI/FileManager/Add.bmp +0 -0
  900. package/vendor/7zip/CPP/7zip/UI/FileManager/Add2.bmp +0 -0
  901. package/vendor/7zip/CPP/7zip/UI/FileManager/AltStreamsFolder.cpp +865 -0
  902. package/vendor/7zip/CPP/7zip/UI/FileManager/AltStreamsFolder.h +92 -0
  903. package/vendor/7zip/CPP/7zip/UI/FileManager/App.cpp +1004 -0
  904. package/vendor/7zip/CPP/7zip/UI/FileManager/App.h +314 -0
  905. package/vendor/7zip/CPP/7zip/UI/FileManager/AppState.h +95 -0
  906. package/vendor/7zip/CPP/7zip/UI/FileManager/BrowseDialog.cpp +1132 -0
  907. package/vendor/7zip/CPP/7zip/UI/FileManager/BrowseDialog.h +32 -0
  908. package/vendor/7zip/CPP/7zip/UI/FileManager/BrowseDialog.rc +25 -0
  909. package/vendor/7zip/CPP/7zip/UI/FileManager/BrowseDialog2.cpp +1873 -0
  910. package/vendor/7zip/CPP/7zip/UI/FileManager/BrowseDialog2.h +10 -0
  911. package/vendor/7zip/CPP/7zip/UI/FileManager/BrowseDialog2.rc +32 -0
  912. package/vendor/7zip/CPP/7zip/UI/FileManager/BrowseDialog2Res.h +9 -0
  913. package/vendor/7zip/CPP/7zip/UI/FileManager/BrowseDialogRes.h +9 -0
  914. package/vendor/7zip/CPP/7zip/UI/FileManager/ClassDefs.cpp +12 -0
  915. package/vendor/7zip/CPP/7zip/UI/FileManager/ComboDialog.cpp +64 -0
  916. package/vendor/7zip/CPP/7zip/UI/FileManager/ComboDialog.h +28 -0
  917. package/vendor/7zip/CPP/7zip/UI/FileManager/ComboDialog.rc +16 -0
  918. package/vendor/7zip/CPP/7zip/UI/FileManager/ComboDialogRes.h +4 -0
  919. package/vendor/7zip/CPP/7zip/UI/FileManager/Copy.bmp +0 -0
  920. package/vendor/7zip/CPP/7zip/UI/FileManager/Copy2.bmp +0 -0
  921. package/vendor/7zip/CPP/7zip/UI/FileManager/CopyDialog.cpp +103 -0
  922. package/vendor/7zip/CPP/7zip/UI/FileManager/CopyDialog.h +31 -0
  923. package/vendor/7zip/CPP/7zip/UI/FileManager/CopyDialog.rc +20 -0
  924. package/vendor/7zip/CPP/7zip/UI/FileManager/CopyDialogRes.h +8 -0
  925. package/vendor/7zip/CPP/7zip/UI/FileManager/Delete.bmp +0 -0
  926. package/vendor/7zip/CPP/7zip/UI/FileManager/Delete2.bmp +0 -0
  927. package/vendor/7zip/CPP/7zip/UI/FileManager/DialogSize.h +16 -0
  928. package/vendor/7zip/CPP/7zip/UI/FileManager/EditDialog.cpp +57 -0
  929. package/vendor/7zip/CPP/7zip/UI/FileManager/EditDialog.h +25 -0
  930. package/vendor/7zip/CPP/7zip/UI/FileManager/EditDialog.rc +15 -0
  931. package/vendor/7zip/CPP/7zip/UI/FileManager/EditDialogRes.h +2 -0
  932. package/vendor/7zip/CPP/7zip/UI/FileManager/EditPage.cpp +159 -0
  933. package/vendor/7zip/CPP/7zip/UI/FileManager/EditPage.h +30 -0
  934. package/vendor/7zip/CPP/7zip/UI/FileManager/EditPage.rc +19 -0
  935. package/vendor/7zip/CPP/7zip/UI/FileManager/EditPage2.rc +14 -0
  936. package/vendor/7zip/CPP/7zip/UI/FileManager/EditPageRes.h +15 -0
  937. package/vendor/7zip/CPP/7zip/UI/FileManager/EnumFormatEtc.cpp +109 -0
  938. package/vendor/7zip/CPP/7zip/UI/FileManager/EnumFormatEtc.h +10 -0
  939. package/vendor/7zip/CPP/7zip/UI/FileManager/Extract.bmp +0 -0
  940. package/vendor/7zip/CPP/7zip/UI/FileManager/Extract2.bmp +0 -0
  941. package/vendor/7zip/CPP/7zip/UI/FileManager/ExtractCallback.cpp +1284 -0
  942. package/vendor/7zip/CPP/7zip/UI/FileManager/ExtractCallback.h +347 -0
  943. package/vendor/7zip/CPP/7zip/UI/FileManager/FM.cpp +1230 -0
  944. package/vendor/7zip/CPP/7zip/UI/FileManager/FM.dsp +1699 -0
  945. package/vendor/7zip/CPP/7zip/UI/FileManager/FM.dsw +29 -0
  946. package/vendor/7zip/CPP/7zip/UI/FileManager/FM.ico +0 -0
  947. package/vendor/7zip/CPP/7zip/UI/FileManager/FM.mak +102 -0
  948. package/vendor/7zip/CPP/7zip/UI/FileManager/FSDrives.cpp +512 -0
  949. package/vendor/7zip/CPP/7zip/UI/FileManager/FSDrives.h +52 -0
  950. package/vendor/7zip/CPP/7zip/UI/FileManager/FSFolder.cpp +1179 -0
  951. package/vendor/7zip/CPP/7zip/UI/FileManager/FSFolder.h +220 -0
  952. package/vendor/7zip/CPP/7zip/UI/FileManager/FSFolderCopy.cpp +871 -0
  953. package/vendor/7zip/CPP/7zip/UI/FileManager/FileFolderPluginOpen.cpp +394 -0
  954. package/vendor/7zip/CPP/7zip/UI/FileManager/FileFolderPluginOpen.h +27 -0
  955. package/vendor/7zip/CPP/7zip/UI/FileManager/FilePlugins.cpp +78 -0
  956. package/vendor/7zip/CPP/7zip/UI/FileManager/FilePlugins.h +33 -0
  957. package/vendor/7zip/CPP/7zip/UI/FileManager/FoldersPage.cpp +172 -0
  958. package/vendor/7zip/CPP/7zip/UI/FileManager/FoldersPage.h +32 -0
  959. package/vendor/7zip/CPP/7zip/UI/FileManager/FoldersPage.rc +23 -0
  960. package/vendor/7zip/CPP/7zip/UI/FileManager/FoldersPage2.rc +11 -0
  961. package/vendor/7zip/CPP/7zip/UI/FileManager/FoldersPageRes.h +12 -0
  962. package/vendor/7zip/CPP/7zip/UI/FileManager/FormatUtils.cpp +28 -0
  963. package/vendor/7zip/CPP/7zip/UI/FileManager/FormatUtils.h +14 -0
  964. package/vendor/7zip/CPP/7zip/UI/FileManager/HelpUtils.cpp +78 -0
  965. package/vendor/7zip/CPP/7zip/UI/FileManager/HelpUtils.h +10 -0
  966. package/vendor/7zip/CPP/7zip/UI/FileManager/IFolder.h +187 -0
  967. package/vendor/7zip/CPP/7zip/UI/FileManager/Info.bmp +0 -0
  968. package/vendor/7zip/CPP/7zip/UI/FileManager/Info2.bmp +0 -0
  969. package/vendor/7zip/CPP/7zip/UI/FileManager/LangPage.cpp +359 -0
  970. package/vendor/7zip/CPP/7zip/UI/FileManager/LangPage.h +36 -0
  971. package/vendor/7zip/CPP/7zip/UI/FileManager/LangPage.rc +40 -0
  972. package/vendor/7zip/CPP/7zip/UI/FileManager/LangPageRes.h +9 -0
  973. package/vendor/7zip/CPP/7zip/UI/FileManager/LangUtils.cpp +333 -0
  974. package/vendor/7zip/CPP/7zip/UI/FileManager/LangUtils.h +48 -0
  975. package/vendor/7zip/CPP/7zip/UI/FileManager/LinkDialog.cpp +402 -0
  976. package/vendor/7zip/CPP/7zip/UI/FileManager/LinkDialog.h +34 -0
  977. package/vendor/7zip/CPP/7zip/UI/FileManager/LinkDialog.rc +38 -0
  978. package/vendor/7zip/CPP/7zip/UI/FileManager/LinkDialogRes.h +22 -0
  979. package/vendor/7zip/CPP/7zip/UI/FileManager/ListViewDialog.cpp +321 -0
  980. package/vendor/7zip/CPP/7zip/UI/FileManager/ListViewDialog.h +46 -0
  981. package/vendor/7zip/CPP/7zip/UI/FileManager/ListViewDialog.rc +14 -0
  982. package/vendor/7zip/CPP/7zip/UI/FileManager/ListViewDialogRes.h +2 -0
  983. package/vendor/7zip/CPP/7zip/UI/FileManager/MemDialog.cpp +218 -0
  984. package/vendor/7zip/CPP/7zip/UI/FileManager/MemDialog.h +48 -0
  985. package/vendor/7zip/CPP/7zip/UI/FileManager/MemDialog.rc +49 -0
  986. package/vendor/7zip/CPP/7zip/UI/FileManager/MemDialogRes.h +13 -0
  987. package/vendor/7zip/CPP/7zip/UI/FileManager/MenuPage.cpp +439 -0
  988. package/vendor/7zip/CPP/7zip/UI/FileManager/MenuPage.h +57 -0
  989. package/vendor/7zip/CPP/7zip/UI/FileManager/MenuPage.rc +24 -0
  990. package/vendor/7zip/CPP/7zip/UI/FileManager/MenuPage2.rc +28 -0
  991. package/vendor/7zip/CPP/7zip/UI/FileManager/MenuPageRes.h +15 -0
  992. package/vendor/7zip/CPP/7zip/UI/FileManager/MessagesDialog.cpp +76 -0
  993. package/vendor/7zip/CPP/7zip/UI/FileManager/MessagesDialog.h +25 -0
  994. package/vendor/7zip/CPP/7zip/UI/FileManager/MessagesDialog.rc +14 -0
  995. package/vendor/7zip/CPP/7zip/UI/FileManager/MessagesDialogRes.h +3 -0
  996. package/vendor/7zip/CPP/7zip/UI/FileManager/Move.bmp +0 -0
  997. package/vendor/7zip/CPP/7zip/UI/FileManager/Move2.bmp +0 -0
  998. package/vendor/7zip/CPP/7zip/UI/FileManager/MyCom2.h +46 -0
  999. package/vendor/7zip/CPP/7zip/UI/FileManager/MyLoadMenu.cpp +964 -0
  1000. package/vendor/7zip/CPP/7zip/UI/FileManager/MyLoadMenu.h +40 -0
  1001. package/vendor/7zip/CPP/7zip/UI/FileManager/MyWindowsNew.h +119 -0
  1002. package/vendor/7zip/CPP/7zip/UI/FileManager/NetFolder.cpp +276 -0
  1003. package/vendor/7zip/CPP/7zip/UI/FileManager/NetFolder.h +36 -0
  1004. package/vendor/7zip/CPP/7zip/UI/FileManager/OpenCallback.cpp +86 -0
  1005. package/vendor/7zip/CPP/7zip/UI/FileManager/OpenCallback.h +69 -0
  1006. package/vendor/7zip/CPP/7zip/UI/FileManager/OptionsDialog.cpp +89 -0
  1007. package/vendor/7zip/CPP/7zip/UI/FileManager/OverwriteDialog.cpp +288 -0
  1008. package/vendor/7zip/CPP/7zip/UI/FileManager/OverwriteDialog.h +89 -0
  1009. package/vendor/7zip/CPP/7zip/UI/FileManager/OverwriteDialog.rc +93 -0
  1010. package/vendor/7zip/CPP/7zip/UI/FileManager/OverwriteDialogRes.h +19 -0
  1011. package/vendor/7zip/CPP/7zip/UI/FileManager/Panel.cpp +1177 -0
  1012. package/vendor/7zip/CPP/7zip/UI/FileManager/Panel.h +1020 -0
  1013. package/vendor/7zip/CPP/7zip/UI/FileManager/PanelCopy.cpp +477 -0
  1014. package/vendor/7zip/CPP/7zip/UI/FileManager/PanelCrc.cpp +422 -0
  1015. package/vendor/7zip/CPP/7zip/UI/FileManager/PanelDrag.cpp +3006 -0
  1016. package/vendor/7zip/CPP/7zip/UI/FileManager/PanelFolderChange.cpp +1122 -0
  1017. package/vendor/7zip/CPP/7zip/UI/FileManager/PanelItemOpen.cpp +1836 -0
  1018. package/vendor/7zip/CPP/7zip/UI/FileManager/PanelItems.cpp +1476 -0
  1019. package/vendor/7zip/CPP/7zip/UI/FileManager/PanelKey.cpp +357 -0
  1020. package/vendor/7zip/CPP/7zip/UI/FileManager/PanelListNotify.cpp +838 -0
  1021. package/vendor/7zip/CPP/7zip/UI/FileManager/PanelMenu.cpp +1160 -0
  1022. package/vendor/7zip/CPP/7zip/UI/FileManager/PanelOperations.cpp +533 -0
  1023. package/vendor/7zip/CPP/7zip/UI/FileManager/PanelSelect.cpp +317 -0
  1024. package/vendor/7zip/CPP/7zip/UI/FileManager/PanelSort.cpp +288 -0
  1025. package/vendor/7zip/CPP/7zip/UI/FileManager/PanelSplitFile.cpp +562 -0
  1026. package/vendor/7zip/CPP/7zip/UI/FileManager/PasswordDialog.cpp +58 -0
  1027. package/vendor/7zip/CPP/7zip/UI/FileManager/PasswordDialog.h +28 -0
  1028. package/vendor/7zip/CPP/7zip/UI/FileManager/PasswordDialog.rc +18 -0
  1029. package/vendor/7zip/CPP/7zip/UI/FileManager/PasswordDialogRes.h +5 -0
  1030. package/vendor/7zip/CPP/7zip/UI/FileManager/PluginInterface.h +32 -0
  1031. package/vendor/7zip/CPP/7zip/UI/FileManager/PluginLoader.h +33 -0
  1032. package/vendor/7zip/CPP/7zip/UI/FileManager/ProgramLocation.cpp +3 -0
  1033. package/vendor/7zip/CPP/7zip/UI/FileManager/ProgramLocation.h +6 -0
  1034. package/vendor/7zip/CPP/7zip/UI/FileManager/ProgressDialog.cpp +201 -0
  1035. package/vendor/7zip/CPP/7zip/UI/FileManager/ProgressDialog.h +171 -0
  1036. package/vendor/7zip/CPP/7zip/UI/FileManager/ProgressDialog.rc +12 -0
  1037. package/vendor/7zip/CPP/7zip/UI/FileManager/ProgressDialog2.cpp +1484 -0
  1038. package/vendor/7zip/CPP/7zip/UI/FileManager/ProgressDialog2.h +355 -0
  1039. package/vendor/7zip/CPP/7zip/UI/FileManager/ProgressDialog2.rc +40 -0
  1040. package/vendor/7zip/CPP/7zip/UI/FileManager/ProgressDialog2Res.h +49 -0
  1041. package/vendor/7zip/CPP/7zip/UI/FileManager/ProgressDialog2a.rc +85 -0
  1042. package/vendor/7zip/CPP/7zip/UI/FileManager/ProgressDialogRes.h +3 -0
  1043. package/vendor/7zip/CPP/7zip/UI/FileManager/PropertyName.cpp +23 -0
  1044. package/vendor/7zip/CPP/7zip/UI/FileManager/PropertyName.h +10 -0
  1045. package/vendor/7zip/CPP/7zip/UI/FileManager/PropertyName.rc +109 -0
  1046. package/vendor/7zip/CPP/7zip/UI/FileManager/PropertyNameRes.h +104 -0
  1047. package/vendor/7zip/CPP/7zip/UI/FileManager/RegistryAssociations.cpp +167 -0
  1048. package/vendor/7zip/CPP/7zip/UI/FileManager/RegistryAssociations.h +31 -0
  1049. package/vendor/7zip/CPP/7zip/UI/FileManager/RegistryPlugins.cpp +145 -0
  1050. package/vendor/7zip/CPP/7zip/UI/FileManager/RegistryPlugins.h +29 -0
  1051. package/vendor/7zip/CPP/7zip/UI/FileManager/RegistryUtils.cpp +194 -0
  1052. package/vendor/7zip/CPP/7zip/UI/FileManager/RegistryUtils.h +50 -0
  1053. package/vendor/7zip/CPP/7zip/UI/FileManager/RootFolder.cpp +342 -0
  1054. package/vendor/7zip/CPP/7zip/UI/FileManager/RootFolder.h +24 -0
  1055. package/vendor/7zip/CPP/7zip/UI/FileManager/SettingsPage.cpp +453 -0
  1056. package/vendor/7zip/CPP/7zip/UI/FileManager/SettingsPage.h +37 -0
  1057. package/vendor/7zip/CPP/7zip/UI/FileManager/SettingsPage.rc +22 -0
  1058. package/vendor/7zip/CPP/7zip/UI/FileManager/SettingsPage2.rc +37 -0
  1059. package/vendor/7zip/CPP/7zip/UI/FileManager/SettingsPageRes.h +23 -0
  1060. package/vendor/7zip/CPP/7zip/UI/FileManager/SplitDialog.cpp +114 -0
  1061. package/vendor/7zip/CPP/7zip/UI/FileManager/SplitDialog.h +28 -0
  1062. package/vendor/7zip/CPP/7zip/UI/FileManager/SplitDialog.rc +16 -0
  1063. package/vendor/7zip/CPP/7zip/UI/FileManager/SplitDialogRes.h +8 -0
  1064. package/vendor/7zip/CPP/7zip/UI/FileManager/SplitUtils.cpp +96 -0
  1065. package/vendor/7zip/CPP/7zip/UI/FileManager/SplitUtils.h +15 -0
  1066. package/vendor/7zip/CPP/7zip/UI/FileManager/StdAfx.cpp +3 -0
  1067. package/vendor/7zip/CPP/7zip/UI/FileManager/StdAfx.h +67 -0
  1068. package/vendor/7zip/CPP/7zip/UI/FileManager/StringUtils.cpp +39 -0
  1069. package/vendor/7zip/CPP/7zip/UI/FileManager/StringUtils.h +11 -0
  1070. package/vendor/7zip/CPP/7zip/UI/FileManager/SysIconUtils.cpp +352 -0
  1071. package/vendor/7zip/CPP/7zip/UI/FileManager/SysIconUtils.h +65 -0
  1072. package/vendor/7zip/CPP/7zip/UI/FileManager/SystemPage.cpp +472 -0
  1073. package/vendor/7zip/CPP/7zip/UI/FileManager/SystemPage.h +126 -0
  1074. package/vendor/7zip/CPP/7zip/UI/FileManager/SystemPage.rc +43 -0
  1075. package/vendor/7zip/CPP/7zip/UI/FileManager/SystemPageRes.h +9 -0
  1076. package/vendor/7zip/CPP/7zip/UI/FileManager/Test.bmp +0 -0
  1077. package/vendor/7zip/CPP/7zip/UI/FileManager/Test2.bmp +0 -0
  1078. package/vendor/7zip/CPP/7zip/UI/FileManager/TextPairs.cpp +193 -0
  1079. package/vendor/7zip/CPP/7zip/UI/FileManager/TextPairs.h +32 -0
  1080. package/vendor/7zip/CPP/7zip/UI/FileManager/UpdateCallback100.cpp +147 -0
  1081. package/vendor/7zip/CPP/7zip/UI/FileManager/UpdateCallback100.h +49 -0
  1082. package/vendor/7zip/CPP/7zip/UI/FileManager/VerCtrl.cpp +428 -0
  1083. package/vendor/7zip/CPP/7zip/UI/FileManager/ViewSettings.cpp +315 -0
  1084. package/vendor/7zip/CPP/7zip/UI/FileManager/ViewSettings.h +115 -0
  1085. package/vendor/7zip/CPP/7zip/UI/FileManager/makefile +110 -0
  1086. package/vendor/7zip/CPP/7zip/UI/FileManager/resource.h +199 -0
  1087. package/vendor/7zip/CPP/7zip/UI/FileManager/resource.rc +296 -0
  1088. package/vendor/7zip/CPP/7zip/UI/FileManager/resourceGui.h +25 -0
  1089. package/vendor/7zip/CPP/7zip/UI/FileManager/resourceGui.rc +30 -0
  1090. package/vendor/7zip/CPP/7zip/UI/GUI/7zG.exe.manifest +23 -0
  1091. package/vendor/7zip/CPP/7zip/UI/GUI/BenchmarkDialog.cpp +1921 -0
  1092. package/vendor/7zip/CPP/7zip/UI/GUI/BenchmarkDialog.h +15 -0
  1093. package/vendor/7zip/CPP/7zip/UI/GUI/BenchmarkDialog.rc +288 -0
  1094. package/vendor/7zip/CPP/7zip/UI/GUI/BenchmarkDialogRes.h +79 -0
  1095. package/vendor/7zip/CPP/7zip/UI/GUI/CompressDialog.cpp +3821 -0
  1096. package/vendor/7zip/CPP/7zip/UI/GUI/CompressDialog.h +483 -0
  1097. package/vendor/7zip/CPP/7zip/UI/GUI/CompressDialog.rc +233 -0
  1098. package/vendor/7zip/CPP/7zip/UI/GUI/CompressDialogRes.h +125 -0
  1099. package/vendor/7zip/CPP/7zip/UI/GUI/CompressOptionsDialog.rc +79 -0
  1100. package/vendor/7zip/CPP/7zip/UI/GUI/Extract.rc +59 -0
  1101. package/vendor/7zip/CPP/7zip/UI/GUI/ExtractDialog.cpp +420 -0
  1102. package/vendor/7zip/CPP/7zip/UI/GUI/ExtractDialog.h +113 -0
  1103. package/vendor/7zip/CPP/7zip/UI/GUI/ExtractDialog.rc +98 -0
  1104. package/vendor/7zip/CPP/7zip/UI/GUI/ExtractDialogRes.h +24 -0
  1105. package/vendor/7zip/CPP/7zip/UI/GUI/ExtractGUI.cpp +297 -0
  1106. package/vendor/7zip/CPP/7zip/UI/GUI/ExtractGUI.h +39 -0
  1107. package/vendor/7zip/CPP/7zip/UI/GUI/ExtractRes.h +51 -0
  1108. package/vendor/7zip/CPP/7zip/UI/GUI/FM.ico +0 -0
  1109. package/vendor/7zip/CPP/7zip/UI/GUI/GUI.cpp +502 -0
  1110. package/vendor/7zip/CPP/7zip/UI/GUI/GUI.dsp +1275 -0
  1111. package/vendor/7zip/CPP/7zip/UI/GUI/GUI.dsw +29 -0
  1112. package/vendor/7zip/CPP/7zip/UI/GUI/HashGUI.cpp +341 -0
  1113. package/vendor/7zip/CPP/7zip/UI/GUI/HashGUI.h +27 -0
  1114. package/vendor/7zip/CPP/7zip/UI/GUI/StdAfx.cpp +3 -0
  1115. package/vendor/7zip/CPP/7zip/UI/GUI/StdAfx.h +6 -0
  1116. package/vendor/7zip/CPP/7zip/UI/GUI/UpdateCallbackGUI.cpp +295 -0
  1117. package/vendor/7zip/CPP/7zip/UI/GUI/UpdateCallbackGUI.h +31 -0
  1118. package/vendor/7zip/CPP/7zip/UI/GUI/UpdateCallbackGUI2.cpp +130 -0
  1119. package/vendor/7zip/CPP/7zip/UI/GUI/UpdateCallbackGUI2.h +53 -0
  1120. package/vendor/7zip/CPP/7zip/UI/GUI/UpdateGUI.cpp +605 -0
  1121. package/vendor/7zip/CPP/7zip/UI/GUI/UpdateGUI.h +33 -0
  1122. package/vendor/7zip/CPP/7zip/UI/GUI/makefile +148 -0
  1123. package/vendor/7zip/CPP/7zip/UI/GUI/resource.rc +26 -0
  1124. package/vendor/7zip/CPP/7zip/UI/GUI/resource2.h +2 -0
  1125. package/vendor/7zip/CPP/7zip/UI/GUI/resource2.rc +10 -0
  1126. package/vendor/7zip/CPP/7zip/UI/GUI/resource3.h +10 -0
  1127. package/vendor/7zip/CPP/7zip/UI/GUI/resource3.rc +15 -0
  1128. package/vendor/7zip/CPP/7zip/UI/makefile +12 -0
  1129. package/vendor/7zip/CPP/7zip/cmpl_clang.mak +3 -0
  1130. package/vendor/7zip/CPP/7zip/cmpl_clang_arm64.mak +3 -0
  1131. package/vendor/7zip/CPP/7zip/cmpl_clang_x64.mak +3 -0
  1132. package/vendor/7zip/CPP/7zip/cmpl_clang_x86.mak +3 -0
  1133. package/vendor/7zip/CPP/7zip/cmpl_gcc.mak +3 -0
  1134. package/vendor/7zip/CPP/7zip/cmpl_gcc_arm.mak +3 -0
  1135. package/vendor/7zip/CPP/7zip/cmpl_gcc_arm64.mak +3 -0
  1136. package/vendor/7zip/CPP/7zip/cmpl_gcc_x64.mak +3 -0
  1137. package/vendor/7zip/CPP/7zip/cmpl_gcc_x86.mak +3 -0
  1138. package/vendor/7zip/CPP/7zip/cmpl_mac_arm64.mak +3 -0
  1139. package/vendor/7zip/CPP/7zip/cmpl_mac_x64.mak +3 -0
  1140. package/vendor/7zip/CPP/7zip/makefile +10 -0
  1141. package/vendor/7zip/CPP/7zip/var_clang.mak +11 -0
  1142. package/vendor/7zip/CPP/7zip/var_clang_arm64.mak +19 -0
  1143. package/vendor/7zip/CPP/7zip/var_clang_x64.mak +11 -0
  1144. package/vendor/7zip/CPP/7zip/var_clang_x86.mak +11 -0
  1145. package/vendor/7zip/CPP/7zip/var_gcc.mak +12 -0
  1146. package/vendor/7zip/CPP/7zip/var_gcc_arm.mak +34 -0
  1147. package/vendor/7zip/CPP/7zip/var_gcc_arm64.mak +12 -0
  1148. package/vendor/7zip/CPP/7zip/var_gcc_x64.mak +11 -0
  1149. package/vendor/7zip/CPP/7zip/var_gcc_x86.mak +10 -0
  1150. package/vendor/7zip/CPP/7zip/var_mac_arm64.mak +13 -0
  1151. package/vendor/7zip/CPP/7zip/var_mac_x64.mak +13 -0
  1152. package/vendor/7zip/CPP/7zip/warn_clang.mak +3 -0
  1153. package/vendor/7zip/CPP/7zip/warn_clang_mac.mak +9 -0
  1154. package/vendor/7zip/CPP/7zip/warn_gcc.mak +55 -0
  1155. package/vendor/7zip/CPP/Build.mak +259 -0
  1156. package/vendor/7zip/CPP/Common/AutoPtr.h +46 -0
  1157. package/vendor/7zip/CPP/Common/CRC.cpp +7 -0
  1158. package/vendor/7zip/CPP/Common/C_FileIO.cpp +3 -0
  1159. package/vendor/7zip/CPP/Common/C_FileIO.h +6 -0
  1160. package/vendor/7zip/CPP/Common/CksumReg.cpp +55 -0
  1161. package/vendor/7zip/CPP/Common/ComTry.h +21 -0
  1162. package/vendor/7zip/CPP/Common/CommandLineParser.cpp +231 -0
  1163. package/vendor/7zip/CPP/Common/CommandLineParser.h +63 -0
  1164. package/vendor/7zip/CPP/Common/Common.h +28 -0
  1165. package/vendor/7zip/CPP/Common/Common0.h +342 -0
  1166. package/vendor/7zip/CPP/Common/CrcReg.cpp +77 -0
  1167. package/vendor/7zip/CPP/Common/Defs.h +16 -0
  1168. package/vendor/7zip/CPP/Common/DynLimBuf.cpp +93 -0
  1169. package/vendor/7zip/CPP/Common/DynLimBuf.h +41 -0
  1170. package/vendor/7zip/CPP/Common/DynamicBuffer.h +76 -0
  1171. package/vendor/7zip/CPP/Common/IntToString.cpp +215 -0
  1172. package/vendor/7zip/CPP/Common/IntToString.h +54 -0
  1173. package/vendor/7zip/CPP/Common/Lang.cpp +173 -0
  1174. package/vendor/7zip/CPP/Common/Lang.h +30 -0
  1175. package/vendor/7zip/CPP/Common/ListFileUtils.cpp +150 -0
  1176. package/vendor/7zip/CPP/Common/ListFileUtils.h +18 -0
  1177. package/vendor/7zip/CPP/Common/LzFindPrepare.cpp +7 -0
  1178. package/vendor/7zip/CPP/Common/Md5Reg.cpp +44 -0
  1179. package/vendor/7zip/CPP/Common/MyBuffer.h +343 -0
  1180. package/vendor/7zip/CPP/Common/MyBuffer2.h +185 -0
  1181. package/vendor/7zip/CPP/Common/MyCom.h +693 -0
  1182. package/vendor/7zip/CPP/Common/MyException.h +14 -0
  1183. package/vendor/7zip/CPP/Common/MyGuidDef.h +63 -0
  1184. package/vendor/7zip/CPP/Common/MyInitGuid.h +57 -0
  1185. package/vendor/7zip/CPP/Common/MyLinux.h +75 -0
  1186. package/vendor/7zip/CPP/Common/MyMap.cpp +140 -0
  1187. package/vendor/7zip/CPP/Common/MyMap.h +28 -0
  1188. package/vendor/7zip/CPP/Common/MyString.cpp +1842 -0
  1189. package/vendor/7zip/CPP/Common/MyString.h +1079 -0
  1190. package/vendor/7zip/CPP/Common/MyTypes.h +38 -0
  1191. package/vendor/7zip/CPP/Common/MyUnknown.h +8 -0
  1192. package/vendor/7zip/CPP/Common/MyVector.cpp +3 -0
  1193. package/vendor/7zip/CPP/Common/MyVector.h +772 -0
  1194. package/vendor/7zip/CPP/Common/MyWindows.cpp +292 -0
  1195. package/vendor/7zip/CPP/Common/MyWindows.h +325 -0
  1196. package/vendor/7zip/CPP/Common/MyXml.cpp +349 -0
  1197. package/vendor/7zip/CPP/Common/MyXml.h +45 -0
  1198. package/vendor/7zip/CPP/Common/NewHandler.cpp +340 -0
  1199. package/vendor/7zip/CPP/Common/NewHandler.h +121 -0
  1200. package/vendor/7zip/CPP/Common/Random.cpp +28 -0
  1201. package/vendor/7zip/CPP/Common/Random.h +14 -0
  1202. package/vendor/7zip/CPP/Common/Sha1Prepare.cpp +7 -0
  1203. package/vendor/7zip/CPP/Common/Sha1Reg.cpp +67 -0
  1204. package/vendor/7zip/CPP/Common/Sha256Prepare.cpp +7 -0
  1205. package/vendor/7zip/CPP/Common/Sha256Reg.cpp +67 -0
  1206. package/vendor/7zip/CPP/Common/Sha3Reg.cpp +76 -0
  1207. package/vendor/7zip/CPP/Common/Sha512Prepare.cpp +7 -0
  1208. package/vendor/7zip/CPP/Common/Sha512Reg.cpp +83 -0
  1209. package/vendor/7zip/CPP/Common/StdAfx.h +8 -0
  1210. package/vendor/7zip/CPP/Common/StdInStream.cpp +98 -0
  1211. package/vendor/7zip/CPP/Common/StdInStream.h +46 -0
  1212. package/vendor/7zip/CPP/Common/StdOutStream.cpp +271 -0
  1213. package/vendor/7zip/CPP/Common/StdOutStream.h +87 -0
  1214. package/vendor/7zip/CPP/Common/StringConvert.cpp +762 -0
  1215. package/vendor/7zip/CPP/Common/StringConvert.h +110 -0
  1216. package/vendor/7zip/CPP/Common/StringToInt.cpp +154 -0
  1217. package/vendor/7zip/CPP/Common/StringToInt.h +38 -0
  1218. package/vendor/7zip/CPP/Common/TextConfig.cpp +123 -0
  1219. package/vendor/7zip/CPP/Common/TextConfig.h +19 -0
  1220. package/vendor/7zip/CPP/Common/UTFConvert.cpp +863 -0
  1221. package/vendor/7zip/CPP/Common/UTFConvert.h +384 -0
  1222. package/vendor/7zip/CPP/Common/Wildcard.cpp +789 -0
  1223. package/vendor/7zip/CPP/Common/Wildcard.h +231 -0
  1224. package/vendor/7zip/CPP/Common/Xxh64Reg.cpp +97 -0
  1225. package/vendor/7zip/CPP/Common/XzCrc64Init.cpp +7 -0
  1226. package/vendor/7zip/CPP/Common/XzCrc64Reg.cpp +39 -0
  1227. package/vendor/7zip/CPP/Windows/COM.cpp +41 -0
  1228. package/vendor/7zip/CPP/Windows/COM.h +86 -0
  1229. package/vendor/7zip/CPP/Windows/Clipboard.cpp +130 -0
  1230. package/vendor/7zip/CPP/Windows/Clipboard.h +28 -0
  1231. package/vendor/7zip/CPP/Windows/CommonDialog.cpp +269 -0
  1232. package/vendor/7zip/CPP/Windows/CommonDialog.h +43 -0
  1233. package/vendor/7zip/CPP/Windows/Console.cpp +10 -0
  1234. package/vendor/7zip/CPP/Windows/Console.h +52 -0
  1235. package/vendor/7zip/CPP/Windows/Control/ComboBox.cpp +75 -0
  1236. package/vendor/7zip/CPP/Windows/Control/ComboBox.h +79 -0
  1237. package/vendor/7zip/CPP/Windows/Control/CommandBar.h +52 -0
  1238. package/vendor/7zip/CPP/Windows/Control/Dialog.cpp +446 -0
  1239. package/vendor/7zip/CPP/Windows/Control/Dialog.h +213 -0
  1240. package/vendor/7zip/CPP/Windows/Control/Edit.h +19 -0
  1241. package/vendor/7zip/CPP/Windows/Control/ImageList.cpp +10 -0
  1242. package/vendor/7zip/CPP/Windows/Control/ImageList.h +87 -0
  1243. package/vendor/7zip/CPP/Windows/Control/ListView.cpp +162 -0
  1244. package/vendor/7zip/CPP/Windows/Control/ListView.h +156 -0
  1245. package/vendor/7zip/CPP/Windows/Control/ProgressBar.h +35 -0
  1246. package/vendor/7zip/CPP/Windows/Control/PropertyPage.cpp +165 -0
  1247. package/vendor/7zip/CPP/Windows/Control/PropertyPage.h +50 -0
  1248. package/vendor/7zip/CPP/Windows/Control/ReBar.h +34 -0
  1249. package/vendor/7zip/CPP/Windows/Control/Static.h +28 -0
  1250. package/vendor/7zip/CPP/Windows/Control/StatusBar.h +42 -0
  1251. package/vendor/7zip/CPP/Windows/Control/StdAfx.h +11 -0
  1252. package/vendor/7zip/CPP/Windows/Control/ToolBar.h +43 -0
  1253. package/vendor/7zip/CPP/Windows/Control/Trackbar.h +27 -0
  1254. package/vendor/7zip/CPP/Windows/Control/Window2.cpp +202 -0
  1255. package/vendor/7zip/CPP/Windows/Control/Window2.h +53 -0
  1256. package/vendor/7zip/CPP/Windows/DLL.cpp +178 -0
  1257. package/vendor/7zip/CPP/Windows/DLL.h +103 -0
  1258. package/vendor/7zip/CPP/Windows/ErrorMsg.cpp +133 -0
  1259. package/vendor/7zip/CPP/Windows/ErrorMsg.h +16 -0
  1260. package/vendor/7zip/CPP/Windows/FileDir.cpp +1388 -0
  1261. package/vendor/7zip/CPP/Windows/FileDir.h +173 -0
  1262. package/vendor/7zip/CPP/Windows/FileFind.cpp +1458 -0
  1263. package/vendor/7zip/CPP/Windows/FileFind.h +345 -0
  1264. package/vendor/7zip/CPP/Windows/FileIO.cpp +1188 -0
  1265. package/vendor/7zip/CPP/Windows/FileIO.h +508 -0
  1266. package/vendor/7zip/CPP/Windows/FileLink.cpp +697 -0
  1267. package/vendor/7zip/CPP/Windows/FileMapping.cpp +12 -0
  1268. package/vendor/7zip/CPP/Windows/FileMapping.h +66 -0
  1269. package/vendor/7zip/CPP/Windows/FileName.cpp +911 -0
  1270. package/vendor/7zip/CPP/Windows/FileName.h +142 -0
  1271. package/vendor/7zip/CPP/Windows/FileSystem.cpp +187 -0
  1272. package/vendor/7zip/CPP/Windows/FileSystem.h +31 -0
  1273. package/vendor/7zip/CPP/Windows/Handle.h +39 -0
  1274. package/vendor/7zip/CPP/Windows/MemoryGlobal.cpp +36 -0
  1275. package/vendor/7zip/CPP/Windows/MemoryGlobal.h +55 -0
  1276. package/vendor/7zip/CPP/Windows/MemoryLock.cpp +127 -0
  1277. package/vendor/7zip/CPP/Windows/MemoryLock.h +40 -0
  1278. package/vendor/7zip/CPP/Windows/Menu.cpp +265 -0
  1279. package/vendor/7zip/CPP/Windows/Menu.h +170 -0
  1280. package/vendor/7zip/CPP/Windows/NationalTime.cpp +37 -0
  1281. package/vendor/7zip/CPP/Windows/NationalTime.h +20 -0
  1282. package/vendor/7zip/CPP/Windows/Net.cpp +398 -0
  1283. package/vendor/7zip/CPP/Windows/Net.h +87 -0
  1284. package/vendor/7zip/CPP/Windows/NtCheck.h +58 -0
  1285. package/vendor/7zip/CPP/Windows/ProcessMessages.cpp +22 -0
  1286. package/vendor/7zip/CPP/Windows/ProcessMessages.h +12 -0
  1287. package/vendor/7zip/CPP/Windows/ProcessUtils.cpp +102 -0
  1288. package/vendor/7zip/CPP/Windows/ProcessUtils.h +138 -0
  1289. package/vendor/7zip/CPP/Windows/PropVariant.cpp +393 -0
  1290. package/vendor/7zip/CPP/Windows/PropVariant.h +173 -0
  1291. package/vendor/7zip/CPP/Windows/PropVariantConv.cpp +274 -0
  1292. package/vendor/7zip/CPP/Windows/PropVariantConv.h +47 -0
  1293. package/vendor/7zip/CPP/Windows/PropVariantUtils.cpp +161 -0
  1294. package/vendor/7zip/CPP/Windows/PropVariantUtils.h +34 -0
  1295. package/vendor/7zip/CPP/Windows/Registry.cpp +474 -0
  1296. package/vendor/7zip/CPP/Windows/Registry.h +96 -0
  1297. package/vendor/7zip/CPP/Windows/ResourceString.cpp +103 -0
  1298. package/vendor/7zip/CPP/Windows/ResourceString.h +17 -0
  1299. package/vendor/7zip/CPP/Windows/SecurityUtils.cpp +186 -0
  1300. package/vendor/7zip/CPP/Windows/SecurityUtils.h +154 -0
  1301. package/vendor/7zip/CPP/Windows/Shell.cpp +839 -0
  1302. package/vendor/7zip/CPP/Windows/Shell.h +129 -0
  1303. package/vendor/7zip/CPP/Windows/StdAfx.h +11 -0
  1304. package/vendor/7zip/CPP/Windows/Synchronization.cpp +87 -0
  1305. package/vendor/7zip/CPP/Windows/Synchronization.h +386 -0
  1306. package/vendor/7zip/CPP/Windows/System.cpp +423 -0
  1307. package/vendor/7zip/CPP/Windows/System.h +209 -0
  1308. package/vendor/7zip/CPP/Windows/SystemInfo.cpp +1312 -0
  1309. package/vendor/7zip/CPP/Windows/SystemInfo.h +19 -0
  1310. package/vendor/7zip/CPP/Windows/Thread.h +46 -0
  1311. package/vendor/7zip/CPP/Windows/TimeUtils.cpp +467 -0
  1312. package/vendor/7zip/CPP/Windows/TimeUtils.h +154 -0
  1313. package/vendor/7zip/CPP/Windows/WinDefs.h +17 -0
  1314. package/vendor/7zip/CPP/Windows/Window.cpp +179 -0
  1315. package/vendor/7zip/CPP/Windows/Window.h +363 -0
  1316. package/vendor/7zip/DOC/7zC.txt +187 -0
  1317. package/vendor/7zip/DOC/7zFormat.txt +469 -0
  1318. package/vendor/7zip/DOC/7zip.hhp +84 -0
  1319. package/vendor/7zip/DOC/7zip.wxs +403 -0
  1320. package/vendor/7zip/DOC/License.txt +151 -0
  1321. package/vendor/7zip/DOC/Methods.txt +177 -0
  1322. package/vendor/7zip/DOC/copying.txt +502 -0
  1323. package/vendor/7zip/DOC/lzma.txt +345 -0
  1324. package/vendor/7zip/DOC/readme.txt +299 -0
  1325. package/vendor/7zip/DOC/src-history.txt +884 -0
  1326. package/vendor/7zip/DOC/unRarLicense.txt +41 -0
  1327. package/vendor/7zip/README.md +2 -0
@@ -0,0 +1,2273 @@
1
+ // HashCalc.cpp
2
+
3
+ #include "StdAfx.h"
4
+
5
+ #include "../../../../C/Alloc.h"
6
+ #include "../../../../C/CpuArch.h"
7
+
8
+ #include "../../../Common/DynLimBuf.h"
9
+ #include "../../../Common/IntToString.h"
10
+ #include "../../../Common/StringToInt.h"
11
+
12
+ #include "../../Common/FileStreams.h"
13
+ #include "../../Common/ProgressUtils.h"
14
+ #include "../../Common/StreamObjects.h"
15
+ #include "../../Common/StreamUtils.h"
16
+
17
+ #include "../../Archive/Common/ItemNameUtils.h"
18
+ #include "../../Archive/IArchive.h"
19
+
20
+ #include "EnumDirItems.h"
21
+ #include "HashCalc.h"
22
+
23
+ using namespace NWindows;
24
+
25
+ #ifdef Z7_EXTERNAL_CODECS
26
+ extern const CExternalCodecs *g_ExternalCodecs_Ptr;
27
+ #endif
28
+
29
+ class CHashMidBuf
30
+ {
31
+ void *_data;
32
+ public:
33
+ CHashMidBuf(): _data(NULL) {}
34
+ operator void *() { return _data; }
35
+ bool Alloc(size_t size)
36
+ {
37
+ if (_data)
38
+ return false;
39
+ _data = ::MidAlloc(size);
40
+ return _data != NULL;
41
+ }
42
+ ~CHashMidBuf() { ::MidFree(_data); }
43
+ };
44
+
45
+ static const char * const k_DefaultHashMethod = "CRC32";
46
+
47
+ HRESULT CHashBundle::SetMethods(DECL_EXTERNAL_CODECS_LOC_VARS const UStringVector &hashMethods)
48
+ {
49
+ UStringVector names = hashMethods;
50
+ if (names.IsEmpty())
51
+ names.Add(UString(k_DefaultHashMethod));
52
+
53
+ CRecordVector<CMethodId> ids;
54
+ CObjectVector<COneMethodInfo> methods;
55
+
56
+ unsigned i;
57
+ for (i = 0; i < names.Size(); i++)
58
+ {
59
+ COneMethodInfo m;
60
+ RINOK(m.ParseMethodFromString(names[i]))
61
+
62
+ if (m.MethodName.IsEmpty())
63
+ m.MethodName = k_DefaultHashMethod;
64
+
65
+ if (m.MethodName.IsEqualTo("*"))
66
+ {
67
+ CRecordVector<CMethodId> tempMethods;
68
+ GetHashMethods(EXTERNAL_CODECS_LOC_VARS tempMethods);
69
+ methods.Clear();
70
+ ids.Clear();
71
+ FOR_VECTOR (t, tempMethods)
72
+ {
73
+ unsigned index = ids.AddToUniqueSorted(tempMethods[t]);
74
+ if (ids.Size() != methods.Size())
75
+ methods.Insert(index, m);
76
+ }
77
+ break;
78
+ }
79
+ else
80
+ {
81
+ // m.MethodName.RemoveChar(L'-');
82
+ CMethodId id;
83
+ if (!FindHashMethod(EXTERNAL_CODECS_LOC_VARS m.MethodName, id))
84
+ return E_NOTIMPL;
85
+ unsigned index = ids.AddToUniqueSorted(id);
86
+ if (ids.Size() != methods.Size())
87
+ methods.Insert(index, m);
88
+ }
89
+ }
90
+
91
+ for (i = 0; i < ids.Size(); i++)
92
+ {
93
+ CMyComPtr<IHasher> hasher;
94
+ AString name;
95
+ RINOK(CreateHasher(EXTERNAL_CODECS_LOC_VARS ids[i], name, hasher))
96
+ if (!hasher)
97
+ throw "Can't create hasher";
98
+ const COneMethodInfo &m = methods[i];
99
+ {
100
+ CMyComPtr<ICompressSetCoderProperties> scp;
101
+ hasher.QueryInterface(IID_ICompressSetCoderProperties, &scp);
102
+ if (scp)
103
+ RINOK(m.SetCoderProps(scp, NULL))
104
+ }
105
+ const UInt32 digestSize = hasher->GetDigestSize();
106
+ if (digestSize > k_HashCalc_DigestSize_Max)
107
+ return E_NOTIMPL;
108
+ CHasherState &h = Hashers.AddNew();
109
+ h.DigestSize = digestSize;
110
+ h.Hasher = hasher;
111
+ h.Name = name;
112
+ for (unsigned k = 0; k < k_HashCalc_NumGroups; k++)
113
+ h.InitDigestGroup(k);
114
+ }
115
+
116
+ return S_OK;
117
+ }
118
+
119
+ void CHashBundle::InitForNewFile()
120
+ {
121
+ CurSize = 0;
122
+ FOR_VECTOR (i, Hashers)
123
+ {
124
+ CHasherState &h = Hashers[i];
125
+ h.Hasher->Init();
126
+ h.InitDigestGroup(k_HashCalc_Index_Current);
127
+ }
128
+ }
129
+
130
+ void CHashBundle::Update(const void *data, UInt32 size)
131
+ {
132
+ CurSize += size;
133
+ FOR_VECTOR (i, Hashers)
134
+ Hashers[i].Hasher->Update(data, size);
135
+ }
136
+
137
+ void CHashBundle::SetSize(UInt64 size)
138
+ {
139
+ CurSize = size;
140
+ }
141
+
142
+ static void AddDigests(Byte *dest, const Byte *src, UInt32 size)
143
+ {
144
+ unsigned next = 0;
145
+ /*
146
+ // we could use big-endian addition for sha-1 and sha-256
147
+ // but another hashers are little-endian
148
+ if (size > 8)
149
+ {
150
+ for (unsigned i = size; i != 0;)
151
+ {
152
+ i--;
153
+ next += (unsigned)dest[i] + (unsigned)src[i];
154
+ dest[i] = (Byte)next;
155
+ next >>= 8;
156
+ }
157
+ }
158
+ else
159
+ */
160
+ {
161
+ for (unsigned i = 0; i < size; i++)
162
+ {
163
+ next += (unsigned)dest[i] + (unsigned)src[i];
164
+ dest[i] = (Byte)next;
165
+ next >>= 8;
166
+ }
167
+ }
168
+
169
+ // we use little-endian to store extra bytes
170
+ dest += k_HashCalc_DigestSize_Max;
171
+ for (unsigned i = 0; i < k_HashCalc_ExtraSize; i++)
172
+ {
173
+ next += (unsigned)dest[i];
174
+ dest[i] = (Byte)next;
175
+ next >>= 8;
176
+ }
177
+ }
178
+
179
+ void CHasherState::AddDigest(unsigned groupIndex, const Byte *data)
180
+ {
181
+ NumSums[groupIndex]++;
182
+ AddDigests(Digests[groupIndex], data, DigestSize);
183
+ }
184
+
185
+ void CHashBundle::Final(bool isDir, bool isAltStream, const UString &path)
186
+ {
187
+ if (isDir)
188
+ NumDirs++;
189
+ else if (isAltStream)
190
+ {
191
+ NumAltStreams++;
192
+ AltStreamsSize += CurSize;
193
+ }
194
+ else
195
+ {
196
+ NumFiles++;
197
+ FilesSize += CurSize;
198
+ }
199
+
200
+ Byte pre[16];
201
+ memset(pre, 0, sizeof(pre));
202
+ if (isDir)
203
+ pre[0] = 1;
204
+
205
+ FOR_VECTOR (i, Hashers)
206
+ {
207
+ CHasherState &h = Hashers[i];
208
+ if (!isDir)
209
+ {
210
+ h.Hasher->Final(h.Digests[0]); // k_HashCalc_Index_Current
211
+ if (!isAltStream)
212
+ h.AddDigest(k_HashCalc_Index_DataSum, h.Digests[0]);
213
+ }
214
+
215
+ h.Hasher->Init();
216
+ h.Hasher->Update(pre, sizeof(pre));
217
+ h.Hasher->Update(h.Digests[0], h.DigestSize);
218
+
219
+ for (unsigned k = 0; k < path.Len(); k++)
220
+ {
221
+ wchar_t c = path[k];
222
+
223
+ // 21.04: we want same hash for linux and windows paths
224
+ #if CHAR_PATH_SEPARATOR != '/'
225
+ if (c == CHAR_PATH_SEPARATOR)
226
+ c = '/';
227
+ // if (c == (wchar_t)('\\' + 0xf000)) c = '\\'; // to debug WSL
228
+ // if (c > 0xf000 && c < 0xf080) c -= 0xf000; // to debug WSL
229
+ #endif
230
+
231
+ Byte temp[2] = { (Byte)(c & 0xFF), (Byte)((c >> 8) & 0xFF) };
232
+ h.Hasher->Update(temp, 2);
233
+ }
234
+
235
+ Byte tempDigest[k_HashCalc_DigestSize_Max];
236
+ h.Hasher->Final(tempDigest);
237
+ if (!isAltStream)
238
+ h.AddDigest(k_HashCalc_Index_NamesSum, tempDigest);
239
+ h.AddDigest(k_HashCalc_Index_StreamsSum, tempDigest);
240
+ }
241
+ }
242
+
243
+
244
+ static void CSum_Name_OriginalToEscape(const AString &src, AString &dest)
245
+ {
246
+ dest.Empty();
247
+ for (unsigned i = 0; i < src.Len();)
248
+ {
249
+ char c = src[i++];
250
+ if (c == '\n')
251
+ {
252
+ dest.Add_Char('\\');
253
+ c = 'n';
254
+ }
255
+ else if (c == '\\')
256
+ dest.Add_Char('\\');
257
+ dest.Add_Char(c);
258
+ }
259
+ }
260
+
261
+
262
+ static bool CSum_Name_EscapeToOriginal(const char *s, AString &dest)
263
+ {
264
+ bool isOK = true;
265
+ dest.Empty();
266
+ for (;;)
267
+ {
268
+ char c = *s++;
269
+ if (c == 0)
270
+ break;
271
+ if (c == '\\')
272
+ {
273
+ const char c1 = *s;
274
+ if (c1 == 'n')
275
+ {
276
+ c = '\n';
277
+ s++;
278
+ }
279
+ else if (c1 == '\\')
280
+ {
281
+ c = c1;
282
+ s++;
283
+ }
284
+ else
285
+ {
286
+ // original md5sum returns NULL for such bad strings
287
+ isOK = false;
288
+ }
289
+ }
290
+ dest.Add_Char(c);
291
+ }
292
+ return isOK;
293
+ }
294
+
295
+
296
+
297
+ static void SetSpacesAndNul(char *s, unsigned num)
298
+ {
299
+ for (unsigned i = 0; i < num; i++)
300
+ s[i] = ' ';
301
+ s[num] = 0;
302
+ }
303
+
304
+ static const unsigned kHashColumnWidth_Min = 4 * 2;
305
+
306
+ static unsigned GetColumnWidth(unsigned digestSize)
307
+ {
308
+ const unsigned width = digestSize * 2;
309
+ return width < kHashColumnWidth_Min ? kHashColumnWidth_Min: width;
310
+ }
311
+
312
+
313
+ static void AddHashResultLine(
314
+ AString &_s,
315
+ // bool showHash,
316
+ // UInt64 fileSize, bool showSize,
317
+ const CObjectVector<CHasherState> &hashers
318
+ // unsigned digestIndex, = k_HashCalc_Index_Current
319
+ )
320
+ {
321
+ FOR_VECTOR (i, hashers)
322
+ {
323
+ const CHasherState &h = hashers[i];
324
+ char s[k_HashCalc_DigestSize_Max * 2 + 64];
325
+ s[0] = 0;
326
+ // if (showHash)
327
+ HashHexToString(s, h.Digests[k_HashCalc_Index_Current], h.DigestSize);
328
+ const unsigned pos = (unsigned)strlen(s);
329
+ const int numSpaces = (int)GetColumnWidth(h.DigestSize) - (int)pos;
330
+ if (numSpaces > 0)
331
+ SetSpacesAndNul(s + pos, (unsigned)numSpaces);
332
+ if (i != 0)
333
+ _s.Add_Space();
334
+ _s += s;
335
+ }
336
+
337
+ /*
338
+ if (showSize)
339
+ {
340
+ _s.Add_Space();
341
+ static const unsigned kSizeField_Len = 13; // same as in HashCon.cpp
342
+ char s[kSizeField_Len + 32];
343
+ char *p = s;
344
+ SetSpacesAndNul(s, kSizeField_Len);
345
+ p = s + kSizeField_Len;
346
+ ConvertUInt64ToString(fileSize, p);
347
+ int numSpaces = (int)kSizeField_Len - (int)strlen(p);
348
+ if (numSpaces > 0)
349
+ p -= (unsigned)numSpaces;
350
+ _s += p;
351
+ }
352
+ */
353
+ }
354
+
355
+
356
+ static void Add_LF(CDynLimBuf &hashFileString, const CHashOptionsLocal &options)
357
+ {
358
+ hashFileString += (char)(options.HashMode_Zero.Val ? 0 : '\n');
359
+ }
360
+
361
+
362
+
363
+
364
+ static void WriteLine(CDynLimBuf &hashFileString,
365
+ const CHashOptionsLocal &options,
366
+ const UString &path2,
367
+ bool isDir,
368
+ const AString &methodName,
369
+ const AString &hashesString)
370
+ {
371
+ if (options.HashMode_OnlyHash.Val)
372
+ {
373
+ hashFileString += hashesString;
374
+ Add_LF(hashFileString, options);
375
+ return;
376
+ }
377
+
378
+ UString path = path2;
379
+
380
+ bool isBin = false;
381
+ const bool zeroMode = options.HashMode_Zero.Val;
382
+ const bool tagMode = options.HashMode_Tag.Val;
383
+
384
+ #if CHAR_PATH_SEPARATOR != '/'
385
+ path.Replace(WCHAR_PATH_SEPARATOR, L'/');
386
+ // path.Replace((wchar_t)('\\' + 0xf000), L'\\'); // to debug WSL
387
+ #endif
388
+
389
+ AString utf8;
390
+ ConvertUnicodeToUTF8(path, utf8);
391
+
392
+ AString esc;
393
+ CSum_Name_OriginalToEscape(utf8, esc);
394
+
395
+ if (!zeroMode)
396
+ {
397
+ if (esc != utf8)
398
+ {
399
+ /* Original md5sum writes escape in that case.
400
+ We do same for compatibility with original md5sum. */
401
+ hashFileString += '\\';
402
+ }
403
+ }
404
+
405
+ if (isDir && !esc.IsEmpty() && esc.Back() != '/')
406
+ esc.Add_Slash();
407
+
408
+ if (tagMode)
409
+ {
410
+ if (!methodName.IsEmpty())
411
+ {
412
+ hashFileString += methodName;
413
+ hashFileString += ' ';
414
+ }
415
+ hashFileString += '(';
416
+ hashFileString += esc;
417
+ hashFileString += ')';
418
+ hashFileString += " = ";
419
+ }
420
+
421
+ hashFileString += hashesString;
422
+
423
+ if (!tagMode)
424
+ {
425
+ hashFileString += ' ';
426
+ hashFileString += (char)(isBin ? '*' : ' ');
427
+ hashFileString += esc;
428
+ }
429
+
430
+ Add_LF(hashFileString, options);
431
+ }
432
+
433
+
434
+ static void Convert_TagName_to_MethodName(AString &method)
435
+ {
436
+ // we need to convert at least SHA512/256 to SHA512-256, and SHA512/224 to SHA512-224
437
+ // but we convert any '/' to '-'.
438
+ method.Replace('/', '-');
439
+ }
440
+
441
+ static void Convert_MethodName_to_TagName(AString &method)
442
+ {
443
+ if (method.IsPrefixedBy_Ascii_NoCase("SHA512-2"))
444
+ method.ReplaceOneCharAtPos(6, '/');
445
+ }
446
+
447
+
448
+ static void WriteLine(CDynLimBuf &hashFileString,
449
+ const CHashOptionsLocal &options,
450
+ const UString &path,
451
+ bool isDir,
452
+ const CHashBundle &hb)
453
+ {
454
+ AString methodName;
455
+ if (!hb.Hashers.IsEmpty())
456
+ {
457
+ methodName = hb.Hashers[0].Name;
458
+ Convert_MethodName_to_TagName(methodName);
459
+ }
460
+ AString hashesString;
461
+ AddHashResultLine(hashesString, hb.Hashers);
462
+ WriteLine(hashFileString, options, path, isDir, methodName, hashesString);
463
+ }
464
+
465
+
466
+ HRESULT HashCalc(
467
+ DECL_EXTERNAL_CODECS_LOC_VARS
468
+ const NWildcard::CCensor &censor,
469
+ const CHashOptions &options,
470
+ AString &errorInfo,
471
+ IHashCallbackUI *callback)
472
+ {
473
+ CDirItems dirItems;
474
+ dirItems.Callback = callback;
475
+
476
+ if (options.StdInMode)
477
+ {
478
+ CDirItem di;
479
+ if (!di.SetAs_StdInFile())
480
+ return GetLastError_noZero_HRESULT();
481
+ dirItems.Items.Add(di);
482
+ }
483
+ else
484
+ {
485
+ RINOK(callback->StartScanning())
486
+
487
+ dirItems.SymLinks = options.SymLinks.Val;
488
+ dirItems.ScanAltStreams = options.AltStreamsMode;
489
+ dirItems.ExcludeDirItems = censor.ExcludeDirItems;
490
+ dirItems.ExcludeFileItems = censor.ExcludeFileItems;
491
+
492
+ dirItems.ShareForWrite = options.OpenShareForWrite;
493
+
494
+ HRESULT res = EnumerateItems(censor,
495
+ options.PathMode,
496
+ UString(),
497
+ dirItems);
498
+
499
+ if (res != S_OK)
500
+ {
501
+ if (res != E_ABORT)
502
+ errorInfo = "Scanning error";
503
+ return res;
504
+ }
505
+ RINOK(callback->FinishScanning(dirItems.Stat))
506
+ }
507
+
508
+ unsigned i;
509
+ CHashBundle hb;
510
+ RINOK(hb.SetMethods(EXTERNAL_CODECS_LOC_VARS options.Methods))
511
+ // hb.Init();
512
+
513
+ hb.NumErrors = dirItems.Stat.NumErrors;
514
+
515
+ UInt64 totalSize = 0;
516
+ if (options.StdInMode)
517
+ {
518
+ RINOK(callback->SetNumFiles(1))
519
+ }
520
+ else
521
+ {
522
+ totalSize = dirItems.Stat.GetTotalBytes();
523
+ RINOK(callback->SetTotal(totalSize))
524
+ }
525
+
526
+ const UInt32 kBufSize = 1 << 15;
527
+ CHashMidBuf buf;
528
+ if (!buf.Alloc(kBufSize))
529
+ return E_OUTOFMEMORY;
530
+
531
+ UInt64 completeValue = 0;
532
+
533
+ RINOK(callback->BeforeFirstFile(hb))
534
+
535
+ /*
536
+ CDynLimBuf hashFileString((size_t)1 << 31);
537
+ const bool needGenerate = !options.HashFilePath.IsEmpty();
538
+ */
539
+
540
+ for (i = 0; i < dirItems.Items.Size(); i++)
541
+ {
542
+ CMyComPtr<ISequentialInStream> inStream;
543
+ UString path;
544
+ bool isDir = false;
545
+ bool isAltStream = false;
546
+
547
+ if (options.StdInMode)
548
+ {
549
+ #if 1
550
+ inStream = new CStdInFileStream;
551
+ #else
552
+ if (!CreateStdInStream(inStream))
553
+ {
554
+ const DWORD lastError = ::GetLastError();
555
+ const HRESULT res = callback->OpenFileError(FString("stdin"), lastError);
556
+ hb.NumErrors++;
557
+ if (res != S_FALSE && res != S_OK)
558
+ return res;
559
+ continue;
560
+ }
561
+ #endif
562
+ }
563
+ else
564
+ {
565
+ path = dirItems.GetLogPath(i);
566
+ const CDirItem &di = dirItems.Items[i];
567
+ #ifdef _WIN32
568
+ isAltStream = di.IsAltStream;
569
+ #endif
570
+
571
+ #ifndef UNDER_CE
572
+ // if (di.AreReparseData())
573
+ if (di.ReparseData.Size() != 0)
574
+ {
575
+ CBufInStream *inStreamSpec = new CBufInStream();
576
+ inStream = inStreamSpec;
577
+ inStreamSpec->Init(di.ReparseData, di.ReparseData.Size());
578
+ }
579
+ else
580
+ #endif
581
+ {
582
+ CInFileStream *inStreamSpec = new CInFileStream;
583
+ inStreamSpec->Set_PreserveATime(options.PreserveATime);
584
+ inStream = inStreamSpec;
585
+ isDir = di.IsDir();
586
+ if (!isDir)
587
+ {
588
+ const FString phyPath = dirItems.GetPhyPath(i);
589
+ if (!inStreamSpec->OpenShared(phyPath, options.OpenShareForWrite))
590
+ {
591
+ const HRESULT res = callback->OpenFileError(phyPath, ::GetLastError());
592
+ hb.NumErrors++;
593
+ if (res != S_FALSE)
594
+ return res;
595
+ continue;
596
+ }
597
+ if (!options.StdInMode)
598
+ {
599
+ UInt64 curSize = 0;
600
+ if (inStreamSpec->GetSize(&curSize) == S_OK)
601
+ {
602
+ if (curSize > di.Size)
603
+ {
604
+ totalSize += curSize - di.Size;
605
+ RINOK(callback->SetTotal(totalSize))
606
+ // printf("\ntotal = %d MiB\n", (unsigned)(totalSize >> 20));
607
+ }
608
+ }
609
+ }
610
+ // inStreamSpec->ReloadProps();
611
+ }
612
+ }
613
+ }
614
+
615
+ RINOK(callback->GetStream(path, isDir))
616
+ UInt64 fileSize = 0;
617
+
618
+ hb.InitForNewFile();
619
+
620
+ if (!isDir)
621
+ {
622
+ for (UInt32 step = 0;; step++)
623
+ {
624
+ if ((step & 0xFF) == 0)
625
+ {
626
+ // printf("\ncompl = %d\n", (unsigned)(completeValue >> 20));
627
+ RINOK(callback->SetCompleted(&completeValue))
628
+ }
629
+ UInt32 size;
630
+ RINOK(inStream->Read(buf, kBufSize, &size))
631
+ if (size == 0)
632
+ break;
633
+ hb.Update(buf, size);
634
+ fileSize += size;
635
+ completeValue += size;
636
+ }
637
+ }
638
+
639
+ hb.Final(isDir, isAltStream, path);
640
+
641
+ /*
642
+ if (needGenerate
643
+ && (options.HashMode_Dirs.Val || !isDir))
644
+ {
645
+ WriteLine(hashFileString,
646
+ options,
647
+ path, // change it
648
+ isDir,
649
+ hb);
650
+
651
+ if (hashFileString.IsError())
652
+ return E_OUTOFMEMORY;
653
+ }
654
+ */
655
+
656
+ RINOK(callback->SetOperationResult(fileSize, hb, !isDir))
657
+ RINOK(callback->SetCompleted(&completeValue))
658
+ }
659
+
660
+ /*
661
+ if (needGenerate)
662
+ {
663
+ NFile::NIO::COutFile file;
664
+ if (!file.Create(us2fs(options.HashFilePath), true)) // createAlways
665
+ return GetLastError_noZero_HRESULT();
666
+ if (!file.WriteFull(hashFileString, hashFileString.Len()))
667
+ return GetLastError_noZero_HRESULT();
668
+ }
669
+ */
670
+
671
+ return callback->AfterLastFile(hb);
672
+ }
673
+
674
+
675
+ void HashHexToString(char *dest, const Byte *data, size_t size)
676
+ {
677
+ if (!data)
678
+ {
679
+ for (size_t i = 0; i < size; i++)
680
+ {
681
+ dest[0] = ' ';
682
+ dest[1] = ' ';
683
+ dest += 2;
684
+ }
685
+ *dest = 0;
686
+ return;
687
+ }
688
+
689
+ if (size > 8)
690
+ ConvertDataToHex_Lower(dest, data, size);
691
+ else if (size == 0)
692
+ {
693
+ *dest = 0;
694
+ return;
695
+ }
696
+ else
697
+ {
698
+ const char *dest_start = dest;
699
+ dest += size * 2;
700
+ *dest = 0;
701
+ do
702
+ {
703
+ const size_t b = *data++;
704
+ dest -= 2;
705
+ dest[0] = GET_HEX_CHAR_UPPER(b >> 4);
706
+ dest[1] = GET_HEX_CHAR_UPPER(b & 15);
707
+ }
708
+ while (dest != dest_start);
709
+ }
710
+ }
711
+
712
+ void CHasherState::WriteToString(unsigned digestIndex, char *s) const
713
+ {
714
+ HashHexToString(s, Digests[digestIndex], DigestSize);
715
+
716
+ if (digestIndex != 0 && NumSums[digestIndex] != 1)
717
+ {
718
+ unsigned numExtraBytes = GetNumExtraBytes_for_Group(digestIndex);
719
+ if (numExtraBytes > 4)
720
+ numExtraBytes = 8;
721
+ else // if (numExtraBytes >= 0)
722
+ numExtraBytes = 4;
723
+ // if (numExtraBytes != 0)
724
+ {
725
+ s += strlen(s);
726
+ *s++ = '-';
727
+ // *s = 0;
728
+ HashHexToString(s, GetExtraData_for_Group(digestIndex), numExtraBytes);
729
+ }
730
+ }
731
+ }
732
+
733
+
734
+
735
+ // ---------- Hash Handler ----------
736
+
737
+ namespace NHash {
738
+
739
+ #define IsWhite(c) ((c) == ' ' || (c) == '\t')
740
+
741
+ bool CHashPair::IsDir() const
742
+ {
743
+ if (Name.IsEmpty() || Name.Back() != '/')
744
+ return false;
745
+ // here we expect that Dir items contain only zeros or no Hash
746
+ for (size_t i = 0; i < Hash.Size(); i++)
747
+ if (Hash.ConstData()[i] != 0)
748
+ return false;
749
+ return true;
750
+ }
751
+
752
+
753
+ bool CHashPair::ParseCksum(const char *s)
754
+ {
755
+ const char *end;
756
+
757
+ const UInt32 crc = ConvertStringToUInt32(s, &end);
758
+ if (*end != ' ')
759
+ return false;
760
+ end++;
761
+
762
+ const UInt64 size = ConvertStringToUInt64(end, &end);
763
+ if (*end != ' ')
764
+ return false;
765
+ end++;
766
+
767
+ Name = end;
768
+
769
+ Hash.Alloc(4);
770
+ SetBe32a(Hash, crc)
771
+
772
+ Size_from_Arc = size;
773
+ Size_from_Arc_Defined = true;
774
+
775
+ return true;
776
+ }
777
+
778
+
779
+
780
+ static const char *SkipWhite(const char *s Z7_lifetimebound)
781
+ {
782
+ while (IsWhite(*s))
783
+ s++;
784
+ return s;
785
+ }
786
+
787
+ static const char * const k_CsumMethodNames[] =
788
+ {
789
+ "sha256"
790
+ , "sha224"
791
+ , "sha512-224"
792
+ , "sha512-256"
793
+ , "sha384"
794
+ , "sha512"
795
+ , "sha3-224"
796
+ , "sha3-256"
797
+ , "sha3-384"
798
+ , "sha3-512"
799
+ // , "shake128"
800
+ // , "shake256"
801
+ , "sha1"
802
+ , "sha2"
803
+ , "sha3"
804
+ , "sha"
805
+ , "md5"
806
+ , "blake2s"
807
+ , "blake2b"
808
+ , "blake2sp"
809
+ , "xxh64"
810
+ , "crc32"
811
+ , "crc64"
812
+ , "cksum"
813
+ };
814
+
815
+
816
+ // returns true, if (method) is known hash method or hash method group name.
817
+ static bool GetMethod_from_FileName(const UString &name, AString &method)
818
+ {
819
+ method.Empty();
820
+ AString s;
821
+ ConvertUnicodeToUTF8(name, s);
822
+ const int dotPos = s.ReverseFind_Dot();
823
+ if (dotPos >= 0)
824
+ {
825
+ method = s.Ptr(dotPos + 1);
826
+ if (method.IsEqualTo_Ascii_NoCase("txt") ||
827
+ method.IsEqualTo_Ascii_NoCase("asc"))
828
+ {
829
+ method.Empty();
830
+ const int dotPos2 = s.Find('.');
831
+ if (dotPos2 >= 0)
832
+ s.DeleteFrom(dotPos2);
833
+ }
834
+ }
835
+ if (method.IsEmpty())
836
+ {
837
+ // we support file names with "sum" and "sums" postfixes: "sha256sum", "sha256sums"
838
+ unsigned size;
839
+ if (s.Len() > 4 && StringsAreEqualNoCase_Ascii(s.RightPtr(4), "sums"))
840
+ size = 4;
841
+ else if (s.Len() > 3 && StringsAreEqualNoCase_Ascii(s.RightPtr(3), "sum"))
842
+ size = 3;
843
+ else
844
+ return false;
845
+ method = s;
846
+ method.DeleteFrom(s.Len() - size);
847
+ }
848
+
849
+ unsigned i;
850
+ for (i = 0; i < Z7_ARRAY_SIZE(k_CsumMethodNames); i++)
851
+ {
852
+ const char *m = k_CsumMethodNames[i];
853
+ if (method.IsEqualTo_Ascii_NoCase(m))
854
+ {
855
+ // method = m; // we can get lowcase
856
+ return true;
857
+ }
858
+ }
859
+
860
+ /*
861
+ for (i = 0; i < Z7_ARRAY_SIZE(k_CsumMethodNames); i++)
862
+ {
863
+ const char *m = k_CsumMethodNames[i];
864
+ if (method.IsPrefixedBy_Ascii_NoCase(m))
865
+ {
866
+ method = m; // we get lowcase
867
+ return true;
868
+ }
869
+ }
870
+ */
871
+ return false;
872
+ }
873
+
874
+
875
+ bool CHashPair::Parse(const char *s)
876
+ {
877
+ // here we keep compatibility with original md5sum / shasum
878
+ bool escape = false;
879
+
880
+ s = SkipWhite(s);
881
+
882
+ if (*s == '\\')
883
+ {
884
+ s++;
885
+ escape = true;
886
+ }
887
+ Escape = escape;
888
+
889
+ // const char *kMethod = GetMethod_from_FileName(s);
890
+ // if (kMethod)
891
+ if ((size_t)(FindNonHexChar(s) - s) < 4)
892
+ {
893
+ // BSD-style checksum line
894
+ {
895
+ const char *s2 = s;
896
+ for (; *s2 != 0; s2++)
897
+ {
898
+ const char c = *s2;
899
+ if (c == 0)
900
+ return false;
901
+ if (c == ' ' || c == '(')
902
+ break;
903
+ }
904
+ Method.SetFrom(s, (unsigned)(s2 - s));
905
+ s = s2;
906
+ }
907
+ IsBSD = true;
908
+ if (*s == ' ')
909
+ s++;
910
+ if (*s != '(')
911
+ return false;
912
+ s++;
913
+ {
914
+ const char *s2 = s;
915
+ for (; *s2 != 0; s2++)
916
+ {}
917
+ for (;;)
918
+ {
919
+ s2--;
920
+ if (s2 < s)
921
+ return false;
922
+ if (*s2 == ')')
923
+ break;
924
+ }
925
+ Name.SetFrom(s, (unsigned)(s2 - s));
926
+ s = s2 + 1;
927
+ }
928
+
929
+ s = SkipWhite(s);
930
+ if (*s != '=')
931
+ return false;
932
+ s++;
933
+ s = SkipWhite(s);
934
+ }
935
+
936
+ {
937
+ const size_t numChars = (size_t)(FindNonHexChar(s) - s) & ~(size_t)1;
938
+ Hash.Alloc(numChars / 2);
939
+ if ((size_t)(ParseHexString(s, Hash) - Hash) != numChars / 2)
940
+ throw 101;
941
+ HashString.SetFrom(s, (unsigned)numChars);
942
+ s += numChars;
943
+ }
944
+
945
+ if (IsBSD)
946
+ {
947
+ if (*s != 0)
948
+ return false;
949
+ if (escape)
950
+ {
951
+ const AString temp (Name);
952
+ return CSum_Name_EscapeToOriginal(temp, Name);
953
+ }
954
+ return true;
955
+ }
956
+
957
+ if (*s == 0)
958
+ return true;
959
+
960
+ if (*s != ' ')
961
+ return false;
962
+ s++;
963
+ const char c = *s;
964
+ if (c != ' '
965
+ && c != '*'
966
+ && c != 'U' // shasum Universal
967
+ && c != '^' // shasum 0/1
968
+ )
969
+ return false;
970
+ Mode = c;
971
+ s++;
972
+ if (escape)
973
+ return CSum_Name_EscapeToOriginal(s, Name);
974
+ Name = s;
975
+ return true;
976
+ }
977
+
978
+
979
+ static bool GetLine(CByteBuffer &buf, bool zeroMode, bool cr_lf_Mode, size_t &posCur, AString &s)
980
+ {
981
+ s.Empty();
982
+ size_t pos = posCur;
983
+ const Byte *p = buf;
984
+ unsigned numDigits = 0;
985
+ for (; pos < buf.Size(); pos++)
986
+ {
987
+ const Byte b = p[pos];
988
+ if (b == 0)
989
+ {
990
+ numDigits = 1;
991
+ break;
992
+ }
993
+ if (zeroMode)
994
+ continue;
995
+ if (b == 0x0a)
996
+ {
997
+ numDigits = 1;
998
+ break;
999
+ }
1000
+ if (!cr_lf_Mode)
1001
+ continue;
1002
+ if (b == 0x0d)
1003
+ {
1004
+ if (pos + 1 >= buf.Size())
1005
+ {
1006
+ numDigits = 1;
1007
+ break;
1008
+ // return false;
1009
+ }
1010
+ if (p[pos + 1] == 0x0a)
1011
+ {
1012
+ numDigits = 2;
1013
+ break;
1014
+ }
1015
+ }
1016
+ }
1017
+ s.SetFrom((const char *)(p + posCur), (unsigned)(pos - posCur));
1018
+ posCur = pos + numDigits;
1019
+ return true;
1020
+ }
1021
+
1022
+
1023
+ static bool Is_CR_LF_Data(const Byte *buf, size_t size)
1024
+ {
1025
+ bool isCrLf = false;
1026
+ for (size_t i = 0; i < size;)
1027
+ {
1028
+ const Byte b = buf[i];
1029
+ if (b == 0x0a)
1030
+ return false;
1031
+ if (b == 0x0d)
1032
+ {
1033
+ if (i == size - 1)
1034
+ return false;
1035
+ if (buf[i + 1] != 0x0a)
1036
+ return false;
1037
+ isCrLf = true;
1038
+ i += 2;
1039
+ }
1040
+ else
1041
+ i++;
1042
+ }
1043
+ return isCrLf;
1044
+ }
1045
+
1046
+
1047
+ static const Byte kArcProps[] =
1048
+ {
1049
+ // kpidComment,
1050
+ kpidCharacts
1051
+ };
1052
+
1053
+ static const Byte kProps[] =
1054
+ {
1055
+ kpidPath,
1056
+ kpidSize,
1057
+ kpidPackSize,
1058
+ kpidMethod
1059
+ };
1060
+
1061
+ static const Byte kRawProps[] =
1062
+ {
1063
+ kpidChecksum
1064
+ };
1065
+
1066
+
1067
+ Z7_COM7F_IMF(CHandler::GetParent(UInt32 /* index */ , UInt32 *parent, UInt32 *parentType))
1068
+ {
1069
+ *parentType = NParentType::kDir;
1070
+ *parent = (UInt32)(Int32)-1;
1071
+ return S_OK;
1072
+ }
1073
+
1074
+ Z7_COM7F_IMF(CHandler::GetNumRawProps(UInt32 *numProps))
1075
+ {
1076
+ *numProps = Z7_ARRAY_SIZE(kRawProps);
1077
+ return S_OK;
1078
+ }
1079
+
1080
+ Z7_COM7F_IMF(CHandler::GetRawPropInfo(UInt32 index, BSTR *name, PROPID *propID))
1081
+ {
1082
+ *propID = kRawProps[index];
1083
+ *name = NULL;
1084
+ return S_OK;
1085
+ }
1086
+
1087
+ Z7_COM7F_IMF(CHandler::GetRawProp(UInt32 index, PROPID propID, const void **data, UInt32 *dataSize, UInt32 *propType))
1088
+ {
1089
+ *data = NULL;
1090
+ *dataSize = 0;
1091
+ *propType = 0;
1092
+
1093
+ if (propID == kpidChecksum)
1094
+ {
1095
+ const CHashPair &hp = HashPairs[index];
1096
+ if (hp.Hash.Size() != 0)
1097
+ {
1098
+ *data = hp.Hash;
1099
+ *dataSize = (UInt32)hp.Hash.Size();
1100
+ *propType = NPropDataType::kRaw;
1101
+ }
1102
+ return S_OK;
1103
+ }
1104
+
1105
+ return S_OK;
1106
+ }
1107
+
1108
+ IMP_IInArchive_Props
1109
+ IMP_IInArchive_ArcProps
1110
+
1111
+ Z7_COM7F_IMF(CHandler::GetNumberOfItems(UInt32 *numItems))
1112
+ {
1113
+ *numItems = HashPairs.Size();
1114
+ return S_OK;
1115
+ }
1116
+
1117
+ static void Add_OptSpace_String(UString &dest, const char *src)
1118
+ {
1119
+ dest.Add_Space_if_NotEmpty();
1120
+ dest += src;
1121
+ }
1122
+
1123
+ Z7_COM7F_IMF(CHandler::GetArchiveProperty(PROPID propID, PROPVARIANT *value))
1124
+ {
1125
+ NCOM::CPropVariant prop;
1126
+ switch (propID)
1127
+ {
1128
+ case kpidPhySize: if (_phySize != 0) prop = _phySize; break;
1129
+ /*
1130
+ case kpidErrorFlags:
1131
+ {
1132
+ UInt32 v = 0;
1133
+ if (!_isArc) v |= kpv_ErrorFlags_IsNotArc;
1134
+ // if (_sres == k_Base64_RES_NeedMoreInput) v |= kpv_ErrorFlags_UnexpectedEnd;
1135
+ if (v != 0)
1136
+ prop = v;
1137
+ break;
1138
+ }
1139
+ */
1140
+ case kpidCharacts:
1141
+ {
1142
+ UString s;
1143
+ if (_hashSize_Defined)
1144
+ {
1145
+ s.Add_Space_if_NotEmpty();
1146
+ s.Add_UInt32(_hashSize * 8);
1147
+ s += "-bit";
1148
+ }
1149
+ if (_is_PgpMethod)
1150
+ {
1151
+ Add_OptSpace_String(s, "PGP");
1152
+ if (!_pgpMethod.IsEmpty())
1153
+ {
1154
+ s.Add_Colon();
1155
+ s += _pgpMethod;
1156
+ }
1157
+ }
1158
+ if (_is_ZeroMode)
1159
+ Add_OptSpace_String(s, "ZERO");
1160
+ if (_are_there_Tags)
1161
+ Add_OptSpace_String(s, "TAG");
1162
+ if (_are_there_Dirs)
1163
+ Add_OptSpace_String(s, "DIRS");
1164
+ if (!_method_from_FileName.IsEmpty())
1165
+ {
1166
+ Add_OptSpace_String(s, "filename_method:");
1167
+ s += _method_from_FileName;
1168
+ if (!_is_KnownMethod_in_FileName)
1169
+ s += ":UNKNOWN";
1170
+ }
1171
+ if (!_methods.IsEmpty())
1172
+ {
1173
+ Add_OptSpace_String(s, "cmd_method:");
1174
+ s += _methods[0];
1175
+ }
1176
+ prop = s;
1177
+ break;
1178
+ }
1179
+
1180
+ case kpidReadOnly:
1181
+ {
1182
+ if (_isArc)
1183
+ if (!CanUpdate())
1184
+ prop = true;
1185
+ break;
1186
+ }
1187
+ default: break;
1188
+ }
1189
+ prop.Detach(value);
1190
+ return S_OK;
1191
+ }
1192
+
1193
+
1194
+ Z7_COM7F_IMF(CHandler::GetProperty(UInt32 index, PROPID propID, PROPVARIANT *value))
1195
+ {
1196
+ // COM_TRY_BEGIN
1197
+ NCOM::CPropVariant prop;
1198
+ const CHashPair &hp = HashPairs[index];
1199
+ switch (propID)
1200
+ {
1201
+ case kpidIsDir:
1202
+ {
1203
+ prop = hp.IsDir();
1204
+ break;
1205
+ }
1206
+ case kpidPath:
1207
+ {
1208
+ UString path;
1209
+ hp.Get_UString_Path(path);
1210
+
1211
+ bool useBackslashReplacement = true;
1212
+ if (_supportWindowsBackslash && !hp.Escape && path.Find(L"\\\\") < 0)
1213
+ {
1214
+ #if WCHAR_PATH_SEPARATOR == L'/'
1215
+ path.Replace(L'\\', L'/');
1216
+ #else
1217
+ useBackslashReplacement = false;
1218
+ #endif
1219
+ }
1220
+ NArchive::NItemName::ReplaceToOsSlashes_Remove_TailSlash(
1221
+ path, useBackslashReplacement);
1222
+ prop = path;
1223
+ break;
1224
+ }
1225
+ case kpidSize:
1226
+ {
1227
+ // client needs processed size of last file
1228
+ if (hp.Size_from_Disk_Defined)
1229
+ prop = (UInt64)hp.Size_from_Disk;
1230
+ else if (hp.Size_from_Arc_Defined)
1231
+ prop = (UInt64)hp.Size_from_Arc;
1232
+ break;
1233
+ }
1234
+ case kpidPackSize:
1235
+ {
1236
+ prop = (UInt64)hp.Hash.Size();
1237
+ break;
1238
+ }
1239
+ case kpidMethod:
1240
+ {
1241
+ if (!hp.Method.IsEmpty())
1242
+ prop = hp.Method;
1243
+ break;
1244
+ }
1245
+ default: break;
1246
+ }
1247
+ prop.Detach(value);
1248
+ return S_OK;
1249
+ // COM_TRY_END
1250
+ }
1251
+
1252
+
1253
+ static HRESULT ReadStream_to_Buf(IInStream *stream, CByteBuffer &buf, IArchiveOpenCallback *openCallback)
1254
+ {
1255
+ buf.Free();
1256
+ UInt64 len;
1257
+ RINOK(InStream_AtBegin_GetSize(stream, len))
1258
+ if (len == 0 || len >= ((UInt64)1 << 31))
1259
+ return S_FALSE;
1260
+ buf.Alloc((size_t)len);
1261
+ UInt64 pos = 0;
1262
+ // return ReadStream_FALSE(stream, buf, (size_t)len);
1263
+ for (;;)
1264
+ {
1265
+ const UInt32 kBlockSize = ((UInt32)1 << 24);
1266
+ const UInt32 curSize = (len < kBlockSize) ? (UInt32)len : kBlockSize;
1267
+ UInt32 processedSizeLoc;
1268
+ RINOK(stream->Read((Byte *)buf + pos, curSize, &processedSizeLoc))
1269
+ if (processedSizeLoc == 0)
1270
+ return E_FAIL;
1271
+ len -= processedSizeLoc;
1272
+ pos += processedSizeLoc;
1273
+ if (len == 0)
1274
+ return S_OK;
1275
+ if (openCallback)
1276
+ {
1277
+ const UInt64 files = 0;
1278
+ RINOK(openCallback->SetCompleted(&files, &pos))
1279
+ }
1280
+ }
1281
+ }
1282
+
1283
+
1284
+ static bool isThere_Zero_Byte(const Byte *data, size_t size)
1285
+ {
1286
+ for (size_t i = 0; i < size; i++)
1287
+ if (data[i] == 0)
1288
+ return true;
1289
+ return false;
1290
+ }
1291
+
1292
+
1293
+ Z7_COM7F_IMF(CHandler::Open(IInStream *stream, const UInt64 *, IArchiveOpenCallback *openCallback))
1294
+ {
1295
+ COM_TRY_BEGIN
1296
+ {
1297
+ Close();
1298
+
1299
+ CByteBuffer buf;
1300
+ RINOK(ReadStream_to_Buf(stream, buf, openCallback))
1301
+
1302
+ CObjectVector<CHashPair> &pairs = HashPairs;
1303
+
1304
+ const bool zeroMode = isThere_Zero_Byte(buf, buf.Size());
1305
+ _is_ZeroMode = zeroMode;
1306
+ bool cr_lf_Mode = false;
1307
+ if (!zeroMode)
1308
+ cr_lf_Mode = Is_CR_LF_Data(buf, buf.Size());
1309
+
1310
+ if (openCallback)
1311
+ {
1312
+ Z7_DECL_CMyComPtr_QI_FROM(
1313
+ IArchiveOpenVolumeCallback,
1314
+ openVolumeCallback, openCallback)
1315
+ if (openVolumeCallback)
1316
+ {
1317
+ NCOM::CPropVariant prop;
1318
+ RINOK(openVolumeCallback->GetProperty(kpidName, &prop))
1319
+ if (prop.vt == VT_BSTR)
1320
+ _is_KnownMethod_in_FileName = GetMethod_from_FileName(prop.bstrVal, _method_from_FileName);
1321
+ }
1322
+ }
1323
+
1324
+ if (!_methods.IsEmpty())
1325
+ {
1326
+ ConvertUnicodeToUTF8(_methods[0], _method_for_Extraction);
1327
+ }
1328
+ if (_method_for_Extraction.IsEmpty())
1329
+ {
1330
+ // if (_is_KnownMethod_in_FileName)
1331
+ _method_for_Extraction = _method_from_FileName;
1332
+ }
1333
+
1334
+ const bool cksumMode = _method_for_Extraction.IsEqualTo_Ascii_NoCase("cksum");
1335
+ _is_CksumMode = cksumMode;
1336
+
1337
+ size_t pos = 0;
1338
+ AString s;
1339
+ bool minusMode = false;
1340
+ unsigned numLines = 0;
1341
+
1342
+ while (pos < buf.Size())
1343
+ {
1344
+ if (!GetLine(buf, zeroMode, cr_lf_Mode, pos, s))
1345
+ return S_FALSE;
1346
+ numLines++;
1347
+ if (s.IsEmpty())
1348
+ continue;
1349
+
1350
+ if (s.IsPrefixedBy_Ascii_NoCase("; "))
1351
+ {
1352
+ if (numLines != 1)
1353
+ return S_FALSE;
1354
+ // comment line of FileVerifier++
1355
+ continue;
1356
+ }
1357
+
1358
+ if (s.IsPrefixedBy_Ascii_NoCase("-----"))
1359
+ {
1360
+ if (minusMode)
1361
+ break; // end of pgp mode
1362
+ minusMode = true;
1363
+ if (s.IsPrefixedBy_Ascii_NoCase("-----BEGIN PGP SIGNED MESSAGE"))
1364
+ {
1365
+ if (_is_PgpMethod)
1366
+ return S_FALSE;
1367
+ if (!GetLine(buf, zeroMode, cr_lf_Mode, pos, s))
1368
+ return S_FALSE;
1369
+ const char *kStart = "Hash: ";
1370
+ if (!s.IsPrefixedBy_Ascii_NoCase(kStart))
1371
+ return S_FALSE;
1372
+ _pgpMethod = s.Ptr((unsigned)strlen(kStart));
1373
+ _is_PgpMethod = true;
1374
+ }
1375
+ continue;
1376
+ }
1377
+
1378
+ CHashPair pair;
1379
+ pair.FullLine = s;
1380
+ if (cksumMode)
1381
+ {
1382
+ if (!pair.ParseCksum(s))
1383
+ return S_FALSE;
1384
+ }
1385
+ else if (!pair.Parse(s))
1386
+ return S_FALSE;
1387
+ pairs.Add(pair);
1388
+ }
1389
+
1390
+ {
1391
+ unsigned hashSize = 0;
1392
+ bool hashSize_Dismatch = false;
1393
+ for (unsigned i = 0; i < HashPairs.Size(); i++)
1394
+ {
1395
+ const CHashPair &hp = HashPairs[i];
1396
+ if (i == 0)
1397
+ hashSize = (unsigned)hp.Hash.Size();
1398
+ else
1399
+ if (hashSize != hp.Hash.Size())
1400
+ hashSize_Dismatch = true;
1401
+
1402
+ if (hp.IsBSD)
1403
+ _are_there_Tags = true;
1404
+ if (!_are_there_Dirs && hp.IsDir())
1405
+ _are_there_Dirs = true;
1406
+ }
1407
+ if (!hashSize_Dismatch && hashSize != 0)
1408
+ {
1409
+ _hashSize = hashSize;
1410
+ _hashSize_Defined = true;
1411
+ }
1412
+ }
1413
+
1414
+ _phySize = buf.Size();
1415
+ _isArc = true;
1416
+ return S_OK;
1417
+ }
1418
+ COM_TRY_END
1419
+ }
1420
+
1421
+
1422
+ void CHandler::ClearVars()
1423
+ {
1424
+ _phySize = 0;
1425
+ _isArc = false;
1426
+ _is_CksumMode = false;
1427
+ _is_PgpMethod = false;
1428
+ _is_ZeroMode = false;
1429
+ _are_there_Tags = false;
1430
+ _are_there_Dirs = false;
1431
+ _is_KnownMethod_in_FileName = false;
1432
+ _hashSize_Defined = false;
1433
+ _hashSize = 0;
1434
+ }
1435
+
1436
+
1437
+ Z7_COM7F_IMF(CHandler::Close())
1438
+ {
1439
+ ClearVars();
1440
+ _method_from_FileName.Empty();
1441
+ _method_for_Extraction.Empty();
1442
+ _pgpMethod.Empty();
1443
+ HashPairs.Clear();
1444
+ return S_OK;
1445
+ }
1446
+
1447
+
1448
+ static bool CheckDigests(const Byte *a, const Byte *b, size_t size)
1449
+ {
1450
+ if (size <= 8)
1451
+ {
1452
+ /* we use reversed order for one digest, when text representation
1453
+ uses big-order for crc-32 and crc-64 */
1454
+ for (size_t i = 0; i < size; i++)
1455
+ if (a[i] != b[size - 1 - i])
1456
+ return false;
1457
+ return true;
1458
+ }
1459
+ {
1460
+ for (size_t i = 0; i < size; i++)
1461
+ if (a[i] != b[i])
1462
+ return false;
1463
+ return true;
1464
+ }
1465
+ }
1466
+
1467
+
1468
+ static void AddDefaultMethod(UStringVector &methods,
1469
+ const char *name, unsigned size)
1470
+ {
1471
+ int shaVersion = -1;
1472
+ if (name)
1473
+ {
1474
+ if (StringsAreEqualNoCase_Ascii(name, "sha"))
1475
+ {
1476
+ shaVersion = 0;
1477
+ if (size == 0)
1478
+ size = 32;
1479
+ }
1480
+ else if (StringsAreEqualNoCase_Ascii(name, "sha1"))
1481
+ {
1482
+ shaVersion = 1;
1483
+ if (size == 0)
1484
+ size = 20;
1485
+ }
1486
+ else if (StringsAreEqualNoCase_Ascii(name, "sha2"))
1487
+ {
1488
+ shaVersion = 2;
1489
+ if (size == 0)
1490
+ size = 32;
1491
+ }
1492
+ else if (StringsAreEqualNoCase_Ascii(name, "sha3"))
1493
+ {
1494
+ if (size == 0 ||
1495
+ size == 32) name = "sha3-256";
1496
+ else if (size == 28) name = "sha3-224";
1497
+ else if (size == 48) name = "sha3-384";
1498
+ else if (size == 64) name = "sha3-512";
1499
+ }
1500
+ else if (StringsAreEqualNoCase_Ascii(name, "sha512"))
1501
+ {
1502
+ // we allow any sha512 derived hash inside .sha512 file:
1503
+ if (size == 48) name = "sha384";
1504
+ else if (size == 32) name = "sha512-256";
1505
+ else if (size == 28) name = "sha512-224";
1506
+ }
1507
+ if (shaVersion >= 0)
1508
+ name = NULL;
1509
+ }
1510
+
1511
+ const char *m = NULL;
1512
+ if (name)
1513
+ m = name;
1514
+ else
1515
+ {
1516
+ if (size == 64) m = "sha512";
1517
+ else if (size == 48) m = "sha384";
1518
+ else if (size == 32) m = "sha256";
1519
+ else if (size == 28) m = "sha224";
1520
+ else if (size == 20) m = "sha1";
1521
+ else if (shaVersion < 0)
1522
+ {
1523
+ if (size == 16) m = "md5";
1524
+ else if (size == 8) m = "crc64";
1525
+ else if (size == 4) m = "crc32";
1526
+ }
1527
+ }
1528
+
1529
+ if (!m)
1530
+ return;
1531
+
1532
+ #ifdef Z7_EXTERNAL_CODECS
1533
+ const CExternalCodecs *_externalCodecs = g_ExternalCodecs_Ptr;
1534
+ #endif
1535
+ CMethodId id;
1536
+ if (FindHashMethod(EXTERNAL_CODECS_LOC_VARS
1537
+ AString(m), id))
1538
+ methods.Add(UString(m));
1539
+ }
1540
+
1541
+
1542
+ Z7_COM7F_IMF(CHandler::Extract(const UInt32 *indices, UInt32 numItems,
1543
+ Int32 testMode, IArchiveExtractCallback *extractCallback))
1544
+ {
1545
+ COM_TRY_BEGIN
1546
+
1547
+ /*
1548
+ if (testMode == 0)
1549
+ return E_NOTIMPL;
1550
+ */
1551
+
1552
+ const bool allFilesMode = (numItems == (UInt32)(Int32)-1);
1553
+ if (allFilesMode)
1554
+ numItems = HashPairs.Size();
1555
+ if (numItems == 0)
1556
+ return S_OK;
1557
+
1558
+ #ifdef Z7_EXTERNAL_CODECS
1559
+ const CExternalCodecs *_externalCodecs = g_ExternalCodecs_Ptr;
1560
+ #endif
1561
+
1562
+ CHashBundle hb_Glob;
1563
+ // UStringVector methods = options.Methods;
1564
+ UStringVector methods;
1565
+
1566
+ /*
1567
+ if (methods.IsEmpty() && !utf_nameExtenstion.IsEmpty() && !_hashSize_Defined)
1568
+ {
1569
+ CMethodId id;
1570
+ if (FindHashMethod(EXTERNAL_CODECS_LOC_VARS utf_nameExtenstion, id))
1571
+ methods.Add(_nameExtenstion);
1572
+ }
1573
+ */
1574
+
1575
+ if (methods.IsEmpty() && !_pgpMethod.IsEmpty())
1576
+ {
1577
+ CMethodId id;
1578
+ if (FindHashMethod(EXTERNAL_CODECS_LOC_VARS _pgpMethod, id))
1579
+ methods.Add(UString(_pgpMethod));
1580
+ }
1581
+
1582
+ /*
1583
+ if (methods.IsEmpty() && _pgpMethod.IsEmpty() && _hashSize_Defined)
1584
+ {
1585
+ AddDefaultMethod(methods,
1586
+ utf_nameExtenstion.IsEmpty() ? NULL : utf_nameExtenstion.Ptr(),
1587
+ _hashSize);
1588
+ }
1589
+ */
1590
+
1591
+ if (!methods.IsEmpty())
1592
+ {
1593
+ RINOK(hb_Glob.SetMethods(
1594
+ EXTERNAL_CODECS_LOC_VARS
1595
+ methods))
1596
+ }
1597
+
1598
+ Z7_DECL_CMyComPtr_QI_FROM(
1599
+ IArchiveUpdateCallbackFile,
1600
+ updateCallbackFile, extractCallback)
1601
+ if (!updateCallbackFile)
1602
+ return E_NOTIMPL;
1603
+ {
1604
+ Z7_DECL_CMyComPtr_QI_FROM(
1605
+ IArchiveGetDiskProperty,
1606
+ GetDiskProperty, extractCallback)
1607
+ if (GetDiskProperty)
1608
+ {
1609
+ UInt64 totalSize = 0;
1610
+ UInt32 i;
1611
+ for (i = 0; i < numItems; i++)
1612
+ {
1613
+ const UInt32 index = allFilesMode ? i : indices[i];
1614
+ const CHashPair &hp = HashPairs[index];
1615
+ if (hp.IsDir())
1616
+ continue;
1617
+ {
1618
+ NCOM::CPropVariant prop;
1619
+ RINOK(GetDiskProperty->GetDiskProperty(index, kpidSize, &prop))
1620
+ if (prop.vt != VT_UI8)
1621
+ continue;
1622
+ totalSize += prop.uhVal.QuadPart;
1623
+ }
1624
+ }
1625
+ RINOK(extractCallback->SetTotal(totalSize))
1626
+ // RINOK(Hash_SetTotalUnpacked->Hash_SetTotalUnpacked(indices, numItems));
1627
+ }
1628
+ }
1629
+
1630
+ const UInt32 kBufSize = 1 << 15;
1631
+ CHashMidBuf buf;
1632
+ if (!buf.Alloc(kBufSize))
1633
+ return E_OUTOFMEMORY;
1634
+
1635
+ CMyComPtr2_Create<ICompressProgressInfo, CLocalProgress> lps;
1636
+ lps->Init(extractCallback, false);
1637
+
1638
+ for (UInt32 i = 0;; i++)
1639
+ {
1640
+ RINOK(lps->SetCur())
1641
+ if (i >= numItems)
1642
+ break;
1643
+ const UInt32 index = allFilesMode ? i : indices[i];
1644
+
1645
+ CHashPair &hp = HashPairs[index];
1646
+
1647
+ UString path;
1648
+ hp.Get_UString_Path(path);
1649
+
1650
+ CMyComPtr<ISequentialInStream> inStream;
1651
+ const bool isDir = hp.IsDir();
1652
+ if (!isDir)
1653
+ {
1654
+ RINOK(updateCallbackFile->GetStream2(index, &inStream, NUpdateNotifyOp::kHashRead))
1655
+ if (!inStream)
1656
+ {
1657
+ continue; // we have shown error in GetStream2()
1658
+ }
1659
+ // askMode = NArchive::NExtract::NAskMode::kSkip;
1660
+ }
1661
+
1662
+ Int32 askMode = testMode ?
1663
+ NArchive::NExtract::NAskMode::kTest :
1664
+ NArchive::NExtract::NAskMode::kExtract;
1665
+
1666
+ CMyComPtr<ISequentialOutStream> realOutStream;
1667
+ RINOK(extractCallback->GetStream(index, &realOutStream, askMode))
1668
+
1669
+ /* PrepareOperation() can expect kExtract to set
1670
+ Attrib and security of output file */
1671
+ askMode = NArchive::NExtract::NAskMode::kReadExternal;
1672
+
1673
+ RINOK(extractCallback->PrepareOperation(askMode))
1674
+
1675
+ const bool isAltStream = false;
1676
+
1677
+ UInt64 fileSize = 0;
1678
+
1679
+ CHashBundle hb_Loc;
1680
+
1681
+ CHashBundle *hb_Use = &hb_Glob;
1682
+
1683
+ HRESULT res_SetMethods = S_OK;
1684
+
1685
+ UStringVector methods_loc;
1686
+
1687
+ if (!hp.Method.IsEmpty())
1688
+ {
1689
+ hb_Use = &hb_Loc;
1690
+ CMethodId id;
1691
+ AString methodName = hp.Method;
1692
+ Convert_TagName_to_MethodName(methodName);
1693
+ if (FindHashMethod(EXTERNAL_CODECS_LOC_VARS methodName, id))
1694
+ {
1695
+ methods_loc.Add(UString(methodName));
1696
+ RINOK(hb_Loc.SetMethods(
1697
+ EXTERNAL_CODECS_LOC_VARS
1698
+ methods_loc))
1699
+ }
1700
+ else
1701
+ res_SetMethods = E_NOTIMPL;
1702
+ }
1703
+ else if (methods.IsEmpty())
1704
+ {
1705
+ AddDefaultMethod(methods_loc,
1706
+ _method_for_Extraction.IsEmpty() ? NULL :
1707
+ _method_for_Extraction.Ptr(),
1708
+ (unsigned)hp.Hash.Size());
1709
+ if (!methods_loc.IsEmpty())
1710
+ {
1711
+ hb_Use = &hb_Loc;
1712
+ RINOK(hb_Loc.SetMethods(
1713
+ EXTERNAL_CODECS_LOC_VARS
1714
+ methods_loc))
1715
+ }
1716
+ }
1717
+
1718
+ const bool isSupportedMode = hp.IsSupportedMode();
1719
+ hb_Use->InitForNewFile();
1720
+
1721
+ if (inStream)
1722
+ {
1723
+ for (UInt32 step = 0;; step++)
1724
+ {
1725
+ if ((step & 0xFF) == 0)
1726
+ {
1727
+ RINOK(lps.Interface()->SetRatioInfo(NULL, &fileSize))
1728
+ }
1729
+ UInt32 size;
1730
+ RINOK(inStream->Read(buf, kBufSize, &size))
1731
+ if (size == 0)
1732
+ break;
1733
+ hb_Use->Update(buf, size);
1734
+ if (realOutStream)
1735
+ {
1736
+ RINOK(WriteStream(realOutStream, buf, size))
1737
+ }
1738
+ fileSize += size;
1739
+ }
1740
+
1741
+ hp.Size_from_Disk = fileSize;
1742
+ hp.Size_from_Disk_Defined = true;
1743
+ }
1744
+
1745
+ realOutStream.Release();
1746
+ inStream.Release();
1747
+
1748
+ lps->InSize += hp.Hash.Size();
1749
+ lps->OutSize += fileSize;
1750
+
1751
+ hb_Use->Final(isDir, isAltStream, path);
1752
+
1753
+ Int32 opRes = NArchive::NExtract::NOperationResult::kUnsupportedMethod;
1754
+ if (isSupportedMode
1755
+ && res_SetMethods != E_NOTIMPL
1756
+ && !hb_Use->Hashers.IsEmpty()
1757
+ )
1758
+ {
1759
+ const CHasherState &hs = hb_Use->Hashers[0];
1760
+ if (hs.DigestSize == hp.Hash.Size())
1761
+ {
1762
+ opRes = NArchive::NExtract::NOperationResult::kCRCError;
1763
+ if (CheckDigests(hp.Hash, hs.Digests[0], hs.DigestSize))
1764
+ if (!hp.Size_from_Arc_Defined || hp.Size_from_Arc == fileSize)
1765
+ opRes = NArchive::NExtract::NOperationResult::kOK;
1766
+ }
1767
+ }
1768
+
1769
+ RINOK(extractCallback->SetOperationResult(opRes))
1770
+ }
1771
+
1772
+ return S_OK;
1773
+ COM_TRY_END
1774
+ }
1775
+
1776
+
1777
+ // ---------- UPDATE ----------
1778
+
1779
+ struct CUpdateItem
1780
+ {
1781
+ int IndexInArc;
1782
+ unsigned IndexInClient;
1783
+ UInt64 Size;
1784
+ bool NewData;
1785
+ bool NewProps;
1786
+ bool IsDir;
1787
+ UString Path;
1788
+
1789
+ CUpdateItem(): Size(0), IsDir(false) {}
1790
+ };
1791
+
1792
+
1793
+ static HRESULT GetPropString(IArchiveUpdateCallback *callback, UInt32 index, PROPID propId,
1794
+ UString &res,
1795
+ bool convertSlash)
1796
+ {
1797
+ NCOM::CPropVariant prop;
1798
+ RINOK(callback->GetProperty(index, propId, &prop))
1799
+ if (prop.vt == VT_BSTR)
1800
+ {
1801
+ res = prop.bstrVal;
1802
+ if (convertSlash)
1803
+ NArchive::NItemName::ReplaceSlashes_OsToUnix(res);
1804
+ }
1805
+ else if (prop.vt != VT_EMPTY)
1806
+ return E_INVALIDARG;
1807
+ return S_OK;
1808
+ }
1809
+
1810
+
1811
+ Z7_COM7F_IMF(CHandler::GetFileTimeType(UInt32 *type))
1812
+ {
1813
+ *type = NFileTimeType::kUnix;
1814
+ return S_OK;
1815
+ }
1816
+
1817
+
1818
+ Z7_COM7F_IMF(CHandler::UpdateItems(ISequentialOutStream *outStream, UInt32 numItems,
1819
+ IArchiveUpdateCallback *callback))
1820
+ {
1821
+ COM_TRY_BEGIN
1822
+
1823
+ if (_isArc && !CanUpdate())
1824
+ return E_NOTIMPL;
1825
+
1826
+ /*
1827
+ Z7_DECL_CMyComPtr_QI_FROM(IArchiveUpdateCallbackArcProp,
1828
+ reportArcProp, callback)
1829
+ */
1830
+
1831
+ CObjectVector<CUpdateItem> updateItems;
1832
+
1833
+ UInt64 complexity = 0;
1834
+
1835
+ UInt32 i;
1836
+ for (i = 0; i < numItems; i++)
1837
+ {
1838
+ CUpdateItem ui;
1839
+ Int32 newData;
1840
+ Int32 newProps;
1841
+ UInt32 indexInArc;
1842
+
1843
+ if (!callback)
1844
+ return E_FAIL;
1845
+
1846
+ RINOK(callback->GetUpdateItemInfo(i, &newData, &newProps, &indexInArc))
1847
+
1848
+ ui.NewProps = IntToBool(newProps);
1849
+ ui.NewData = IntToBool(newData);
1850
+ ui.IndexInArc = (int)indexInArc;
1851
+ ui.IndexInClient = i;
1852
+ if (IntToBool(newProps))
1853
+ {
1854
+ {
1855
+ NCOM::CPropVariant prop;
1856
+ RINOK(callback->GetProperty(i, kpidIsDir, &prop))
1857
+ if (prop.vt == VT_EMPTY)
1858
+ ui.IsDir = false;
1859
+ else if (prop.vt != VT_BOOL)
1860
+ return E_INVALIDARG;
1861
+ else
1862
+ ui.IsDir = (prop.boolVal != VARIANT_FALSE);
1863
+ }
1864
+
1865
+ RINOK(GetPropString(callback, i, kpidPath, ui.Path,
1866
+ true)) // convertSlash
1867
+ /*
1868
+ if (ui.IsDir && !ui.Name.IsEmpty() && ui.Name.Back() != '/')
1869
+ ui.Name += '/';
1870
+ */
1871
+ }
1872
+
1873
+ if (IntToBool(newData))
1874
+ {
1875
+ NCOM::CPropVariant prop;
1876
+ RINOK(callback->GetProperty(i, kpidSize, &prop))
1877
+ if (prop.vt == VT_UI8)
1878
+ {
1879
+ ui.Size = prop.uhVal.QuadPart;
1880
+ complexity += ui.Size;
1881
+ }
1882
+ else if (prop.vt == VT_EMPTY)
1883
+ ui.Size = (UInt64)(Int64)-1;
1884
+ else
1885
+ return E_INVALIDARG;
1886
+ }
1887
+
1888
+ updateItems.Add(ui);
1889
+ }
1890
+
1891
+ if (complexity != 0)
1892
+ {
1893
+ RINOK(callback->SetTotal(complexity))
1894
+ }
1895
+
1896
+ #ifdef Z7_EXTERNAL_CODECS
1897
+ const CExternalCodecs *_externalCodecs = g_ExternalCodecs_Ptr;
1898
+ #endif
1899
+
1900
+ CHashBundle hb;
1901
+ UStringVector methods;
1902
+ if (!_methods.IsEmpty())
1903
+ {
1904
+ FOR_VECTOR(k, _methods)
1905
+ {
1906
+ methods.Add(_methods[k]);
1907
+ }
1908
+ }
1909
+ else
1910
+ {
1911
+ Z7_DECL_CMyComPtr_QI_FROM(
1912
+ IArchiveGetRootProps,
1913
+ getRootProps, callback)
1914
+ if (getRootProps)
1915
+ {
1916
+ NCOM::CPropVariant prop;
1917
+ RINOK(getRootProps->GetRootProp(kpidArcFileName, &prop))
1918
+ if (prop.vt == VT_BSTR)
1919
+ {
1920
+ AString method;
1921
+ /* const bool isKnownMethod = */ GetMethod_from_FileName(prop.bstrVal, method);
1922
+ if (!method.IsEmpty())
1923
+ {
1924
+ AddDefaultMethod(methods, method, _crcSize_WasSet ? _crcSize : 0);
1925
+ if (methods.IsEmpty())
1926
+ return E_NOTIMPL;
1927
+ }
1928
+ }
1929
+ }
1930
+ }
1931
+ if (methods.IsEmpty() && _crcSize_WasSet)
1932
+ {
1933
+ AddDefaultMethod(methods,
1934
+ NULL, // name
1935
+ _crcSize);
1936
+ }
1937
+
1938
+ RINOK(hb.SetMethods(EXTERNAL_CODECS_LOC_VARS methods))
1939
+
1940
+ CMyComPtr2_Create<ICompressProgressInfo, CLocalProgress> lps;
1941
+ lps->Init(callback, true);
1942
+
1943
+ const UInt32 kBufSize = 1 << 15;
1944
+ CHashMidBuf buf;
1945
+ if (!buf.Alloc(kBufSize))
1946
+ return E_OUTOFMEMORY;
1947
+
1948
+ CDynLimBuf hashFileString((size_t)1 << 31);
1949
+
1950
+ CHashOptionsLocal options = _options;
1951
+
1952
+ if (_isArc)
1953
+ {
1954
+ if (!options.HashMode_Zero.Def && _is_ZeroMode)
1955
+ options.HashMode_Zero.Val = true;
1956
+ if (!options.HashMode_Tag.Def && _are_there_Tags)
1957
+ options.HashMode_Tag.Val = true;
1958
+ if (!options.HashMode_Dirs.Def && _are_there_Dirs)
1959
+ options.HashMode_Dirs.Val = true;
1960
+ }
1961
+ if (options.HashMode_OnlyHash.Val && updateItems.Size() != 1)
1962
+ options.HashMode_OnlyHash.Val = false;
1963
+
1964
+ complexity = 0;
1965
+
1966
+ for (i = 0; i < updateItems.Size(); i++)
1967
+ {
1968
+ lps->InSize = complexity;
1969
+ RINOK(lps->SetCur())
1970
+
1971
+ const CUpdateItem &ui = updateItems[i];
1972
+
1973
+ /*
1974
+ CHashPair item;
1975
+ if (!ui.NewProps)
1976
+ item = HashPairs[(unsigned)ui.IndexInArc];
1977
+ */
1978
+
1979
+ if (ui.NewData)
1980
+ {
1981
+ UInt64 currentComplexity = ui.Size;
1982
+ UInt64 fileSize = 0;
1983
+
1984
+ CMyComPtr<ISequentialInStream> fileInStream;
1985
+ bool needWrite = true;
1986
+ {
1987
+ HRESULT res = callback->GetStream(ui.IndexInClient, &fileInStream);
1988
+
1989
+ if (res == S_FALSE)
1990
+ needWrite = false;
1991
+ else
1992
+ {
1993
+ RINOK(res)
1994
+
1995
+ if (fileInStream)
1996
+ {
1997
+ Z7_DECL_CMyComPtr_QI_FROM(
1998
+ IStreamGetSize,
1999
+ streamGetSize, fileInStream)
2000
+ if (streamGetSize)
2001
+ {
2002
+ UInt64 size;
2003
+ if (streamGetSize->GetSize(&size) == S_OK)
2004
+ currentComplexity = size;
2005
+ }
2006
+ /*
2007
+ Z7_DECL_CMyComPtr_QI_FROM(
2008
+ IStreamGetProps,
2009
+ getProps, fileInStream)
2010
+ if (getProps)
2011
+ {
2012
+ FILETIME mTime;
2013
+ UInt64 size2;
2014
+ if (getProps->GetProps(&size2, NULL, NULL, &mTime, NULL) == S_OK)
2015
+ {
2016
+ currentComplexity = size2;
2017
+ // item.MTime = NTime::FileTimeToUnixTime64(mTime);;
2018
+ }
2019
+ }
2020
+ */
2021
+ }
2022
+ else
2023
+ {
2024
+ currentComplexity = 0;
2025
+ }
2026
+ }
2027
+ }
2028
+
2029
+ hb.InitForNewFile();
2030
+ const bool isDir = ui.IsDir;
2031
+
2032
+ if (needWrite && fileInStream && !isDir)
2033
+ {
2034
+ for (UInt32 step = 0;; step++)
2035
+ {
2036
+ if ((step & 0xFF) == 0)
2037
+ {
2038
+ RINOK(lps.Interface()->SetRatioInfo(&fileSize, NULL))
2039
+ // RINOK(callback->SetCompleted(&completeValue));
2040
+ }
2041
+ UInt32 size;
2042
+ RINOK(fileInStream->Read(buf, kBufSize, &size))
2043
+ if (size == 0)
2044
+ break;
2045
+ hb.Update(buf, size);
2046
+ fileSize += size;
2047
+ }
2048
+ currentComplexity = fileSize;
2049
+ }
2050
+
2051
+ fileInStream.Release();
2052
+ const bool isAltStream = false;
2053
+ hb.Final(isDir, isAltStream, ui.Path);
2054
+
2055
+ if (options.HashMode_Dirs.Val || !isDir)
2056
+ {
2057
+ if (!hb.Hashers.IsEmpty())
2058
+ lps->OutSize += hb.Hashers[0].DigestSize;
2059
+ WriteLine(hashFileString,
2060
+ options,
2061
+ ui.Path,
2062
+ isDir,
2063
+ hb);
2064
+ if (hashFileString.IsError())
2065
+ return E_OUTOFMEMORY;
2066
+ }
2067
+
2068
+ complexity += currentComplexity;
2069
+
2070
+ /*
2071
+ if (reportArcProp)
2072
+ {
2073
+ PROPVARIANT prop;
2074
+ prop.vt = VT_EMPTY;
2075
+ prop.wReserved1 = 0;
2076
+
2077
+ NCOM::PropVarEm_Set_UInt64(&prop, fileSize);
2078
+ RINOK(reportArcProp->ReportProp(NArchive::NEventIndexType::kOutArcIndex, ui.IndexInClient, kpidSize, &prop));
2079
+
2080
+ for (unsigned k = 0; k < hb.Hashers.Size(); k++)
2081
+ {
2082
+ const CHasherState &hs = hb.Hashers[k];
2083
+
2084
+ if (hs.DigestSize == 4 && hs.Name.IsEqualTo_Ascii_NoCase("crc32"))
2085
+ {
2086
+ NCOM::PropVarEm_Set_UInt32(&prop, GetUi32(hs.Digests[k_HashCalc_Index_Current]));
2087
+ RINOK(reportArcProp->ReportProp(NArchive::NEventIndexType::kOutArcIndex, ui.IndexInClient, kpidCRC, &prop));
2088
+ }
2089
+ else
2090
+ {
2091
+ RINOK(reportArcProp->ReportRawProp(NArchive::NEventIndexType::kOutArcIndex, ui.IndexInClient,
2092
+ kpidChecksum, hs.Digests[k_HashCalc_Index_Current],
2093
+ hs.DigestSize, NPropDataType::kRaw));
2094
+ }
2095
+ RINOK(reportArcProp->ReportFinished(NArchive::NEventIndexType::kOutArcIndex, ui.IndexInClient, NArchive::NUpdate::NOperationResult::kOK));
2096
+ }
2097
+ }
2098
+ */
2099
+ RINOK(callback->SetOperationResult(NArchive::NUpdate::NOperationResult::kOK))
2100
+ }
2101
+ else
2102
+ {
2103
+ // old data
2104
+ const CHashPair &existItem = HashPairs[(unsigned)ui.IndexInArc];
2105
+ if (ui.NewProps)
2106
+ {
2107
+ WriteLine(hashFileString,
2108
+ options,
2109
+ ui.Path,
2110
+ ui.IsDir,
2111
+ existItem.Method, existItem.HashString
2112
+ );
2113
+ }
2114
+ else
2115
+ {
2116
+ hashFileString += existItem.FullLine;
2117
+ Add_LF(hashFileString, options);
2118
+ }
2119
+ }
2120
+ if (hashFileString.IsError())
2121
+ return E_OUTOFMEMORY;
2122
+ }
2123
+
2124
+ RINOK(WriteStream(outStream, hashFileString, hashFileString.Len()))
2125
+
2126
+ return S_OK;
2127
+ COM_TRY_END
2128
+ }
2129
+
2130
+
2131
+
2132
+ HRESULT CHandler::SetProperty(const wchar_t *nameSpec, const PROPVARIANT &value)
2133
+ {
2134
+ UString name = nameSpec;
2135
+ name.MakeLower_Ascii();
2136
+ if (name.IsEmpty())
2137
+ return E_INVALIDARG;
2138
+
2139
+ if (name.IsEqualTo("m")) // "hm" hash method
2140
+ {
2141
+ // COneMethodInfo omi;
2142
+ // RINOK(omi.ParseMethodFromPROPVARIANT(L"", value));
2143
+ // _methods.Add(omi.MethodName); // change it. use omi.PropsString
2144
+ if (value.vt != VT_BSTR)
2145
+ return E_INVALIDARG;
2146
+ UString s (value.bstrVal);
2147
+ _methods.Add(s);
2148
+ return S_OK;
2149
+ }
2150
+
2151
+ if (name.IsEqualTo("flags"))
2152
+ {
2153
+ if (value.vt != VT_BSTR)
2154
+ return E_INVALIDARG;
2155
+ if (!_options.ParseString(value.bstrVal))
2156
+ return E_INVALIDARG;
2157
+ return S_OK;
2158
+ }
2159
+
2160
+ if (name.IsEqualTo("backslash"))
2161
+ return PROPVARIANT_to_bool(value, _supportWindowsBackslash);
2162
+
2163
+ if (name.IsPrefixedBy_Ascii_NoCase("crc"))
2164
+ {
2165
+ name.Delete(0, 3);
2166
+ _crcSize = 4;
2167
+ _crcSize_WasSet = true;
2168
+ return ParsePropToUInt32(name, value, _crcSize);
2169
+ }
2170
+
2171
+ // common properties
2172
+ if (name.IsPrefixedBy_Ascii_NoCase("mt")
2173
+ || name.IsPrefixedBy_Ascii_NoCase("memuse"))
2174
+ return S_OK;
2175
+
2176
+ return E_INVALIDARG;
2177
+ }
2178
+
2179
+
2180
+ void CHandler::InitProps()
2181
+ {
2182
+ _supportWindowsBackslash = true;
2183
+ _crcSize_WasSet = false;
2184
+ _crcSize = 4;
2185
+ _methods.Clear();
2186
+ _options.Init_HashOptionsLocal();
2187
+ }
2188
+
2189
+ Z7_COM7F_IMF(CHandler::SetProperties(const wchar_t * const *names, const PROPVARIANT *values, UInt32 numProps))
2190
+ {
2191
+ COM_TRY_BEGIN
2192
+
2193
+ InitProps();
2194
+
2195
+ for (UInt32 i = 0; i < numProps; i++)
2196
+ {
2197
+ RINOK(SetProperty(names[i], values[i]))
2198
+ }
2199
+ return S_OK;
2200
+ COM_TRY_END
2201
+ }
2202
+
2203
+ CHandler::CHandler()
2204
+ {
2205
+ ClearVars();
2206
+ InitProps();
2207
+ }
2208
+
2209
+ }
2210
+
2211
+
2212
+
2213
+ static IInArchive *CreateHashHandler_In() { return new NHash::CHandler; }
2214
+ static IOutArchive *CreateHashHandler_Out() { return new NHash::CHandler; }
2215
+
2216
+ void Codecs_AddHashArcHandler(CCodecs *codecs)
2217
+ {
2218
+ {
2219
+ CArcInfoEx item;
2220
+
2221
+ item.Name = "Hash";
2222
+ item.CreateInArchive = CreateHashHandler_In;
2223
+ item.CreateOutArchive = CreateHashHandler_Out;
2224
+ item.IsArcFunc = NULL;
2225
+ item.Flags =
2226
+ NArcInfoFlags::kKeepName
2227
+ | NArcInfoFlags::kStartOpen
2228
+ | NArcInfoFlags::kByExtOnlyOpen
2229
+ // | NArcInfoFlags::kPureStartOpen
2230
+ | NArcInfoFlags::kHashHandler
2231
+ ;
2232
+
2233
+ // ubuntu uses "SHA256SUMS" file
2234
+ item.AddExts(UString (
2235
+ "sha256"
2236
+ " sha512"
2237
+ " sha384"
2238
+ " sha224"
2239
+ " sha512-224"
2240
+ " sha512-256"
2241
+ " sha3-224"
2242
+ " sha3-256"
2243
+ " sha3-384"
2244
+ " sha3-512"
2245
+ // " shake128"
2246
+ // " shake256"
2247
+ " sha1"
2248
+ " sha2"
2249
+ " sha3"
2250
+ " sha"
2251
+ " md5"
2252
+ " blake2s"
2253
+ " blake2b"
2254
+ " blake2sp"
2255
+ " xxh64"
2256
+ " crc32"
2257
+ " crc64"
2258
+ " cksum"
2259
+ " asc"
2260
+ // " b2sum"
2261
+ ),
2262
+ UString());
2263
+
2264
+ item.UpdateEnabled = (item.CreateOutArchive != NULL);
2265
+ item.SignatureOffset = 0;
2266
+ // item.Version = MY_VER_MIX;
2267
+ item.NewInterface = true;
2268
+
2269
+ item.Signatures.AddNew().CopyFrom(NULL, 0);
2270
+
2271
+ codecs->Formats.Add(item);
2272
+ }
2273
+ }