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,2672 @@
1
+ /* Blake2s.c -- BLAKE2sp Hash
2
+ 2024-05-18 : Igor Pavlov : Public domain
3
+ 2015-2019 : Samuel Neves : original code : CC0 1.0 Universal (CC0 1.0). */
4
+
5
+ #include "Precomp.h"
6
+
7
+ // #include <stdio.h>
8
+ #include <string.h>
9
+
10
+ #include "Blake2.h"
11
+ #include "RotateDefs.h"
12
+ #include "Compiler.h"
13
+ #include "CpuArch.h"
14
+
15
+ /*
16
+ if defined(__AVX512F__) && defined(__AVX512VL__)
17
+ {
18
+ we define Z7_BLAKE2S_USE_AVX512_ALWAYS,
19
+ but the compiler can use avx512 for any code.
20
+ }
21
+ else if defined(Z7_BLAKE2S_USE_AVX512_ALWAYS)
22
+ { we use avx512 only for sse* and avx* branches of code. }
23
+ */
24
+ // #define Z7_BLAKE2S_USE_AVX512_ALWAYS // for debug
25
+
26
+ #if defined(__SSE2__)
27
+ #define Z7_BLAKE2S_USE_VECTORS
28
+ #elif defined(MY_CPU_X86_OR_AMD64)
29
+ #if defined(_MSC_VER) && _MSC_VER > 1200 \
30
+ || defined(Z7_GCC_VERSION) && (Z7_GCC_VERSION >= 30300) \
31
+ || defined(__clang__) \
32
+ || defined(__INTEL_COMPILER)
33
+ #define Z7_BLAKE2S_USE_VECTORS
34
+ #endif
35
+ #endif
36
+
37
+ #ifdef Z7_BLAKE2S_USE_VECTORS
38
+
39
+ #define Z7_BLAKE2SP_USE_FUNCTIONS
40
+
41
+ // define Z7_BLAKE2SP_STRUCT_IS_NOT_ALIGNED, if CBlake2sp can be non aligned for 32-bytes.
42
+ // #define Z7_BLAKE2SP_STRUCT_IS_NOT_ALIGNED
43
+
44
+ // SSSE3 : for _mm_shuffle_epi8 (pshufb) that improves the performance for 5-15%.
45
+ #if defined(__SSSE3__)
46
+ #define Z7_BLAKE2S_USE_SSSE3
47
+ #elif defined(Z7_MSC_VER_ORIGINAL) && (Z7_MSC_VER_ORIGINAL >= 1500) \
48
+ || defined(Z7_GCC_VERSION) && (Z7_GCC_VERSION >= 40300) \
49
+ || defined(Z7_APPLE_CLANG_VERSION) && (Z7_APPLE_CLANG_VERSION >= 40000) \
50
+ || defined(Z7_LLVM_CLANG_VERSION) && (Z7_LLVM_CLANG_VERSION >= 20300) \
51
+ || defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 1000)
52
+ #define Z7_BLAKE2S_USE_SSSE3
53
+ #endif
54
+
55
+ #ifdef Z7_BLAKE2S_USE_SSSE3
56
+ /* SSE41 : for _mm_insert_epi32 (pinsrd)
57
+ it can slightly reduce code size and improves the performance in some cases.
58
+ it's used only for last 512-1024 bytes, if FAST versions (2 or 3) of vector algos are used.
59
+ it can be used for all blocks in another algos (4+).
60
+ */
61
+ #if defined(__SSE4_1__)
62
+ #define Z7_BLAKE2S_USE_SSE41
63
+ #elif defined(Z7_MSC_VER_ORIGINAL) && (Z7_MSC_VER_ORIGINAL >= 1500) \
64
+ || defined(Z7_GCC_VERSION) && (Z7_GCC_VERSION >= 40300) \
65
+ || defined(Z7_APPLE_CLANG_VERSION) && (Z7_APPLE_CLANG_VERSION >= 40000) \
66
+ || defined(Z7_LLVM_CLANG_VERSION) && (Z7_LLVM_CLANG_VERSION >= 20300) \
67
+ || defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 1000)
68
+ #define Z7_BLAKE2S_USE_SSE41
69
+ #endif
70
+ #endif // SSSE3
71
+
72
+ #if defined(__GNUC__) || defined(__clang__)
73
+ #if defined(Z7_BLAKE2S_USE_AVX512_ALWAYS) && !(defined(__AVX512F__) && defined(__AVX512VL__))
74
+ #define BLAKE2S_ATTRIB_128BIT __attribute__((__target__("avx512vl,avx512f")))
75
+ #else
76
+ #if defined(Z7_BLAKE2S_USE_SSE41)
77
+ #define BLAKE2S_ATTRIB_128BIT __attribute__((__target__("sse4.1")))
78
+ #elif defined(Z7_BLAKE2S_USE_SSSE3)
79
+ #define BLAKE2S_ATTRIB_128BIT __attribute__((__target__("ssse3")))
80
+ #else
81
+ #define BLAKE2S_ATTRIB_128BIT __attribute__((__target__("sse2")))
82
+ #endif
83
+ #endif
84
+ #endif
85
+
86
+
87
+ #if defined(__AVX2__)
88
+ #define Z7_BLAKE2S_USE_AVX2
89
+ #else
90
+ #if defined(Z7_GCC_VERSION) && (Z7_GCC_VERSION >= 40900) \
91
+ || defined(Z7_APPLE_CLANG_VERSION) && (Z7_APPLE_CLANG_VERSION >= 40600) \
92
+ || defined(Z7_LLVM_CLANG_VERSION) && (Z7_LLVM_CLANG_VERSION >= 30100)
93
+ #define Z7_BLAKE2S_USE_AVX2
94
+ #ifdef Z7_BLAKE2S_USE_AVX2
95
+ #if defined(Z7_BLAKE2S_USE_AVX512_ALWAYS) && !(defined(__AVX512F__) && defined(__AVX512VL__))
96
+ #define BLAKE2S_ATTRIB_AVX2 __attribute__((__target__("avx512vl,avx512f")))
97
+ #else
98
+ #define BLAKE2S_ATTRIB_AVX2 __attribute__((__target__("avx2")))
99
+ #endif
100
+ #endif
101
+ #elif defined(Z7_MSC_VER_ORIGINAL) && (Z7_MSC_VER_ORIGINAL >= 1800) \
102
+ || defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 1400)
103
+ #if (Z7_MSC_VER_ORIGINAL == 1900)
104
+ #pragma warning(disable : 4752) // found Intel(R) Advanced Vector Extensions; consider using /arch:AVX
105
+ #endif
106
+ #define Z7_BLAKE2S_USE_AVX2
107
+ #endif
108
+ #endif
109
+
110
+ #ifdef Z7_BLAKE2S_USE_SSE41
111
+ #include <smmintrin.h> // SSE4.1
112
+ #elif defined(Z7_BLAKE2S_USE_SSSE3)
113
+ #include <tmmintrin.h> // SSSE3
114
+ #else
115
+ #include <emmintrin.h> // SSE2
116
+ #endif
117
+
118
+ #ifdef Z7_BLAKE2S_USE_AVX2
119
+ #include <immintrin.h>
120
+ #if defined(__clang__)
121
+ #include <avxintrin.h>
122
+ #include <avx2intrin.h>
123
+ #endif
124
+ #endif // avx2
125
+
126
+
127
+ #if defined(__AVX512F__) && defined(__AVX512VL__)
128
+ // && defined(Z7_MSC_VER_ORIGINAL) && (Z7_MSC_VER_ORIGINAL > 1930)
129
+ #ifndef Z7_BLAKE2S_USE_AVX512_ALWAYS
130
+ #define Z7_BLAKE2S_USE_AVX512_ALWAYS
131
+ #endif
132
+ // #pragma message ("=== Blake2s AVX512")
133
+ #endif
134
+
135
+
136
+ #define Z7_BLAKE2S_USE_V128_FAST
137
+ // for speed optimization for small messages:
138
+ // #define Z7_BLAKE2S_USE_V128_WAY2
139
+
140
+ #ifdef Z7_BLAKE2S_USE_AVX2
141
+
142
+ // for debug:
143
+ // gather is slow
144
+ // #define Z7_BLAKE2S_USE_GATHER
145
+
146
+ #define Z7_BLAKE2S_USE_AVX2_FAST
147
+ // for speed optimization for small messages:
148
+ // #define Z7_BLAKE2S_USE_AVX2_WAY2
149
+ // #define Z7_BLAKE2S_USE_AVX2_WAY4
150
+ #if defined(Z7_BLAKE2S_USE_AVX2_WAY2) || \
151
+ defined(Z7_BLAKE2S_USE_AVX2_WAY4)
152
+ #define Z7_BLAKE2S_USE_AVX2_WAY_SLOW
153
+ #endif
154
+ #endif
155
+
156
+ #define Z7_BLAKE2SP_ALGO_DEFAULT 0
157
+ #define Z7_BLAKE2SP_ALGO_SCALAR 1
158
+ #ifdef Z7_BLAKE2S_USE_V128_FAST
159
+ #define Z7_BLAKE2SP_ALGO_V128_FAST 2
160
+ #endif
161
+ #ifdef Z7_BLAKE2S_USE_AVX2_FAST
162
+ #define Z7_BLAKE2SP_ALGO_V256_FAST 3
163
+ #endif
164
+ #define Z7_BLAKE2SP_ALGO_V128_WAY1 4
165
+ #ifdef Z7_BLAKE2S_USE_V128_WAY2
166
+ #define Z7_BLAKE2SP_ALGO_V128_WAY2 5
167
+ #endif
168
+ #ifdef Z7_BLAKE2S_USE_AVX2_WAY2
169
+ #define Z7_BLAKE2SP_ALGO_V256_WAY2 6
170
+ #endif
171
+ #ifdef Z7_BLAKE2S_USE_AVX2_WAY4
172
+ #define Z7_BLAKE2SP_ALGO_V256_WAY4 7
173
+ #endif
174
+
175
+ #endif // Z7_BLAKE2S_USE_VECTORS
176
+
177
+
178
+
179
+
180
+ #define BLAKE2S_FINAL_FLAG (~(UInt32)0)
181
+ #define NSW Z7_BLAKE2SP_NUM_STRUCT_WORDS
182
+ #define SUPER_BLOCK_SIZE (Z7_BLAKE2S_BLOCK_SIZE * Z7_BLAKE2SP_PARALLEL_DEGREE)
183
+ #define SUPER_BLOCK_MASK (SUPER_BLOCK_SIZE - 1)
184
+
185
+ #define V_INDEX_0_0 0
186
+ #define V_INDEX_1_0 1
187
+ #define V_INDEX_2_0 2
188
+ #define V_INDEX_3_0 3
189
+ #define V_INDEX_0_1 4
190
+ #define V_INDEX_1_1 5
191
+ #define V_INDEX_2_1 6
192
+ #define V_INDEX_3_1 7
193
+ #define V_INDEX_0_2 8
194
+ #define V_INDEX_1_2 9
195
+ #define V_INDEX_2_2 10
196
+ #define V_INDEX_3_2 11
197
+ #define V_INDEX_0_3 12
198
+ #define V_INDEX_1_3 13
199
+ #define V_INDEX_2_3 14
200
+ #define V_INDEX_3_3 15
201
+ #define V_INDEX_4_0 0
202
+ #define V_INDEX_5_0 1
203
+ #define V_INDEX_6_0 2
204
+ #define V_INDEX_7_0 3
205
+ #define V_INDEX_7_1 4
206
+ #define V_INDEX_4_1 5
207
+ #define V_INDEX_5_1 6
208
+ #define V_INDEX_6_1 7
209
+ #define V_INDEX_6_2 8
210
+ #define V_INDEX_7_2 9
211
+ #define V_INDEX_4_2 10
212
+ #define V_INDEX_5_2 11
213
+ #define V_INDEX_5_3 12
214
+ #define V_INDEX_6_3 13
215
+ #define V_INDEX_7_3 14
216
+ #define V_INDEX_4_3 15
217
+
218
+ #define V(row, col) v[V_INDEX_ ## row ## _ ## col]
219
+
220
+ #define k_Blake2s_IV_0 0x6A09E667UL
221
+ #define k_Blake2s_IV_1 0xBB67AE85UL
222
+ #define k_Blake2s_IV_2 0x3C6EF372UL
223
+ #define k_Blake2s_IV_3 0xA54FF53AUL
224
+ #define k_Blake2s_IV_4 0x510E527FUL
225
+ #define k_Blake2s_IV_5 0x9B05688CUL
226
+ #define k_Blake2s_IV_6 0x1F83D9ABUL
227
+ #define k_Blake2s_IV_7 0x5BE0CD19UL
228
+
229
+ #define KIV(n) (k_Blake2s_IV_## n)
230
+
231
+ #ifdef Z7_BLAKE2S_USE_VECTORS
232
+ MY_ALIGN(16)
233
+ static const UInt32 k_Blake2s_IV[8] =
234
+ {
235
+ KIV(0), KIV(1), KIV(2), KIV(3), KIV(4), KIV(5), KIV(6), KIV(7)
236
+ };
237
+ #endif
238
+
239
+ #define STATE_T(s) ((s) + 8)
240
+ #define STATE_F(s) ((s) + 10)
241
+
242
+ #ifdef Z7_BLAKE2S_USE_VECTORS
243
+
244
+ #define LOAD_128(p) _mm_load_si128 ((const __m128i *)(const void *)(p))
245
+ #define LOADU_128(p) _mm_loadu_si128((const __m128i *)(const void *)(p))
246
+ #ifdef Z7_BLAKE2SP_STRUCT_IS_NOT_ALIGNED
247
+ // here we use unaligned load and stores
248
+ // use this branch if CBlake2sp can be unaligned for 16 bytes
249
+ #define STOREU_128(p, r) _mm_storeu_si128((__m128i *)(void *)(p), r)
250
+ #define LOAD_128_FROM_STRUCT(p) LOADU_128(p)
251
+ #define STORE_128_TO_STRUCT(p, r) STOREU_128(p, r)
252
+ #else
253
+ // here we use aligned load and stores
254
+ // use this branch if CBlake2sp is aligned for 16 bytes
255
+ #define STORE_128(p, r) _mm_store_si128((__m128i *)(void *)(p), r)
256
+ #define LOAD_128_FROM_STRUCT(p) LOAD_128(p)
257
+ #define STORE_128_TO_STRUCT(p, r) STORE_128(p, r)
258
+ #endif
259
+
260
+ #endif // Z7_BLAKE2S_USE_VECTORS
261
+
262
+
263
+ #if 0
264
+ static void PrintState(const UInt32 *s, unsigned num)
265
+ {
266
+ unsigned i;
267
+ printf("\n");
268
+ for (i = 0; i < num; i++)
269
+ printf(" %08x", (unsigned)s[i]);
270
+ }
271
+ static void PrintStates2(const UInt32 *s, unsigned x, unsigned y)
272
+ {
273
+ unsigned i;
274
+ for (i = 0; i < y; i++)
275
+ PrintState(s + i * x, x);
276
+ printf("\n");
277
+ }
278
+ #endif
279
+
280
+
281
+ #define REP8_MACRO(m) { m(0) m(1) m(2) m(3) m(4) m(5) m(6) m(7) }
282
+
283
+ #define BLAKE2S_NUM_ROUNDS 10
284
+
285
+ #if defined(Z7_BLAKE2S_USE_VECTORS)
286
+ #define ROUNDS_LOOP(mac) \
287
+ { unsigned r; for (r = 0; r < BLAKE2S_NUM_ROUNDS; r++) mac(r) }
288
+ #endif
289
+ /*
290
+ #define ROUNDS_LOOP_2(mac) \
291
+ { unsigned r; for (r = 0; r < BLAKE2S_NUM_ROUNDS; r += 2) { mac(r) mac(r + 1) } }
292
+ */
293
+ #if 0 || 1 && !defined(Z7_BLAKE2S_USE_VECTORS)
294
+ #define ROUNDS_LOOP_UNROLLED(m) \
295
+ { m(0) m(1) m(2) m(3) m(4) m(5) m(6) m(7) m(8) m(9) }
296
+ #endif
297
+
298
+ #define SIGMA_TABLE(M) \
299
+ M( 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 ), \
300
+ M( 14, 10, 4, 8, 9, 15, 13, 6, 1, 12, 0, 2, 11, 7, 5, 3 ), \
301
+ M( 11, 8, 12, 0, 5, 2, 15, 13, 10, 14, 3, 6, 7, 1, 9, 4 ), \
302
+ M( 7, 9, 3, 1, 13, 12, 11, 14, 2, 6, 5, 10, 4, 0, 15, 8 ), \
303
+ M( 9, 0, 5, 7, 2, 4, 10, 15, 14, 1, 11, 12, 6, 8, 3, 13 ), \
304
+ M( 2, 12, 6, 10, 0, 11, 8, 3, 4, 13, 7, 5, 15, 14, 1, 9 ), \
305
+ M( 12, 5, 1, 15, 14, 13, 4, 10, 0, 7, 6, 3, 9, 2, 8, 11 ), \
306
+ M( 13, 11, 7, 14, 12, 1, 3, 9, 5, 0, 15, 4, 8, 6, 2, 10 ), \
307
+ M( 6, 15, 14, 9, 11, 3, 0, 8, 12, 2, 13, 7, 1, 4, 10, 5 ), \
308
+ M( 10, 2, 8, 4, 7, 6, 1, 5, 15, 11, 9, 14, 3, 12, 13, 0 )
309
+
310
+ #define SIGMA_TABLE_MULT(m, a0,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15) \
311
+ { a0*m,a1*m,a2*m,a3*m,a4*m,a5*m,a6*m,a7*m,a8*m,a9*m,a10*m,a11*m,a12*m,a13*m,a14*m,a15*m }
312
+ #define SIGMA_TABLE_MULT_4( a0,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15) \
313
+ SIGMA_TABLE_MULT(4, a0,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15)
314
+
315
+ // MY_ALIGN(32)
316
+ MY_ALIGN(16)
317
+ static const Byte k_Blake2s_Sigma_4[BLAKE2S_NUM_ROUNDS][16] =
318
+ { SIGMA_TABLE(SIGMA_TABLE_MULT_4) };
319
+
320
+ #define GET_SIGMA_PTR(p, index) \
321
+ ((const void *)((const Byte *)(const void *)(p) + (index)))
322
+
323
+ #define GET_STATE_TABLE_PTR_FROM_BYTE_POS(s, pos) \
324
+ ((UInt32 *)(void *)((Byte *)(void *)(s) + (pos)))
325
+
326
+
327
+ #ifdef Z7_BLAKE2S_USE_VECTORS
328
+
329
+
330
+ #if 0
331
+ // use loading constants from memory
332
+ // is faster for some compilers.
333
+ #define KK4(n) KIV(n), KIV(n), KIV(n), KIV(n)
334
+ MY_ALIGN(64)
335
+ static const UInt32 k_Blake2s_IV_WAY4[]=
336
+ {
337
+ KK4(0), KK4(1), KK4(2), KK4(3), KK4(4), KK4(5), KK4(6), KK4(7)
338
+ };
339
+ #define GET_128_IV_WAY4(i) LOAD_128(k_Blake2s_IV_WAY4 + 4 * (i))
340
+ #else
341
+ // use constant generation:
342
+ #define GET_128_IV_WAY4(i) _mm_set1_epi32((Int32)KIV(i))
343
+ #endif
344
+
345
+
346
+ #ifdef Z7_BLAKE2S_USE_AVX2_WAY_SLOW
347
+ #define GET_CONST_128_FROM_ARRAY32(k) \
348
+ _mm_set_epi32((Int32)(k)[3], (Int32)(k)[2], (Int32)(k)[1], (Int32)(k)[0])
349
+ #endif
350
+
351
+
352
+ #if 0
353
+ #define k_r8 _mm_set_epi8(12, 15, 14, 13, 8, 11, 10, 9, 4, 7, 6, 5, 0, 3, 2, 1)
354
+ #define k_r16 _mm_set_epi8(13, 12, 15, 14, 9, 8, 11, 10, 5, 4, 7, 6, 1, 0, 3, 2)
355
+ #define k_inc _mm_set_epi32(0, 0, 0, Z7_BLAKE2S_BLOCK_SIZE)
356
+ #define k_iv0_128 GET_CONST_128_FROM_ARRAY32(k_Blake2s_IV + 0)
357
+ #define k_iv4_128 GET_CONST_128_FROM_ARRAY32(k_Blake2s_IV + 4)
358
+ #else
359
+ #if defined(Z7_BLAKE2S_USE_SSSE3) && \
360
+ !defined(Z7_BLAKE2S_USE_AVX512_ALWAYS)
361
+ MY_ALIGN(16) static const Byte k_r8_arr [16] = { 1, 2, 3, 0, 5, 6, 7, 4, 9, 10, 11, 8 ,13, 14, 15, 12 };
362
+ MY_ALIGN(16) static const Byte k_r16_arr[16] = { 2, 3, 0, 1, 6, 7, 4, 5, 10, 11, 8, 9, 14, 15, 12, 13 };
363
+ #define k_r8 LOAD_128(k_r8_arr)
364
+ #define k_r16 LOAD_128(k_r16_arr)
365
+ #endif
366
+ MY_ALIGN(16) static const UInt32 k_inc_arr[4] = { Z7_BLAKE2S_BLOCK_SIZE, 0, 0, 0 };
367
+ #define k_inc LOAD_128(k_inc_arr)
368
+ #define k_iv0_128 LOAD_128(k_Blake2s_IV + 0)
369
+ #define k_iv4_128 LOAD_128(k_Blake2s_IV + 4)
370
+ #endif
371
+
372
+
373
+ #ifdef Z7_BLAKE2S_USE_AVX2_WAY_SLOW
374
+
375
+ #ifdef Z7_BLAKE2S_USE_AVX2
376
+ #if defined(Z7_GCC_VERSION) && (Z7_GCC_VERSION < 80000)
377
+ #define MY_mm256_set_m128i(hi, lo) _mm256_insertf128_si256(_mm256_castsi128_si256(lo), (hi), 1)
378
+ #else
379
+ #define MY_mm256_set_m128i _mm256_set_m128i
380
+ #endif
381
+
382
+ #define SET_FROM_128(a) MY_mm256_set_m128i(a, a)
383
+
384
+ #ifndef Z7_BLAKE2S_USE_AVX512_ALWAYS
385
+ MY_ALIGN(32) static const Byte k_r8_arr_256 [32] =
386
+ {
387
+ 1, 2, 3, 0, 5, 6, 7, 4, 9, 10, 11, 8 ,13, 14, 15, 12,
388
+ 1, 2, 3, 0, 5, 6, 7, 4, 9, 10, 11, 8 ,13, 14, 15, 12
389
+ };
390
+ MY_ALIGN(32) static const Byte k_r16_arr_256[32] =
391
+ {
392
+ 2, 3, 0, 1, 6, 7, 4, 5, 10, 11, 8, 9, 14, 15, 12, 13,
393
+ 2, 3, 0, 1, 6, 7, 4, 5, 10, 11, 8, 9, 14, 15, 12, 13
394
+ };
395
+ #define k_r8_256 LOAD_256(k_r8_arr_256)
396
+ #define k_r16_256 LOAD_256(k_r16_arr_256)
397
+ #endif
398
+
399
+ // #define k_r8_256 SET_FROM_128(_mm_set_epi8(12, 15, 14, 13, 8, 11, 10, 9, 4, 7, 6, 5, 0, 3, 2, 1))
400
+ // #define k_r16_256 SET_FROM_128(_mm_set_epi8(13, 12, 15, 14, 9, 8, 11, 10, 5, 4, 7, 6, 1, 0, 3, 2))
401
+ // #define k_inc_256 SET_FROM_128(_mm_set_epi32(0, 0, 0, Z7_BLAKE2S_BLOCK_SIZE))
402
+ // #define k_iv0_256 SET_FROM_128(GET_CONST_128_FROM_ARRAY32(k_Blake2s_IV + 0))
403
+ #define k_iv4_256 SET_FROM_128(GET_CONST_128_FROM_ARRAY32(k_Blake2s_IV + 4))
404
+ #endif // Z7_BLAKE2S_USE_AVX2_WAY_SLOW
405
+ #endif
406
+
407
+
408
+ /*
409
+ IPC(TP) ports:
410
+ 1 p__5 : skl- : SSE : shufps : _mm_shuffle_ps
411
+ 2 p_15 : icl+
412
+ 1 p__5 : nhm-bdw : SSE : xorps : _mm_xor_ps
413
+ 3 p015 : skl+
414
+
415
+ 3 p015 : SSE2 : pxor : _mm_xor_si128
416
+ 2 p_15: snb-bdw : SSE2 : padd : _mm_add_epi32
417
+ 2 p0_5: mrm-wsm :
418
+ 3 p015 : skl+
419
+
420
+ 2 p_15 : ivb-,icl+ : SSE2 : punpcklqdq, punpckhqdq, punpckldq, punpckhdq
421
+ 2 p_15 : : SSE2 : pshufd : _mm_shuffle_epi32
422
+ 2 p_15 : : SSE2 : pshuflw : _mm_shufflelo_epi16
423
+ 2 p_15 : : SSE2 : psrldq :
424
+ 2 p_15 : : SSE3 : pshufb : _mm_shuffle_epi8
425
+ 2 p_15 : : SSE4 : pblendw : _mm_blend_epi16
426
+ 1 p__5 : hsw-skl : *
427
+
428
+ 1 p0 : SSE2 : pslld (i8) : _mm_slli_si128
429
+ 2 p01 : skl+ :
430
+
431
+ 2 p_15 : ivb- : SSE3 : palignr
432
+ 1 p__5 : hsw+
433
+
434
+ 2 p_15 + p23 : ivb-, icl+ : SSE4 : pinsrd : _mm_insert_epi32(xmm, m32, i8)
435
+ 1 p__5 + p23 : hsw-skl
436
+ 1 p_15 + p5 : ivb-, ice+ : SSE4 : pinsrd : _mm_insert_epi32(xmm, r32, i8)
437
+ 0.5 2*p5 : hsw-skl
438
+
439
+ 2 p23 : SSE2 : movd (m32)
440
+ 3 p23A : adl :
441
+ 1 p5: : SSE2 : movd (r32)
442
+ */
443
+
444
+ #if 0 && defined(__XOP__)
445
+ // we must debug and test __XOP__ instruction
446
+ #include <x86intrin.h>
447
+ #include <ammintrin.h>
448
+ #define LOAD_ROTATE_CONSTS
449
+ #define MM_ROR_EPI32(r, c) _mm_roti_epi32(r, -(c))
450
+ #define Z7_BLAKE2S_MM_ROR_EPI32_IS_SUPPORTED
451
+ #elif 1 && defined(Z7_BLAKE2S_USE_AVX512_ALWAYS)
452
+ #define LOAD_ROTATE_CONSTS
453
+ #define MM_ROR_EPI32(r, c) _mm_ror_epi32(r, c)
454
+ #define Z7_BLAKE2S_MM_ROR_EPI32_IS_SUPPORTED
455
+ #else
456
+
457
+ // MSVC_1937+ uses "orps" instruction for _mm_or_si128().
458
+ // But "orps" has low throughput: TP=1 for bdw-nhm.
459
+ // So it can be better to use _mm_add_epi32()/"paddd" (TP=2 for bdw-nhm) instead of "xorps".
460
+ // But "orps" is fast for modern cpus (skl+).
461
+ // So we are default with "or" version:
462
+ #if 0 || 0 && defined(Z7_MSC_VER_ORIGINAL) && Z7_MSC_VER_ORIGINAL > 1937
463
+ // minor optimization for some old cpus, if "xorps" is slow.
464
+ #define MM128_EPI32_OR_or_ADD _mm_add_epi32
465
+ #else
466
+ #define MM128_EPI32_OR_or_ADD _mm_or_si128
467
+ #endif
468
+
469
+ #define MM_ROR_EPI32_VIA_SHIFT(r, c)( \
470
+ MM128_EPI32_OR_or_ADD( \
471
+ _mm_srli_epi32((r), (c)), \
472
+ _mm_slli_epi32((r), 32-(c))))
473
+ #if defined(Z7_BLAKE2S_USE_SSSE3) || defined(Z7_BLAKE2S_USE_SSE41)
474
+ #define LOAD_ROTATE_CONSTS \
475
+ const __m128i r8 = k_r8; \
476
+ const __m128i r16 = k_r16;
477
+ #define MM_ROR_EPI32(r, c) ( \
478
+ ( 8==(c)) ? _mm_shuffle_epi8(r,r8) \
479
+ : (16==(c)) ? _mm_shuffle_epi8(r,r16) \
480
+ : MM_ROR_EPI32_VIA_SHIFT(r, c))
481
+ #else
482
+ #define LOAD_ROTATE_CONSTS
483
+ #define MM_ROR_EPI32(r, c) ( \
484
+ (16==(c)) ? _mm_shufflehi_epi16(_mm_shufflelo_epi16(r, 0xb1), 0xb1) \
485
+ : MM_ROR_EPI32_VIA_SHIFT(r, c))
486
+ #endif
487
+ #endif
488
+
489
+ /*
490
+ we have 3 main ways to load 4 32-bit integers to __m128i:
491
+ 1) SSE2: _mm_set_epi32()
492
+ 2) SSE2: _mm_unpacklo_epi64() / _mm_unpacklo_epi32 / _mm_cvtsi32_si128()
493
+ 3) SSE41: _mm_insert_epi32() and _mm_cvtsi32_si128()
494
+ good compiler for _mm_set_epi32() generates these instructions:
495
+ {
496
+ movd xmm, [m32]; vpunpckldq; vpunpckldq; vpunpcklqdq;
497
+ }
498
+ good new compiler generates one instruction
499
+ {
500
+ for _mm_insert_epi32() : { pinsrd xmm, [m32], i }
501
+ for _mm_cvtsi32_si128() : { movd xmm, [m32] }
502
+ }
503
+ but vc2010 generates slow pair of instructions:
504
+ {
505
+ for _mm_insert_epi32() : { mov r32, [m32]; pinsrd xmm, r32, i }
506
+ for _mm_cvtsi32_si128() : { mov r32, [m32]; movd xmm, r32 }
507
+ }
508
+ _mm_insert_epi32() (pinsrd) code reduces xmm register pressure
509
+ in comparison with _mm_set_epi32() (movd + vpunpckld) code.
510
+ Note that variant with "movd xmm, r32" can be more slow,
511
+ but register pressure can be more important.
512
+ So we can force to "pinsrd" always.
513
+ */
514
+ // #if !defined(Z7_MSC_VER_ORIGINAL) || Z7_MSC_VER_ORIGINAL > 1600 || defined(MY_CPU_X86)
515
+ #ifdef Z7_BLAKE2S_USE_SSE41
516
+ /* _mm_set_epi32() can be more effective for GCC and CLANG
517
+ _mm_insert_epi32() is more effective for MSVC */
518
+ #if 0 || 1 && defined(Z7_MSC_VER_ORIGINAL)
519
+ #define Z7_BLAKE2S_USE_INSERT_INSTRUCTION
520
+ #endif
521
+ #endif // USE_SSE41
522
+ // #endif
523
+
524
+ #ifdef Z7_BLAKE2S_USE_INSERT_INSTRUCTION
525
+ // for SSE4.1
526
+ #define MM_LOAD_EPI32_FROM_4_POINTERS(p0, p1, p2, p3) \
527
+ _mm_insert_epi32( \
528
+ _mm_insert_epi32( \
529
+ _mm_insert_epi32( \
530
+ _mm_cvtsi32_si128( \
531
+ *(const Int32 *)p0), \
532
+ *(const Int32 *)p1, 1), \
533
+ *(const Int32 *)p2, 2), \
534
+ *(const Int32 *)p3, 3)
535
+ #elif 0 || 1 && defined(Z7_MSC_VER_ORIGINAL)
536
+ /* MSVC 1400 implements _mm_set_epi32() via slow memory write/read.
537
+ Also _mm_unpacklo_epi32 is more effective for another MSVC compilers.
538
+ But _mm_set_epi32() is more effective for GCC and CLANG.
539
+ So we use _mm_unpacklo_epi32 for MSVC only */
540
+ #define MM_LOAD_EPI32_FROM_4_POINTERS(p0, p1, p2, p3) \
541
+ _mm_unpacklo_epi64( \
542
+ _mm_unpacklo_epi32( _mm_cvtsi32_si128(*(const Int32 *)p0), \
543
+ _mm_cvtsi32_si128(*(const Int32 *)p1)), \
544
+ _mm_unpacklo_epi32( _mm_cvtsi32_si128(*(const Int32 *)p2), \
545
+ _mm_cvtsi32_si128(*(const Int32 *)p3)))
546
+ #else
547
+ #define MM_LOAD_EPI32_FROM_4_POINTERS(p0, p1, p2, p3) \
548
+ _mm_set_epi32( \
549
+ *(const Int32 *)p3, \
550
+ *(const Int32 *)p2, \
551
+ *(const Int32 *)p1, \
552
+ *(const Int32 *)p0)
553
+ #endif
554
+
555
+ #define SET_ROW_FROM_SIGMA_BASE(input, i0, i1, i2, i3) \
556
+ MM_LOAD_EPI32_FROM_4_POINTERS( \
557
+ GET_SIGMA_PTR(input, i0), \
558
+ GET_SIGMA_PTR(input, i1), \
559
+ GET_SIGMA_PTR(input, i2), \
560
+ GET_SIGMA_PTR(input, i3))
561
+
562
+ #define SET_ROW_FROM_SIGMA(input, sigma_index) \
563
+ SET_ROW_FROM_SIGMA_BASE(input, \
564
+ sigma[(sigma_index) ], \
565
+ sigma[(sigma_index) + 2 * 1], \
566
+ sigma[(sigma_index) + 2 * 2], \
567
+ sigma[(sigma_index) + 2 * 3]) \
568
+
569
+
570
+ #define ADD_128(a, b) _mm_add_epi32(a, b)
571
+ #define XOR_128(a, b) _mm_xor_si128(a, b)
572
+
573
+ #define D_ADD_128(dest, src) dest = ADD_128(dest, src)
574
+ #define D_XOR_128(dest, src) dest = XOR_128(dest, src)
575
+ #define D_ROR_128(dest, shift) dest = MM_ROR_EPI32(dest, shift)
576
+ #define D_ADD_EPI64_128(dest, src) dest = _mm_add_epi64(dest, src)
577
+
578
+
579
+ #define AXR(a, b, d, shift) \
580
+ D_ADD_128(a, b); \
581
+ D_XOR_128(d, a); \
582
+ D_ROR_128(d, shift);
583
+
584
+ #define AXR2(a, b, c, d, input, sigma_index, shift1, shift2) \
585
+ a = _mm_add_epi32 (a, SET_ROW_FROM_SIGMA(input, sigma_index)); \
586
+ AXR(a, b, d, shift1) \
587
+ AXR(c, d, b, shift2)
588
+
589
+ #define ROTATE_WORDS_TO_RIGHT(a, n) \
590
+ a = _mm_shuffle_epi32(a, _MM_SHUFFLE((3+n)&3, (2+n)&3, (1+n)&3, (0+n)&3));
591
+
592
+ #define AXR4(a, b, c, d, input, sigma_index) \
593
+ AXR2(a, b, c, d, input, sigma_index, 16, 12) \
594
+ AXR2(a, b, c, d, input, sigma_index + 1, 8, 7) \
595
+
596
+ #define RR2(a, b, c, d, input) \
597
+ { \
598
+ AXR4(a, b, c, d, input, 0) \
599
+ ROTATE_WORDS_TO_RIGHT(b, 1) \
600
+ ROTATE_WORDS_TO_RIGHT(c, 2) \
601
+ ROTATE_WORDS_TO_RIGHT(d, 3) \
602
+ AXR4(a, b, c, d, input, 8) \
603
+ ROTATE_WORDS_TO_RIGHT(b, 3) \
604
+ ROTATE_WORDS_TO_RIGHT(c, 2) \
605
+ ROTATE_WORDS_TO_RIGHT(d, 1) \
606
+ }
607
+
608
+
609
+ /*
610
+ Way1:
611
+ per 64 bytes block:
612
+ 10 rounds * 4 iters * (7 + 2) = 360 cycles = if pslld TP=1
613
+ * (7 + 1) = 320 cycles = if pslld TP=2 (skl+)
614
+ additional operations per 7_op_iter :
615
+ 4 movzx byte mem
616
+ 1 movd mem
617
+ 3 pinsrd mem
618
+ 1.5 pshufd
619
+ */
620
+
621
+ static
622
+ #if 0 || 0 && (defined(Z7_BLAKE2S_USE_V128_WAY2) || \
623
+ defined(Z7_BLAKE2S_USE_V256_WAY2))
624
+ Z7_NO_INLINE
625
+ #else
626
+ Z7_FORCE_INLINE
627
+ #endif
628
+ #ifdef BLAKE2S_ATTRIB_128BIT
629
+ BLAKE2S_ATTRIB_128BIT
630
+ #endif
631
+ void
632
+ Z7_FASTCALL
633
+ Blake2s_Compress_V128_Way1(UInt32 * const s, const Byte * const input)
634
+ {
635
+ __m128i a, b, c, d;
636
+ __m128i f0, f1;
637
+
638
+ LOAD_ROTATE_CONSTS
639
+ d = LOAD_128_FROM_STRUCT(STATE_T(s));
640
+ c = k_iv0_128;
641
+ a = f0 = LOAD_128_FROM_STRUCT(s);
642
+ b = f1 = LOAD_128_FROM_STRUCT(s + 4);
643
+ D_ADD_EPI64_128(d, k_inc);
644
+ STORE_128_TO_STRUCT (STATE_T(s), d);
645
+ D_XOR_128(d, k_iv4_128);
646
+
647
+ #define RR(r) { const Byte * const sigma = k_Blake2s_Sigma_4[r]; \
648
+ RR2(a, b, c, d, input) }
649
+
650
+ ROUNDS_LOOP(RR)
651
+ #undef RR
652
+
653
+ STORE_128_TO_STRUCT(s , XOR_128(f0, XOR_128(a, c)));
654
+ STORE_128_TO_STRUCT(s + 4, XOR_128(f1, XOR_128(b, d)));
655
+ }
656
+
657
+
658
+ static
659
+ Z7_NO_INLINE
660
+ #ifdef BLAKE2S_ATTRIB_128BIT
661
+ BLAKE2S_ATTRIB_128BIT
662
+ #endif
663
+ void
664
+ Z7_FASTCALL
665
+ Blake2sp_Compress2_V128_Way1(UInt32 *s_items, const Byte *data, const Byte *end)
666
+ {
667
+ size_t pos = 0;
668
+ do
669
+ {
670
+ UInt32 * const s = GET_STATE_TABLE_PTR_FROM_BYTE_POS(s_items, pos);
671
+ Blake2s_Compress_V128_Way1(s, data);
672
+ data += Z7_BLAKE2S_BLOCK_SIZE;
673
+ pos += Z7_BLAKE2S_BLOCK_SIZE;
674
+ pos &= SUPER_BLOCK_MASK;
675
+ }
676
+ while (data != end);
677
+ }
678
+
679
+
680
+ #if defined(Z7_BLAKE2S_USE_V128_WAY2) || \
681
+ defined(Z7_BLAKE2S_USE_AVX2_WAY2)
682
+ #if 1
683
+ #define Z7_BLAKE2S_CompressSingleBlock(s, data) \
684
+ Blake2sp_Compress2_V128_Way1(s, data, \
685
+ (const Byte *)(const void *)(data) + Z7_BLAKE2S_BLOCK_SIZE)
686
+ #else
687
+ #define Z7_BLAKE2S_CompressSingleBlock Blake2s_Compress_V128_Way1
688
+ #endif
689
+ #endif
690
+
691
+
692
+ #if (defined(Z7_BLAKE2S_USE_AVX2_WAY_SLOW) || \
693
+ defined(Z7_BLAKE2S_USE_V128_WAY2)) && \
694
+ !defined(Z7_BLAKE2S_USE_GATHER)
695
+ #define AXR2_LOAD_INDEXES(sigma_index) \
696
+ const unsigned i0 = sigma[(sigma_index)]; \
697
+ const unsigned i1 = sigma[(sigma_index) + 2 * 1]; \
698
+ const unsigned i2 = sigma[(sigma_index) + 2 * 2]; \
699
+ const unsigned i3 = sigma[(sigma_index) + 2 * 3]; \
700
+
701
+ #define SET_ROW_FROM_SIGMA_W(input) \
702
+ SET_ROW_FROM_SIGMA_BASE(input, i0, i1, i2, i3)
703
+ #endif
704
+
705
+
706
+ #ifdef Z7_BLAKE2S_USE_V128_WAY2
707
+
708
+ #if 1 || !defined(Z7_BLAKE2S_USE_SSE41)
709
+ /* we use SET_ROW_FROM_SIGMA_BASE, that uses
710
+ (SSE4) _mm_insert_epi32(), if Z7_BLAKE2S_USE_INSERT_INSTRUCTION is defined
711
+ (SSE2) _mm_set_epi32()
712
+ MSVC can be faster for this branch:
713
+ */
714
+ #define AXR2_W(sigma_index, shift1, shift2) \
715
+ { \
716
+ AXR2_LOAD_INDEXES(sigma_index) \
717
+ a0 = _mm_add_epi32(a0, SET_ROW_FROM_SIGMA_W(data)); \
718
+ a1 = _mm_add_epi32(a1, SET_ROW_FROM_SIGMA_W(data + Z7_BLAKE2S_BLOCK_SIZE)); \
719
+ AXR(a0, b0, d0, shift1) \
720
+ AXR(a1, b1, d1, shift1) \
721
+ AXR(c0, d0, b0, shift2) \
722
+ AXR(c1, d1, b1, shift2) \
723
+ }
724
+ #else
725
+ /* we use interleaved _mm_insert_epi32():
726
+ GCC can be faster for this branch:
727
+ */
728
+ #define AXR2_W_PRE_INSERT(sigma_index, i) \
729
+ { const unsigned ii = sigma[(sigma_index) + i * 2]; \
730
+ t0 = _mm_insert_epi32(t0, *(const Int32 *)GET_SIGMA_PTR(data, ii), i); \
731
+ t1 = _mm_insert_epi32(t1, *(const Int32 *)GET_SIGMA_PTR(data, Z7_BLAKE2S_BLOCK_SIZE + ii), i); \
732
+ }
733
+ #define AXR2_W(sigma_index, shift1, shift2) \
734
+ { __m128i t0, t1; \
735
+ { const unsigned ii = sigma[sigma_index]; \
736
+ t0 = _mm_cvtsi32_si128(*(const Int32 *)GET_SIGMA_PTR(data, ii)); \
737
+ t1 = _mm_cvtsi32_si128(*(const Int32 *)GET_SIGMA_PTR(data, Z7_BLAKE2S_BLOCK_SIZE + ii)); \
738
+ } \
739
+ AXR2_W_PRE_INSERT(sigma_index, 1) \
740
+ AXR2_W_PRE_INSERT(sigma_index, 2) \
741
+ AXR2_W_PRE_INSERT(sigma_index, 3) \
742
+ a0 = _mm_add_epi32(a0, t0); \
743
+ a1 = _mm_add_epi32(a1, t1); \
744
+ AXR(a0, b0, d0, shift1) \
745
+ AXR(a1, b1, d1, shift1) \
746
+ AXR(c0, d0, b0, shift2) \
747
+ AXR(c1, d1, b1, shift2) \
748
+ }
749
+ #endif
750
+
751
+
752
+ #define AXR4_W(sigma_index) \
753
+ AXR2_W(sigma_index, 16, 12) \
754
+ AXR2_W(sigma_index + 1, 8, 7) \
755
+
756
+ #define WW(r) \
757
+ { const Byte * const sigma = k_Blake2s_Sigma_4[r]; \
758
+ AXR4_W(0) \
759
+ ROTATE_WORDS_TO_RIGHT(b0, 1) \
760
+ ROTATE_WORDS_TO_RIGHT(b1, 1) \
761
+ ROTATE_WORDS_TO_RIGHT(c0, 2) \
762
+ ROTATE_WORDS_TO_RIGHT(c1, 2) \
763
+ ROTATE_WORDS_TO_RIGHT(d0, 3) \
764
+ ROTATE_WORDS_TO_RIGHT(d1, 3) \
765
+ AXR4_W(8) \
766
+ ROTATE_WORDS_TO_RIGHT(b0, 3) \
767
+ ROTATE_WORDS_TO_RIGHT(b1, 3) \
768
+ ROTATE_WORDS_TO_RIGHT(c0, 2) \
769
+ ROTATE_WORDS_TO_RIGHT(c1, 2) \
770
+ ROTATE_WORDS_TO_RIGHT(d0, 1) \
771
+ ROTATE_WORDS_TO_RIGHT(d1, 1) \
772
+ }
773
+
774
+
775
+ static
776
+ Z7_NO_INLINE
777
+ #ifdef BLAKE2S_ATTRIB_128BIT
778
+ BLAKE2S_ATTRIB_128BIT
779
+ #endif
780
+ void
781
+ Z7_FASTCALL
782
+ Blake2sp_Compress2_V128_Way2(UInt32 *s_items, const Byte *data, const Byte *end)
783
+ {
784
+ size_t pos = 0;
785
+ end -= Z7_BLAKE2S_BLOCK_SIZE;
786
+
787
+ if (data != end)
788
+ {
789
+ LOAD_ROTATE_CONSTS
790
+ do
791
+ {
792
+ UInt32 * const s = GET_STATE_TABLE_PTR_FROM_BYTE_POS(s_items, pos);
793
+ __m128i a0, b0, c0, d0;
794
+ __m128i a1, b1, c1, d1;
795
+ {
796
+ const __m128i inc = k_inc;
797
+ const __m128i temp = k_iv4_128;
798
+ d0 = LOAD_128_FROM_STRUCT (STATE_T(s));
799
+ d1 = LOAD_128_FROM_STRUCT (STATE_T(s + NSW));
800
+ D_ADD_EPI64_128(d0, inc);
801
+ D_ADD_EPI64_128(d1, inc);
802
+ STORE_128_TO_STRUCT (STATE_T(s ), d0);
803
+ STORE_128_TO_STRUCT (STATE_T(s + NSW), d1);
804
+ D_XOR_128(d0, temp);
805
+ D_XOR_128(d1, temp);
806
+ }
807
+ c1 = c0 = k_iv0_128;
808
+ a0 = LOAD_128_FROM_STRUCT(s);
809
+ b0 = LOAD_128_FROM_STRUCT(s + 4);
810
+ a1 = LOAD_128_FROM_STRUCT(s + NSW);
811
+ b1 = LOAD_128_FROM_STRUCT(s + NSW + 4);
812
+
813
+ ROUNDS_LOOP (WW)
814
+
815
+ #undef WW
816
+
817
+ D_XOR_128(a0, c0);
818
+ D_XOR_128(b0, d0);
819
+ D_XOR_128(a1, c1);
820
+ D_XOR_128(b1, d1);
821
+
822
+ D_XOR_128(a0, LOAD_128_FROM_STRUCT(s));
823
+ D_XOR_128(b0, LOAD_128_FROM_STRUCT(s + 4));
824
+ D_XOR_128(a1, LOAD_128_FROM_STRUCT(s + NSW));
825
+ D_XOR_128(b1, LOAD_128_FROM_STRUCT(s + NSW + 4));
826
+
827
+ STORE_128_TO_STRUCT(s, a0);
828
+ STORE_128_TO_STRUCT(s + 4, b0);
829
+ STORE_128_TO_STRUCT(s + NSW, a1);
830
+ STORE_128_TO_STRUCT(s + NSW + 4, b1);
831
+
832
+ data += Z7_BLAKE2S_BLOCK_SIZE * 2;
833
+ pos += Z7_BLAKE2S_BLOCK_SIZE * 2;
834
+ pos &= SUPER_BLOCK_MASK;
835
+ }
836
+ while (data < end);
837
+ if (data != end)
838
+ return;
839
+ }
840
+ {
841
+ UInt32 * const s = GET_STATE_TABLE_PTR_FROM_BYTE_POS(s_items, pos);
842
+ Z7_BLAKE2S_CompressSingleBlock(s, data);
843
+ }
844
+ }
845
+ #endif // Z7_BLAKE2S_USE_V128_WAY2
846
+
847
+
848
+ #ifdef Z7_BLAKE2S_USE_V128_WAY2
849
+ #define Z7_BLAKE2S_Compress2_V128 Blake2sp_Compress2_V128_Way2
850
+ #else
851
+ #define Z7_BLAKE2S_Compress2_V128 Blake2sp_Compress2_V128_Way1
852
+ #endif
853
+
854
+
855
+
856
+ #ifdef Z7_BLAKE2S_MM_ROR_EPI32_IS_SUPPORTED
857
+ #define ROT_128_8(x) MM_ROR_EPI32(x, 8)
858
+ #define ROT_128_16(x) MM_ROR_EPI32(x, 16)
859
+ #define ROT_128_7(x) MM_ROR_EPI32(x, 7)
860
+ #define ROT_128_12(x) MM_ROR_EPI32(x, 12)
861
+ #else
862
+ #if defined(Z7_BLAKE2S_USE_SSSE3) || defined(Z7_BLAKE2S_USE_SSE41)
863
+ #define ROT_128_8(x) _mm_shuffle_epi8(x, r8) // k_r8
864
+ #define ROT_128_16(x) _mm_shuffle_epi8(x, r16) // k_r16
865
+ #else
866
+ #define ROT_128_8(x) MM_ROR_EPI32_VIA_SHIFT(x, 8)
867
+ #define ROT_128_16(x) MM_ROR_EPI32_VIA_SHIFT(x, 16)
868
+ #endif
869
+ #define ROT_128_7(x) MM_ROR_EPI32_VIA_SHIFT(x, 7)
870
+ #define ROT_128_12(x) MM_ROR_EPI32_VIA_SHIFT(x, 12)
871
+ #endif
872
+
873
+
874
+ #if 1
875
+ // this branch can provide similar speed on x86* in most cases,
876
+ // because [base + index*4] provides same speed as [base + index].
877
+ // but some compilers can generate different code with this branch, that can be faster sometimes.
878
+ // this branch uses additional table of 10*16=160 bytes.
879
+ #define SIGMA_TABLE_MULT_16( a0,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15) \
880
+ SIGMA_TABLE_MULT(16, a0,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15)
881
+ MY_ALIGN(16)
882
+ static const Byte k_Blake2s_Sigma_16[BLAKE2S_NUM_ROUNDS][16] =
883
+ { SIGMA_TABLE(SIGMA_TABLE_MULT_16) };
884
+ #define GET_SIGMA_PTR_128(r) const Byte * const sigma = k_Blake2s_Sigma_16[r];
885
+ #define GET_SIGMA_VAL_128(n) (sigma[n])
886
+ #else
887
+ #define GET_SIGMA_PTR_128(r) const Byte * const sigma = k_Blake2s_Sigma_4[r];
888
+ #define GET_SIGMA_VAL_128(n) (4 * (size_t)sigma[n])
889
+ #endif
890
+
891
+
892
+ #ifdef Z7_BLAKE2S_USE_AVX2_FAST
893
+ #if 1
894
+ #define SIGMA_TABLE_MULT_32( a0,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15) \
895
+ SIGMA_TABLE_MULT(32, a0,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15)
896
+ MY_ALIGN(64)
897
+ static const UInt16 k_Blake2s_Sigma_32[BLAKE2S_NUM_ROUNDS][16] =
898
+ { SIGMA_TABLE(SIGMA_TABLE_MULT_32) };
899
+ #define GET_SIGMA_PTR_256(r) const UInt16 * const sigma = k_Blake2s_Sigma_32[r];
900
+ #define GET_SIGMA_VAL_256(n) (sigma[n])
901
+ #else
902
+ #define GET_SIGMA_PTR_256(r) const Byte * const sigma = k_Blake2s_Sigma_4[r];
903
+ #define GET_SIGMA_VAL_256(n) (8 * (size_t)sigma[n])
904
+ #endif
905
+ #endif // Z7_BLAKE2S_USE_AVX2_FAST
906
+
907
+
908
+ #define D_ROT_128_7(dest) dest = ROT_128_7(dest)
909
+ #define D_ROT_128_8(dest) dest = ROT_128_8(dest)
910
+ #define D_ROT_128_12(dest) dest = ROT_128_12(dest)
911
+ #define D_ROT_128_16(dest) dest = ROT_128_16(dest)
912
+
913
+ #define OP_L(a, i) D_ADD_128 (V(a, 0), \
914
+ LOAD_128((const Byte *)(w) + GET_SIGMA_VAL_128(2*(a)+(i))));
915
+
916
+ #define OP_0(a) OP_L(a, 0)
917
+ #define OP_7(a) OP_L(a, 1)
918
+
919
+ #define OP_1(a) D_ADD_128 (V(a, 0), V(a, 1));
920
+ #define OP_2(a) D_XOR_128 (V(a, 3), V(a, 0));
921
+ #define OP_4(a) D_ADD_128 (V(a, 2), V(a, 3));
922
+ #define OP_5(a) D_XOR_128 (V(a, 1), V(a, 2));
923
+
924
+ #define OP_3(a) D_ROT_128_16 (V(a, 3));
925
+ #define OP_6(a) D_ROT_128_12 (V(a, 1));
926
+ #define OP_8(a) D_ROT_128_8 (V(a, 3));
927
+ #define OP_9(a) D_ROT_128_7 (V(a, 1));
928
+
929
+
930
+ // for 32-bit x86 : interleave mode works slower, because of register pressure.
931
+
932
+ #if 0 || 1 && (defined(MY_CPU_X86) \
933
+ || defined(__GNUC__) && !defined(__clang__))
934
+ // non-inteleaved version:
935
+ // is fast for x86 32-bit.
936
+ // is fast for GCC x86-64.
937
+
938
+ #define V4G(a) \
939
+ OP_0 (a) \
940
+ OP_1 (a) \
941
+ OP_2 (a) \
942
+ OP_3 (a) \
943
+ OP_4 (a) \
944
+ OP_5 (a) \
945
+ OP_6 (a) \
946
+ OP_7 (a) \
947
+ OP_1 (a) \
948
+ OP_2 (a) \
949
+ OP_8 (a) \
950
+ OP_4 (a) \
951
+ OP_5 (a) \
952
+ OP_9 (a) \
953
+
954
+ #define V4R \
955
+ { \
956
+ V4G (0) \
957
+ V4G (1) \
958
+ V4G (2) \
959
+ V4G (3) \
960
+ V4G (4) \
961
+ V4G (5) \
962
+ V4G (6) \
963
+ V4G (7) \
964
+ }
965
+
966
+ #elif 0 || 1 && defined(MY_CPU_X86)
967
+
968
+ #define OP_INTER_2(op, a,b) \
969
+ op (a) \
970
+ op (b) \
971
+
972
+ #define V4G(a,b) \
973
+ OP_INTER_2 (OP_0, a,b) \
974
+ OP_INTER_2 (OP_1, a,b) \
975
+ OP_INTER_2 (OP_2, a,b) \
976
+ OP_INTER_2 (OP_3, a,b) \
977
+ OP_INTER_2 (OP_4, a,b) \
978
+ OP_INTER_2 (OP_5, a,b) \
979
+ OP_INTER_2 (OP_6, a,b) \
980
+ OP_INTER_2 (OP_7, a,b) \
981
+ OP_INTER_2 (OP_1, a,b) \
982
+ OP_INTER_2 (OP_2, a,b) \
983
+ OP_INTER_2 (OP_8, a,b) \
984
+ OP_INTER_2 (OP_4, a,b) \
985
+ OP_INTER_2 (OP_5, a,b) \
986
+ OP_INTER_2 (OP_9, a,b) \
987
+
988
+ #define V4R \
989
+ { \
990
+ V4G (0, 1) \
991
+ V4G (2, 3) \
992
+ V4G (4, 5) \
993
+ V4G (6, 7) \
994
+ }
995
+
996
+ #else
997
+ // iterleave-4 version is fast for x64 (MSVC/CLANG)
998
+
999
+ #define OP_INTER_4(op, a,b,c,d) \
1000
+ op (a) \
1001
+ op (b) \
1002
+ op (c) \
1003
+ op (d) \
1004
+
1005
+ #define V4G(a,b,c,d) \
1006
+ OP_INTER_4 (OP_0, a,b,c,d) \
1007
+ OP_INTER_4 (OP_1, a,b,c,d) \
1008
+ OP_INTER_4 (OP_2, a,b,c,d) \
1009
+ OP_INTER_4 (OP_3, a,b,c,d) \
1010
+ OP_INTER_4 (OP_4, a,b,c,d) \
1011
+ OP_INTER_4 (OP_5, a,b,c,d) \
1012
+ OP_INTER_4 (OP_6, a,b,c,d) \
1013
+ OP_INTER_4 (OP_7, a,b,c,d) \
1014
+ OP_INTER_4 (OP_1, a,b,c,d) \
1015
+ OP_INTER_4 (OP_2, a,b,c,d) \
1016
+ OP_INTER_4 (OP_8, a,b,c,d) \
1017
+ OP_INTER_4 (OP_4, a,b,c,d) \
1018
+ OP_INTER_4 (OP_5, a,b,c,d) \
1019
+ OP_INTER_4 (OP_9, a,b,c,d) \
1020
+
1021
+ #define V4R \
1022
+ { \
1023
+ V4G (0, 1, 2, 3) \
1024
+ V4G (4, 5, 6, 7) \
1025
+ }
1026
+
1027
+ #endif
1028
+
1029
+ #define V4_ROUND(r) { GET_SIGMA_PTR_128(r); V4R }
1030
+
1031
+
1032
+ #define V4_LOAD_MSG_1(w, m, i) \
1033
+ { \
1034
+ __m128i m0, m1, m2, m3; \
1035
+ __m128i t0, t1, t2, t3; \
1036
+ m0 = LOADU_128((m) + ((i) + 0 * 4) * 16); \
1037
+ m1 = LOADU_128((m) + ((i) + 1 * 4) * 16); \
1038
+ m2 = LOADU_128((m) + ((i) + 2 * 4) * 16); \
1039
+ m3 = LOADU_128((m) + ((i) + 3 * 4) * 16); \
1040
+ t0 = _mm_unpacklo_epi32(m0, m1); \
1041
+ t1 = _mm_unpackhi_epi32(m0, m1); \
1042
+ t2 = _mm_unpacklo_epi32(m2, m3); \
1043
+ t3 = _mm_unpackhi_epi32(m2, m3); \
1044
+ w[(i) * 4 + 0] = _mm_unpacklo_epi64(t0, t2); \
1045
+ w[(i) * 4 + 1] = _mm_unpackhi_epi64(t0, t2); \
1046
+ w[(i) * 4 + 2] = _mm_unpacklo_epi64(t1, t3); \
1047
+ w[(i) * 4 + 3] = _mm_unpackhi_epi64(t1, t3); \
1048
+ }
1049
+
1050
+ #define V4_LOAD_MSG(w, m) \
1051
+ { \
1052
+ V4_LOAD_MSG_1 (w, m, 0) \
1053
+ V4_LOAD_MSG_1 (w, m, 1) \
1054
+ V4_LOAD_MSG_1 (w, m, 2) \
1055
+ V4_LOAD_MSG_1 (w, m, 3) \
1056
+ }
1057
+
1058
+ #define V4_LOAD_UNPACK_PAIR_128(src32, i, d0, d1) \
1059
+ { \
1060
+ const __m128i v0 = LOAD_128_FROM_STRUCT((src32) + (i ) * 4); \
1061
+ const __m128i v1 = LOAD_128_FROM_STRUCT((src32) + (i + 1) * 4); \
1062
+ d0 = _mm_unpacklo_epi32(v0, v1); \
1063
+ d1 = _mm_unpackhi_epi32(v0, v1); \
1064
+ }
1065
+
1066
+ #define V4_UNPACK_PAIR_128(dest32, i, s0, s1) \
1067
+ { \
1068
+ STORE_128_TO_STRUCT((dest32) + i * 4 , _mm_unpacklo_epi64(s0, s1)); \
1069
+ STORE_128_TO_STRUCT((dest32) + i * 4 + 16, _mm_unpackhi_epi64(s0, s1)); \
1070
+ }
1071
+
1072
+ #define V4_UNPACK_STATE(dest32, src32) \
1073
+ { \
1074
+ __m128i t0, t1, t2, t3, t4, t5, t6, t7; \
1075
+ V4_LOAD_UNPACK_PAIR_128(src32, 0, t0, t1) \
1076
+ V4_LOAD_UNPACK_PAIR_128(src32, 2, t2, t3) \
1077
+ V4_LOAD_UNPACK_PAIR_128(src32, 4, t4, t5) \
1078
+ V4_LOAD_UNPACK_PAIR_128(src32, 6, t6, t7) \
1079
+ V4_UNPACK_PAIR_128(dest32, 0, t0, t2) \
1080
+ V4_UNPACK_PAIR_128(dest32, 8, t1, t3) \
1081
+ V4_UNPACK_PAIR_128(dest32, 1, t4, t6) \
1082
+ V4_UNPACK_PAIR_128(dest32, 9, t5, t7) \
1083
+ }
1084
+
1085
+
1086
+ static
1087
+ Z7_NO_INLINE
1088
+ #ifdef BLAKE2S_ATTRIB_128BIT
1089
+ BLAKE2S_ATTRIB_128BIT
1090
+ #endif
1091
+ void
1092
+ Z7_FASTCALL
1093
+ Blake2sp_Compress2_V128_Fast(UInt32 *s_items, const Byte *data, const Byte *end)
1094
+ {
1095
+ // PrintStates2(s_items, 8, 16);
1096
+ size_t pos = 0;
1097
+ pos /= 2;
1098
+ do
1099
+ {
1100
+ #if defined(Z7_BLAKE2S_USE_SSSE3) && \
1101
+ !defined(Z7_BLAKE2S_MM_ROR_EPI32_IS_SUPPORTED)
1102
+ const __m128i r8 = k_r8;
1103
+ const __m128i r16 = k_r16;
1104
+ #endif
1105
+ __m128i w[16];
1106
+ __m128i v[16];
1107
+ UInt32 *s;
1108
+ V4_LOAD_MSG(w, data)
1109
+ s = GET_STATE_TABLE_PTR_FROM_BYTE_POS(s_items, pos);
1110
+ {
1111
+ __m128i ctr = LOAD_128_FROM_STRUCT(s + 64);
1112
+ D_ADD_EPI64_128 (ctr, k_inc);
1113
+ STORE_128_TO_STRUCT(s + 64, ctr);
1114
+ v[12] = XOR_128 (GET_128_IV_WAY4(4), _mm_shuffle_epi32(ctr, _MM_SHUFFLE(0, 0, 0, 0)));
1115
+ v[13] = XOR_128 (GET_128_IV_WAY4(5), _mm_shuffle_epi32(ctr, _MM_SHUFFLE(1, 1, 1, 1)));
1116
+ }
1117
+ v[ 8] = GET_128_IV_WAY4(0);
1118
+ v[ 9] = GET_128_IV_WAY4(1);
1119
+ v[10] = GET_128_IV_WAY4(2);
1120
+ v[11] = GET_128_IV_WAY4(3);
1121
+ v[14] = GET_128_IV_WAY4(6);
1122
+ v[15] = GET_128_IV_WAY4(7);
1123
+
1124
+ #define LOAD_STATE_128_FROM_STRUCT(i) \
1125
+ v[i] = LOAD_128_FROM_STRUCT(s + (i) * 4);
1126
+
1127
+ #define UPDATE_STATE_128_IN_STRUCT(i) \
1128
+ STORE_128_TO_STRUCT(s + (i) * 4, XOR_128( \
1129
+ XOR_128(v[i], v[(i) + 8]), \
1130
+ LOAD_128_FROM_STRUCT(s + (i) * 4)));
1131
+
1132
+ REP8_MACRO (LOAD_STATE_128_FROM_STRUCT)
1133
+ ROUNDS_LOOP (V4_ROUND)
1134
+ REP8_MACRO (UPDATE_STATE_128_IN_STRUCT)
1135
+
1136
+ data += Z7_BLAKE2S_BLOCK_SIZE * 4;
1137
+ pos += Z7_BLAKE2S_BLOCK_SIZE * 4 / 2;
1138
+ pos &= SUPER_BLOCK_SIZE / 2 - 1;
1139
+ }
1140
+ while (data != end);
1141
+ }
1142
+
1143
+
1144
+ static
1145
+ Z7_NO_INLINE
1146
+ #ifdef BLAKE2S_ATTRIB_128BIT
1147
+ BLAKE2S_ATTRIB_128BIT
1148
+ #endif
1149
+ void
1150
+ Z7_FASTCALL
1151
+ Blake2sp_Final_V128_Fast(UInt32 *states)
1152
+ {
1153
+ const __m128i ctr = LOAD_128_FROM_STRUCT(states + 64);
1154
+ // printf("\nBlake2sp_Compress2_V128_Fast_Final4\n");
1155
+ // PrintStates2(states, 8, 16);
1156
+ {
1157
+ ptrdiff_t pos = 8 * 4;
1158
+ do
1159
+ {
1160
+ UInt32 *src32 = states + (size_t)(pos * 1);
1161
+ UInt32 *dest32 = states + (size_t)(pos * 2);
1162
+ V4_UNPACK_STATE(dest32, src32)
1163
+ pos -= 8 * 4;
1164
+ }
1165
+ while (pos >= 0);
1166
+ }
1167
+ {
1168
+ unsigned k;
1169
+ for (k = 0; k < 8; k++)
1170
+ {
1171
+ UInt32 *s = states + (size_t)k * 16;
1172
+ STORE_128_TO_STRUCT (STATE_T(s), ctr);
1173
+ }
1174
+ }
1175
+ // PrintStates2(states, 8, 16);
1176
+ }
1177
+
1178
+
1179
+
1180
+ #ifdef Z7_BLAKE2S_USE_AVX2
1181
+
1182
+ #define ADD_256(a, b) _mm256_add_epi32(a, b)
1183
+ #define XOR_256(a, b) _mm256_xor_si256(a, b)
1184
+
1185
+ #if 1 && defined(Z7_BLAKE2S_USE_AVX512_ALWAYS)
1186
+ #define MM256_ROR_EPI32 _mm256_ror_epi32
1187
+ #define Z7_MM256_ROR_EPI32_IS_SUPPORTED
1188
+ #ifdef Z7_BLAKE2S_USE_AVX2_WAY2
1189
+ #define LOAD_ROTATE_CONSTS_256
1190
+ #endif
1191
+ #else
1192
+ #ifdef Z7_BLAKE2S_USE_AVX2_WAY_SLOW
1193
+ #ifdef Z7_BLAKE2S_USE_AVX2_WAY2
1194
+ #define LOAD_ROTATE_CONSTS_256 \
1195
+ const __m256i r8 = k_r8_256; \
1196
+ const __m256i r16 = k_r16_256;
1197
+ #endif // AVX2_WAY2
1198
+
1199
+ #define MM256_ROR_EPI32(r, c) ( \
1200
+ ( 8==(c)) ? _mm256_shuffle_epi8(r,r8) \
1201
+ : (16==(c)) ? _mm256_shuffle_epi8(r,r16) \
1202
+ : _mm256_or_si256( \
1203
+ _mm256_srli_epi32((r), (c)), \
1204
+ _mm256_slli_epi32((r), 32-(c))))
1205
+ #endif // WAY_SLOW
1206
+ #endif
1207
+
1208
+
1209
+ #define D_ADD_256(dest, src) dest = ADD_256(dest, src)
1210
+ #define D_XOR_256(dest, src) dest = XOR_256(dest, src)
1211
+
1212
+ #define LOADU_256(p) _mm256_loadu_si256((const __m256i *)(const void *)(p))
1213
+
1214
+ #ifdef Z7_BLAKE2S_USE_AVX2_FAST
1215
+
1216
+ #ifdef Z7_MM256_ROR_EPI32_IS_SUPPORTED
1217
+ #define ROT_256_16(x) MM256_ROR_EPI32((x), 16)
1218
+ #define ROT_256_12(x) MM256_ROR_EPI32((x), 12)
1219
+ #define ROT_256_8(x) MM256_ROR_EPI32((x), 8)
1220
+ #define ROT_256_7(x) MM256_ROR_EPI32((x), 7)
1221
+ #else
1222
+ #define ROTATE8 _mm256_set_epi8(12, 15, 14, 13, 8, 11, 10, 9, 4, 7, 6, 5, 0, 3, 2, 1, \
1223
+ 12, 15, 14, 13, 8, 11, 10, 9, 4, 7, 6, 5, 0, 3, 2, 1)
1224
+ #define ROTATE16 _mm256_set_epi8(13, 12, 15, 14, 9, 8, 11, 10, 5, 4, 7, 6, 1, 0, 3, 2, \
1225
+ 13, 12, 15, 14, 9, 8, 11, 10, 5, 4, 7, 6, 1, 0, 3, 2)
1226
+ #define ROT_256_16(x) _mm256_shuffle_epi8((x), ROTATE16)
1227
+ #define ROT_256_12(x) _mm256_or_si256(_mm256_srli_epi32((x), 12), _mm256_slli_epi32((x), 20))
1228
+ #define ROT_256_8(x) _mm256_shuffle_epi8((x), ROTATE8)
1229
+ #define ROT_256_7(x) _mm256_or_si256(_mm256_srli_epi32((x), 7), _mm256_slli_epi32((x), 25))
1230
+ #endif
1231
+
1232
+ #define D_ROT_256_7(dest) dest = ROT_256_7(dest)
1233
+ #define D_ROT_256_8(dest) dest = ROT_256_8(dest)
1234
+ #define D_ROT_256_12(dest) dest = ROT_256_12(dest)
1235
+ #define D_ROT_256_16(dest) dest = ROT_256_16(dest)
1236
+
1237
+ #define LOAD_256(p) _mm256_load_si256((const __m256i *)(const void *)(p))
1238
+ #ifdef Z7_BLAKE2SP_STRUCT_IS_NOT_ALIGNED
1239
+ #define STOREU_256(p, r) _mm256_storeu_si256((__m256i *)(void *)(p), r)
1240
+ #define LOAD_256_FROM_STRUCT(p) LOADU_256(p)
1241
+ #define STORE_256_TO_STRUCT(p, r) STOREU_256(p, r)
1242
+ #else
1243
+ // if struct is aligned for 32-bytes
1244
+ #define STORE_256(p, r) _mm256_store_si256((__m256i *)(void *)(p), r)
1245
+ #define LOAD_256_FROM_STRUCT(p) LOAD_256(p)
1246
+ #define STORE_256_TO_STRUCT(p, r) STORE_256(p, r)
1247
+ #endif
1248
+
1249
+ #endif // Z7_BLAKE2S_USE_AVX2_FAST
1250
+
1251
+
1252
+
1253
+ #ifdef Z7_BLAKE2S_USE_AVX2_WAY_SLOW
1254
+
1255
+ #if 0
1256
+ #define DIAG_PERM2(s) \
1257
+ { \
1258
+ const __m256i a = LOAD_256_FROM_STRUCT((s) ); \
1259
+ const __m256i b = LOAD_256_FROM_STRUCT((s) + NSW); \
1260
+ STORE_256_TO_STRUCT((s ), _mm256_permute2x128_si256(a, b, 0x20)); \
1261
+ STORE_256_TO_STRUCT((s + NSW), _mm256_permute2x128_si256(a, b, 0x31)); \
1262
+ }
1263
+ #else
1264
+ #define DIAG_PERM2(s) \
1265
+ { \
1266
+ const __m128i a = LOAD_128_FROM_STRUCT((s) + 4); \
1267
+ const __m128i b = LOAD_128_FROM_STRUCT((s) + NSW); \
1268
+ STORE_128_TO_STRUCT((s) + NSW, a); \
1269
+ STORE_128_TO_STRUCT((s) + 4 , b); \
1270
+ }
1271
+ #endif
1272
+ #define DIAG_PERM8(s_items) \
1273
+ { \
1274
+ DIAG_PERM2(s_items) \
1275
+ DIAG_PERM2(s_items + NSW * 2) \
1276
+ DIAG_PERM2(s_items + NSW * 4) \
1277
+ DIAG_PERM2(s_items + NSW * 6) \
1278
+ }
1279
+
1280
+
1281
+ #define AXR256(a, b, d, shift) \
1282
+ D_ADD_256(a, b); \
1283
+ D_XOR_256(d, a); \
1284
+ d = MM256_ROR_EPI32(d, shift); \
1285
+
1286
+
1287
+
1288
+ #ifdef Z7_BLAKE2S_USE_GATHER
1289
+
1290
+ #define TABLE_GATHER_256_4(a0,a1,a2,a3) \
1291
+ a0,a1,a2,a3, a0+16,a1+16,a2+16,a3+16
1292
+ #define TABLE_GATHER_256( \
1293
+ a0,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15) \
1294
+ { TABLE_GATHER_256_4(a0,a2,a4,a6), \
1295
+ TABLE_GATHER_256_4(a1,a3,a5,a7), \
1296
+ TABLE_GATHER_256_4(a8,a10,a12,a14), \
1297
+ TABLE_GATHER_256_4(a9,a11,a13,a15) }
1298
+ MY_ALIGN(64)
1299
+ static const UInt32 k_Blake2s_Sigma_gather256[BLAKE2S_NUM_ROUNDS][16 * 2] =
1300
+ { SIGMA_TABLE(TABLE_GATHER_256) };
1301
+ #define GET_SIGMA(r) \
1302
+ const UInt32 * const sigma = k_Blake2s_Sigma_gather256[r];
1303
+ #define AXR2_LOAD_INDEXES_AVX(sigma_index) \
1304
+ const __m256i i01234567 = LOAD_256(sigma + (sigma_index));
1305
+ #define SET_ROW_FROM_SIGMA_AVX(in) \
1306
+ _mm256_i32gather_epi32((const void *)(in), i01234567, 4)
1307
+ #define SIGMA_INTERLEAVE 8
1308
+ #define SIGMA_HALF_ROW_SIZE 16
1309
+
1310
+ #else // !Z7_BLAKE2S_USE_GATHER
1311
+
1312
+ #define GET_SIGMA(r) \
1313
+ const Byte * const sigma = k_Blake2s_Sigma_4[r];
1314
+ #define AXR2_LOAD_INDEXES_AVX(sigma_index) \
1315
+ AXR2_LOAD_INDEXES(sigma_index)
1316
+ #define SET_ROW_FROM_SIGMA_AVX(in) \
1317
+ MY_mm256_set_m128i( \
1318
+ SET_ROW_FROM_SIGMA_W((in) + Z7_BLAKE2S_BLOCK_SIZE), \
1319
+ SET_ROW_FROM_SIGMA_W(in))
1320
+ #define SIGMA_INTERLEAVE 1
1321
+ #define SIGMA_HALF_ROW_SIZE 8
1322
+ #endif // !Z7_BLAKE2S_USE_GATHER
1323
+
1324
+
1325
+ #define ROTATE_WORDS_TO_RIGHT_256(a, n) \
1326
+ a = _mm256_shuffle_epi32(a, _MM_SHUFFLE((3+n)&3, (2+n)&3, (1+n)&3, (0+n)&3));
1327
+
1328
+
1329
+
1330
+ #ifdef Z7_BLAKE2S_USE_AVX2_WAY2
1331
+
1332
+ #define AXR2_A(sigma_index, shift1, shift2) \
1333
+ AXR2_LOAD_INDEXES_AVX(sigma_index) \
1334
+ D_ADD_256( a0, SET_ROW_FROM_SIGMA_AVX(data)); \
1335
+ AXR256(a0, b0, d0, shift1) \
1336
+ AXR256(c0, d0, b0, shift2) \
1337
+
1338
+ #define AXR4_A(sigma_index) \
1339
+ { AXR2_A(sigma_index, 16, 12) } \
1340
+ { AXR2_A(sigma_index + SIGMA_INTERLEAVE, 8, 7) }
1341
+
1342
+ #define EE1(r) \
1343
+ { GET_SIGMA(r) \
1344
+ AXR4_A(0) \
1345
+ ROTATE_WORDS_TO_RIGHT_256(b0, 1) \
1346
+ ROTATE_WORDS_TO_RIGHT_256(c0, 2) \
1347
+ ROTATE_WORDS_TO_RIGHT_256(d0, 3) \
1348
+ AXR4_A(SIGMA_HALF_ROW_SIZE) \
1349
+ ROTATE_WORDS_TO_RIGHT_256(b0, 3) \
1350
+ ROTATE_WORDS_TO_RIGHT_256(c0, 2) \
1351
+ ROTATE_WORDS_TO_RIGHT_256(d0, 1) \
1352
+ }
1353
+
1354
+ static
1355
+ Z7_NO_INLINE
1356
+ #ifdef BLAKE2S_ATTRIB_AVX2
1357
+ BLAKE2S_ATTRIB_AVX2
1358
+ #endif
1359
+ void
1360
+ Z7_FASTCALL
1361
+ Blake2sp_Compress2_AVX2_Way2(UInt32 *s_items, const Byte *data, const Byte *end)
1362
+ {
1363
+ size_t pos = 0;
1364
+ end -= Z7_BLAKE2S_BLOCK_SIZE;
1365
+
1366
+ if (data != end)
1367
+ {
1368
+ LOAD_ROTATE_CONSTS_256
1369
+ DIAG_PERM8(s_items)
1370
+ do
1371
+ {
1372
+ UInt32 * const s = GET_STATE_TABLE_PTR_FROM_BYTE_POS(s_items, pos);
1373
+ __m256i a0, b0, c0, d0;
1374
+ {
1375
+ const __m128i inc = k_inc;
1376
+ __m128i d0_128 = LOAD_128_FROM_STRUCT (STATE_T(s));
1377
+ __m128i d1_128 = LOAD_128_FROM_STRUCT (STATE_T(s + NSW));
1378
+ D_ADD_EPI64_128(d0_128, inc);
1379
+ D_ADD_EPI64_128(d1_128, inc);
1380
+ STORE_128_TO_STRUCT (STATE_T(s ), d0_128);
1381
+ STORE_128_TO_STRUCT (STATE_T(s + NSW), d1_128);
1382
+ d0 = MY_mm256_set_m128i(d1_128, d0_128);
1383
+ D_XOR_256(d0, k_iv4_256);
1384
+ }
1385
+ c0 = SET_FROM_128(k_iv0_128);
1386
+ a0 = LOAD_256_FROM_STRUCT(s + NSW * 0);
1387
+ b0 = LOAD_256_FROM_STRUCT(s + NSW * 1);
1388
+
1389
+ ROUNDS_LOOP (EE1)
1390
+
1391
+ D_XOR_256(a0, c0);
1392
+ D_XOR_256(b0, d0);
1393
+
1394
+ D_XOR_256(a0, LOAD_256_FROM_STRUCT(s + NSW * 0));
1395
+ D_XOR_256(b0, LOAD_256_FROM_STRUCT(s + NSW * 1));
1396
+
1397
+ STORE_256_TO_STRUCT(s + NSW * 0, a0);
1398
+ STORE_256_TO_STRUCT(s + NSW * 1, b0);
1399
+
1400
+ data += Z7_BLAKE2S_BLOCK_SIZE * 2;
1401
+ pos += Z7_BLAKE2S_BLOCK_SIZE * 2;
1402
+ pos &= SUPER_BLOCK_MASK;
1403
+ }
1404
+ while (data < end);
1405
+ DIAG_PERM8(s_items)
1406
+ if (data != end)
1407
+ return;
1408
+ }
1409
+ {
1410
+ UInt32 * const s = GET_STATE_TABLE_PTR_FROM_BYTE_POS(s_items, pos);
1411
+ Z7_BLAKE2S_CompressSingleBlock(s, data);
1412
+ }
1413
+ }
1414
+
1415
+ #endif // Z7_BLAKE2S_USE_AVX2_WAY2
1416
+
1417
+
1418
+
1419
+ #ifdef Z7_BLAKE2S_USE_AVX2_WAY4
1420
+
1421
+ #define AXR2_X(sigma_index, shift1, shift2) \
1422
+ AXR2_LOAD_INDEXES_AVX(sigma_index) \
1423
+ D_ADD_256( a0, SET_ROW_FROM_SIGMA_AVX(data)); \
1424
+ D_ADD_256( a1, SET_ROW_FROM_SIGMA_AVX((data) + Z7_BLAKE2S_BLOCK_SIZE * 2)); \
1425
+ AXR256(a0, b0, d0, shift1) \
1426
+ AXR256(a1, b1, d1, shift1) \
1427
+ AXR256(c0, d0, b0, shift2) \
1428
+ AXR256(c1, d1, b1, shift2) \
1429
+
1430
+ #define AXR4_X(sigma_index) \
1431
+ { AXR2_X(sigma_index, 16, 12) } \
1432
+ { AXR2_X(sigma_index + SIGMA_INTERLEAVE, 8, 7) }
1433
+
1434
+ #define EE2(r) \
1435
+ { GET_SIGMA(r) \
1436
+ AXR4_X(0) \
1437
+ ROTATE_WORDS_TO_RIGHT_256(b0, 1) \
1438
+ ROTATE_WORDS_TO_RIGHT_256(b1, 1) \
1439
+ ROTATE_WORDS_TO_RIGHT_256(c0, 2) \
1440
+ ROTATE_WORDS_TO_RIGHT_256(c1, 2) \
1441
+ ROTATE_WORDS_TO_RIGHT_256(d0, 3) \
1442
+ ROTATE_WORDS_TO_RIGHT_256(d1, 3) \
1443
+ AXR4_X(SIGMA_HALF_ROW_SIZE) \
1444
+ ROTATE_WORDS_TO_RIGHT_256(b0, 3) \
1445
+ ROTATE_WORDS_TO_RIGHT_256(b1, 3) \
1446
+ ROTATE_WORDS_TO_RIGHT_256(c0, 2) \
1447
+ ROTATE_WORDS_TO_RIGHT_256(c1, 2) \
1448
+ ROTATE_WORDS_TO_RIGHT_256(d0, 1) \
1449
+ ROTATE_WORDS_TO_RIGHT_256(d1, 1) \
1450
+ }
1451
+
1452
+ static
1453
+ Z7_NO_INLINE
1454
+ #ifdef BLAKE2S_ATTRIB_AVX2
1455
+ BLAKE2S_ATTRIB_AVX2
1456
+ #endif
1457
+ void
1458
+ Z7_FASTCALL
1459
+ Blake2sp_Compress2_AVX2_Way4(UInt32 *s_items, const Byte *data, const Byte *end)
1460
+ {
1461
+ size_t pos = 0;
1462
+
1463
+ if ((size_t)(end - data) >= Z7_BLAKE2S_BLOCK_SIZE * 4)
1464
+ {
1465
+ #ifndef Z7_MM256_ROR_EPI32_IS_SUPPORTED
1466
+ const __m256i r8 = k_r8_256;
1467
+ const __m256i r16 = k_r16_256;
1468
+ #endif
1469
+ end -= Z7_BLAKE2S_BLOCK_SIZE * 3;
1470
+ DIAG_PERM8(s_items)
1471
+ do
1472
+ {
1473
+ UInt32 * const s = GET_STATE_TABLE_PTR_FROM_BYTE_POS(s_items, pos);
1474
+ __m256i a0, b0, c0, d0;
1475
+ __m256i a1, b1, c1, d1;
1476
+ {
1477
+ const __m128i inc = k_inc;
1478
+ __m128i d0_128 = LOAD_128_FROM_STRUCT (STATE_T(s));
1479
+ __m128i d1_128 = LOAD_128_FROM_STRUCT (STATE_T(s + NSW));
1480
+ __m128i d2_128 = LOAD_128_FROM_STRUCT (STATE_T(s + NSW * 2));
1481
+ __m128i d3_128 = LOAD_128_FROM_STRUCT (STATE_T(s + NSW * 3));
1482
+ D_ADD_EPI64_128(d0_128, inc);
1483
+ D_ADD_EPI64_128(d1_128, inc);
1484
+ D_ADD_EPI64_128(d2_128, inc);
1485
+ D_ADD_EPI64_128(d3_128, inc);
1486
+ STORE_128_TO_STRUCT (STATE_T(s ), d0_128);
1487
+ STORE_128_TO_STRUCT (STATE_T(s + NSW * 1), d1_128);
1488
+ STORE_128_TO_STRUCT (STATE_T(s + NSW * 2), d2_128);
1489
+ STORE_128_TO_STRUCT (STATE_T(s + NSW * 3), d3_128);
1490
+ d0 = MY_mm256_set_m128i(d1_128, d0_128);
1491
+ d1 = MY_mm256_set_m128i(d3_128, d2_128);
1492
+ D_XOR_256(d0, k_iv4_256);
1493
+ D_XOR_256(d1, k_iv4_256);
1494
+ }
1495
+ c1 = c0 = SET_FROM_128(k_iv0_128);
1496
+ a0 = LOAD_256_FROM_STRUCT(s + NSW * 0);
1497
+ b0 = LOAD_256_FROM_STRUCT(s + NSW * 1);
1498
+ a1 = LOAD_256_FROM_STRUCT(s + NSW * 2);
1499
+ b1 = LOAD_256_FROM_STRUCT(s + NSW * 3);
1500
+
1501
+ ROUNDS_LOOP (EE2)
1502
+
1503
+ D_XOR_256(a0, c0);
1504
+ D_XOR_256(b0, d0);
1505
+ D_XOR_256(a1, c1);
1506
+ D_XOR_256(b1, d1);
1507
+
1508
+ D_XOR_256(a0, LOAD_256_FROM_STRUCT(s + NSW * 0));
1509
+ D_XOR_256(b0, LOAD_256_FROM_STRUCT(s + NSW * 1));
1510
+ D_XOR_256(a1, LOAD_256_FROM_STRUCT(s + NSW * 2));
1511
+ D_XOR_256(b1, LOAD_256_FROM_STRUCT(s + NSW * 3));
1512
+
1513
+ STORE_256_TO_STRUCT(s + NSW * 0, a0);
1514
+ STORE_256_TO_STRUCT(s + NSW * 1, b0);
1515
+ STORE_256_TO_STRUCT(s + NSW * 2, a1);
1516
+ STORE_256_TO_STRUCT(s + NSW * 3, b1);
1517
+
1518
+ data += Z7_BLAKE2S_BLOCK_SIZE * 4;
1519
+ pos += Z7_BLAKE2S_BLOCK_SIZE * 4;
1520
+ pos &= SUPER_BLOCK_MASK;
1521
+ }
1522
+ while (data < end);
1523
+ DIAG_PERM8(s_items)
1524
+ end += Z7_BLAKE2S_BLOCK_SIZE * 3;
1525
+ }
1526
+ if (data == end)
1527
+ return;
1528
+ // Z7_BLAKE2S_Compress2_V128(s_items, data, end, pos);
1529
+ do
1530
+ {
1531
+ UInt32 * const s = GET_STATE_TABLE_PTR_FROM_BYTE_POS(s_items, pos);
1532
+ Z7_BLAKE2S_CompressSingleBlock(s, data);
1533
+ data += Z7_BLAKE2S_BLOCK_SIZE;
1534
+ pos += Z7_BLAKE2S_BLOCK_SIZE;
1535
+ pos &= SUPER_BLOCK_MASK;
1536
+ }
1537
+ while (data != end);
1538
+ }
1539
+
1540
+ #endif // Z7_BLAKE2S_USE_AVX2_WAY4
1541
+ #endif // Z7_BLAKE2S_USE_AVX2_WAY_SLOW
1542
+
1543
+
1544
+ // ---------------------------------------------------------
1545
+
1546
+ #ifdef Z7_BLAKE2S_USE_AVX2_FAST
1547
+
1548
+ #define OP256_L(a, i) D_ADD_256 (V(a, 0), \
1549
+ LOAD_256((const Byte *)(w) + GET_SIGMA_VAL_256(2*(a)+(i))));
1550
+
1551
+ #define OP256_0(a) OP256_L(a, 0)
1552
+ #define OP256_7(a) OP256_L(a, 1)
1553
+
1554
+ #define OP256_1(a) D_ADD_256 (V(a, 0), V(a, 1));
1555
+ #define OP256_2(a) D_XOR_256 (V(a, 3), V(a, 0));
1556
+ #define OP256_4(a) D_ADD_256 (V(a, 2), V(a, 3));
1557
+ #define OP256_5(a) D_XOR_256 (V(a, 1), V(a, 2));
1558
+
1559
+ #define OP256_3(a) D_ROT_256_16 (V(a, 3));
1560
+ #define OP256_6(a) D_ROT_256_12 (V(a, 1));
1561
+ #define OP256_8(a) D_ROT_256_8 (V(a, 3));
1562
+ #define OP256_9(a) D_ROT_256_7 (V(a, 1));
1563
+
1564
+
1565
+ #if 0 || 1 && defined(MY_CPU_X86)
1566
+
1567
+ #define V8_G(a) \
1568
+ OP256_0 (a) \
1569
+ OP256_1 (a) \
1570
+ OP256_2 (a) \
1571
+ OP256_3 (a) \
1572
+ OP256_4 (a) \
1573
+ OP256_5 (a) \
1574
+ OP256_6 (a) \
1575
+ OP256_7 (a) \
1576
+ OP256_1 (a) \
1577
+ OP256_2 (a) \
1578
+ OP256_8 (a) \
1579
+ OP256_4 (a) \
1580
+ OP256_5 (a) \
1581
+ OP256_9 (a) \
1582
+
1583
+ #define V8R { \
1584
+ V8_G (0); \
1585
+ V8_G (1); \
1586
+ V8_G (2); \
1587
+ V8_G (3); \
1588
+ V8_G (4); \
1589
+ V8_G (5); \
1590
+ V8_G (6); \
1591
+ V8_G (7); \
1592
+ }
1593
+
1594
+ #else
1595
+
1596
+ #define OP256_INTER_4(op, a,b,c,d) \
1597
+ op (a) \
1598
+ op (b) \
1599
+ op (c) \
1600
+ op (d) \
1601
+
1602
+ #define V8_G(a,b,c,d) \
1603
+ OP256_INTER_4 (OP256_0, a,b,c,d) \
1604
+ OP256_INTER_4 (OP256_1, a,b,c,d) \
1605
+ OP256_INTER_4 (OP256_2, a,b,c,d) \
1606
+ OP256_INTER_4 (OP256_3, a,b,c,d) \
1607
+ OP256_INTER_4 (OP256_4, a,b,c,d) \
1608
+ OP256_INTER_4 (OP256_5, a,b,c,d) \
1609
+ OP256_INTER_4 (OP256_6, a,b,c,d) \
1610
+ OP256_INTER_4 (OP256_7, a,b,c,d) \
1611
+ OP256_INTER_4 (OP256_1, a,b,c,d) \
1612
+ OP256_INTER_4 (OP256_2, a,b,c,d) \
1613
+ OP256_INTER_4 (OP256_8, a,b,c,d) \
1614
+ OP256_INTER_4 (OP256_4, a,b,c,d) \
1615
+ OP256_INTER_4 (OP256_5, a,b,c,d) \
1616
+ OP256_INTER_4 (OP256_9, a,b,c,d) \
1617
+
1618
+ #define V8R { \
1619
+ V8_G (0, 1, 2, 3) \
1620
+ V8_G (4, 5, 6, 7) \
1621
+ }
1622
+ #endif
1623
+
1624
+ #define V8_ROUND(r) { GET_SIGMA_PTR_256(r); V8R }
1625
+
1626
+
1627
+ // for debug:
1628
+ // #define Z7_BLAKE2S_PERMUTE_WITH_GATHER
1629
+ #if defined(Z7_BLAKE2S_PERMUTE_WITH_GATHER)
1630
+ // gather instruction is slow.
1631
+ #define V8_LOAD_MSG(w, m) \
1632
+ { \
1633
+ unsigned i; \
1634
+ for (i = 0; i < 16; ++i) { \
1635
+ w[i] = _mm256_i32gather_epi32( \
1636
+ (const void *)((m) + i * sizeof(UInt32)),\
1637
+ _mm256_set_epi32(0x70, 0x60, 0x50, 0x40, 0x30, 0x20, 0x10, 0x00), \
1638
+ sizeof(UInt32)); \
1639
+ } \
1640
+ }
1641
+ #else // !Z7_BLAKE2S_PERMUTE_WITH_GATHER
1642
+
1643
+ #define V8_LOAD_MSG_2(w, a0, a1) \
1644
+ { \
1645
+ (w)[0] = _mm256_permute2x128_si256(a0, a1, 0x20); \
1646
+ (w)[4] = _mm256_permute2x128_si256(a0, a1, 0x31); \
1647
+ }
1648
+
1649
+ #define V8_LOAD_MSG_4(w, z0, z1, z2, z3) \
1650
+ { \
1651
+ __m256i s0, s1, s2, s3; \
1652
+ s0 = _mm256_unpacklo_epi64(z0, z1); \
1653
+ s1 = _mm256_unpackhi_epi64(z0, z1); \
1654
+ s2 = _mm256_unpacklo_epi64(z2, z3); \
1655
+ s3 = _mm256_unpackhi_epi64(z2, z3); \
1656
+ V8_LOAD_MSG_2((w) + 0, s0, s2) \
1657
+ V8_LOAD_MSG_2((w) + 1, s1, s3) \
1658
+ }
1659
+
1660
+ #define V8_LOAD_MSG_0(t0, t1, m) \
1661
+ { \
1662
+ __m256i m0, m1; \
1663
+ m0 = LOADU_256(m); \
1664
+ m1 = LOADU_256((m) + 2 * 32); \
1665
+ t0 = _mm256_unpacklo_epi32(m0, m1); \
1666
+ t1 = _mm256_unpackhi_epi32(m0, m1); \
1667
+ }
1668
+
1669
+ #define V8_LOAD_MSG_8(w, m) \
1670
+ { \
1671
+ __m256i t0, t1, t2, t3, t4, t5, t6, t7; \
1672
+ V8_LOAD_MSG_0(t0, t4, (m) + 0 * 4 * 32) \
1673
+ V8_LOAD_MSG_0(t1, t5, (m) + 1 * 4 * 32) \
1674
+ V8_LOAD_MSG_0(t2, t6, (m) + 2 * 4 * 32) \
1675
+ V8_LOAD_MSG_0(t3, t7, (m) + 3 * 4 * 32) \
1676
+ V8_LOAD_MSG_4((w) , t0, t1, t2, t3) \
1677
+ V8_LOAD_MSG_4((w) + 2, t4, t5, t6, t7) \
1678
+ }
1679
+
1680
+ #define V8_LOAD_MSG(w, m) \
1681
+ { \
1682
+ V8_LOAD_MSG_8(w, m) \
1683
+ V8_LOAD_MSG_8((w) + 8, (m) + 32) \
1684
+ }
1685
+
1686
+ #endif // !Z7_BLAKE2S_PERMUTE_WITH_GATHER
1687
+
1688
+
1689
+ #define V8_PERM_PAIR_STORE(u, a0, a2) \
1690
+ { \
1691
+ STORE_256_TO_STRUCT((u), _mm256_permute2x128_si256(a0, a2, 0x20)); \
1692
+ STORE_256_TO_STRUCT((u) + 8, _mm256_permute2x128_si256(a0, a2, 0x31)); \
1693
+ }
1694
+
1695
+ #define V8_UNPACK_STORE_4(u, z0, z1, z2, z3) \
1696
+ { \
1697
+ __m256i s0, s1, s2, s3; \
1698
+ s0 = _mm256_unpacklo_epi64(z0, z1); \
1699
+ s1 = _mm256_unpackhi_epi64(z0, z1); \
1700
+ s2 = _mm256_unpacklo_epi64(z2, z3); \
1701
+ s3 = _mm256_unpackhi_epi64(z2, z3); \
1702
+ V8_PERM_PAIR_STORE(u + 0, s0, s2) \
1703
+ V8_PERM_PAIR_STORE(u + 2, s1, s3) \
1704
+ }
1705
+
1706
+ #define V8_UNPACK_STORE_0(src32, d0, d1) \
1707
+ { \
1708
+ const __m256i v0 = LOAD_256_FROM_STRUCT ((src32) ); \
1709
+ const __m256i v1 = LOAD_256_FROM_STRUCT ((src32) + 8); \
1710
+ d0 = _mm256_unpacklo_epi32(v0, v1); \
1711
+ d1 = _mm256_unpackhi_epi32(v0, v1); \
1712
+ }
1713
+
1714
+ #define V8_UNPACK_STATE(dest32, src32) \
1715
+ { \
1716
+ __m256i t0, t1, t2, t3, t4, t5, t6, t7; \
1717
+ V8_UNPACK_STORE_0 ((src32) + 16 * 0, t0, t4) \
1718
+ V8_UNPACK_STORE_0 ((src32) + 16 * 1, t1, t5) \
1719
+ V8_UNPACK_STORE_0 ((src32) + 16 * 2, t2, t6) \
1720
+ V8_UNPACK_STORE_0 ((src32) + 16 * 3, t3, t7) \
1721
+ V8_UNPACK_STORE_4 ((__m256i *)(void *)(dest32) , t0, t1, t2, t3) \
1722
+ V8_UNPACK_STORE_4 ((__m256i *)(void *)(dest32) + 4, t4, t5, t6, t7) \
1723
+ }
1724
+
1725
+
1726
+
1727
+ #define V8_LOAD_STATE_256_FROM_STRUCT(i) \
1728
+ v[i] = LOAD_256_FROM_STRUCT(s_items + (i) * 8);
1729
+
1730
+ #if 0 || 0 && defined(MY_CPU_X86)
1731
+ #define Z7_BLAKE2S_AVX2_FAST_USE_STRUCT
1732
+ #endif
1733
+
1734
+ #ifdef Z7_BLAKE2S_AVX2_FAST_USE_STRUCT
1735
+ // this branch doesn't use (iv) array
1736
+ // so register pressure can be lower.
1737
+ // it can be faster sometimes
1738
+ #define V8_LOAD_STATE_256(i) V8_LOAD_STATE_256_FROM_STRUCT(i)
1739
+ #define V8_UPDATE_STATE_256(i) \
1740
+ { \
1741
+ STORE_256_TO_STRUCT(s_items + (i) * 8, XOR_256( \
1742
+ XOR_256(v[i], v[(i) + 8]), \
1743
+ LOAD_256_FROM_STRUCT(s_items + (i) * 8))); \
1744
+ }
1745
+ #else
1746
+ // it uses more variables (iv) registers
1747
+ // it's better for gcc
1748
+ // maybe that branch is better, if register pressure will be lower (avx512)
1749
+ #define V8_LOAD_STATE_256(i) { iv[i] = v[i]; }
1750
+ #define V8_UPDATE_STATE_256(i) { v[i] = XOR_256(XOR_256(v[i], v[i + 8]), iv[i]); }
1751
+ #define V8_STORE_STATE_256(i) { STORE_256_TO_STRUCT(s_items + (i) * 8, v[i]); }
1752
+ #endif
1753
+
1754
+
1755
+ #if 0
1756
+ // use loading constants from memory
1757
+ #define KK8(n) KIV(n), KIV(n), KIV(n), KIV(n), KIV(n), KIV(n), KIV(n), KIV(n)
1758
+ MY_ALIGN(64)
1759
+ static const UInt32 k_Blake2s_IV_WAY8[]=
1760
+ {
1761
+ KK8(0), KK8(1), KK8(2), KK8(3), KK8(4), KK8(5), KK8(6), KK8(7)
1762
+ };
1763
+ #define GET_256_IV_WAY8(i) LOAD_256(k_Blake2s_IV_WAY8 + 8 * (i))
1764
+ #else
1765
+ // use constant generation:
1766
+ #define GET_256_IV_WAY8(i) _mm256_set1_epi32((Int32)KIV(i))
1767
+ #endif
1768
+
1769
+
1770
+ static
1771
+ Z7_NO_INLINE
1772
+ #ifdef BLAKE2S_ATTRIB_AVX2
1773
+ BLAKE2S_ATTRIB_AVX2
1774
+ #endif
1775
+ void
1776
+ Z7_FASTCALL
1777
+ Blake2sp_Compress2_AVX2_Fast(UInt32 *s_items, const Byte *data, const Byte *end)
1778
+ {
1779
+ #ifndef Z7_BLAKE2S_AVX2_FAST_USE_STRUCT
1780
+ __m256i v[16];
1781
+ #endif
1782
+
1783
+ // PrintStates2(s_items, 8, 16);
1784
+
1785
+ #ifndef Z7_BLAKE2S_AVX2_FAST_USE_STRUCT
1786
+ REP8_MACRO (V8_LOAD_STATE_256_FROM_STRUCT)
1787
+ #endif
1788
+
1789
+ do
1790
+ {
1791
+ __m256i w[16];
1792
+ #ifdef Z7_BLAKE2S_AVX2_FAST_USE_STRUCT
1793
+ __m256i v[16];
1794
+ #else
1795
+ __m256i iv[8];
1796
+ #endif
1797
+ V8_LOAD_MSG(w, data)
1798
+ {
1799
+ // we use load/store ctr inside loop to reduce register pressure:
1800
+ #if 1 || 1 && defined(MY_CPU_X86)
1801
+ const __m256i ctr = _mm256_add_epi64(
1802
+ LOAD_256_FROM_STRUCT(s_items + 64),
1803
+ _mm256_set_epi32(
1804
+ 0, 0, 0, Z7_BLAKE2S_BLOCK_SIZE,
1805
+ 0, 0, 0, Z7_BLAKE2S_BLOCK_SIZE));
1806
+ STORE_256_TO_STRUCT(s_items + 64, ctr);
1807
+ #else
1808
+ const UInt64 ctr64 = *(const UInt64 *)(const void *)(s_items + 64)
1809
+ + Z7_BLAKE2S_BLOCK_SIZE;
1810
+ const __m256i ctr = _mm256_set_epi64x(0, (Int64)ctr64, 0, (Int64)ctr64);
1811
+ *(UInt64 *)(void *)(s_items + 64) = ctr64;
1812
+ #endif
1813
+ v[12] = XOR_256 (GET_256_IV_WAY8(4), _mm256_shuffle_epi32(ctr, _MM_SHUFFLE(0, 0, 0, 0)));
1814
+ v[13] = XOR_256 (GET_256_IV_WAY8(5), _mm256_shuffle_epi32(ctr, _MM_SHUFFLE(1, 1, 1, 1)));
1815
+ }
1816
+ v[ 8] = GET_256_IV_WAY8(0);
1817
+ v[ 9] = GET_256_IV_WAY8(1);
1818
+ v[10] = GET_256_IV_WAY8(2);
1819
+ v[11] = GET_256_IV_WAY8(3);
1820
+ v[14] = GET_256_IV_WAY8(6);
1821
+ v[15] = GET_256_IV_WAY8(7);
1822
+
1823
+ REP8_MACRO (V8_LOAD_STATE_256)
1824
+ ROUNDS_LOOP (V8_ROUND)
1825
+ REP8_MACRO (V8_UPDATE_STATE_256)
1826
+ data += SUPER_BLOCK_SIZE;
1827
+ }
1828
+ while (data != end);
1829
+
1830
+ #ifndef Z7_BLAKE2S_AVX2_FAST_USE_STRUCT
1831
+ REP8_MACRO (V8_STORE_STATE_256)
1832
+ #endif
1833
+ }
1834
+
1835
+
1836
+ static
1837
+ Z7_NO_INLINE
1838
+ #ifdef BLAKE2S_ATTRIB_AVX2
1839
+ BLAKE2S_ATTRIB_AVX2
1840
+ #endif
1841
+ void
1842
+ Z7_FASTCALL
1843
+ Blake2sp_Final_AVX2_Fast(UInt32 *states)
1844
+ {
1845
+ const __m128i ctr = LOAD_128_FROM_STRUCT(states + 64);
1846
+ // PrintStates2(states, 8, 16);
1847
+ V8_UNPACK_STATE(states, states)
1848
+ // PrintStates2(states, 8, 16);
1849
+ {
1850
+ unsigned k;
1851
+ for (k = 0; k < 8; k++)
1852
+ {
1853
+ UInt32 *s = states + (size_t)k * 16;
1854
+ STORE_128_TO_STRUCT (STATE_T(s), ctr);
1855
+ }
1856
+ }
1857
+ // PrintStates2(states, 8, 16);
1858
+ // printf("\nafter V8_UNPACK_STATE \n");
1859
+ }
1860
+
1861
+ #endif // Z7_BLAKE2S_USE_AVX2_FAST
1862
+ #endif // avx2
1863
+ #endif // vector
1864
+
1865
+
1866
+ /*
1867
+ #define Blake2s_Increment_Counter(s, inc) \
1868
+ { STATE_T(s)[0] += (inc); STATE_T(s)[1] += (STATE_T(s)[0] < (inc)); }
1869
+ #define Blake2s_Increment_Counter_Small(s, inc) \
1870
+ { STATE_T(s)[0] += (inc); }
1871
+ */
1872
+
1873
+ #define Blake2s_Set_LastBlock(s) \
1874
+ { STATE_F(s)[0] = BLAKE2S_FINAL_FLAG; /* STATE_F(s)[1] = p->u.header.lastNode_f1; */ }
1875
+
1876
+
1877
+ #if 0 || 1 && defined(Z7_MSC_VER_ORIGINAL) && Z7_MSC_VER_ORIGINAL >= 1600
1878
+ // good for vs2022
1879
+ #define LOOP_8(mac) { unsigned kkk; for (kkk = 0; kkk < 8; kkk++) mac(kkk) }
1880
+ #else
1881
+ // good for Z7_BLAKE2S_UNROLL for GCC9 (arm*/x86*) and MSC_VER_1400-x64.
1882
+ #define LOOP_8(mac) { REP8_MACRO(mac) }
1883
+ #endif
1884
+
1885
+
1886
+ static
1887
+ Z7_FORCE_INLINE
1888
+ // Z7_NO_INLINE
1889
+ void
1890
+ Z7_FASTCALL
1891
+ Blake2s_Compress(UInt32 *s, const Byte *input)
1892
+ {
1893
+ UInt32 m[16];
1894
+ UInt32 v[16];
1895
+ {
1896
+ unsigned i;
1897
+ for (i = 0; i < 16; i++)
1898
+ m[i] = GetUi32(input + i * 4);
1899
+ }
1900
+
1901
+ #define INIT_v_FROM_s(i) v[i] = s[i];
1902
+
1903
+ LOOP_8(INIT_v_FROM_s)
1904
+
1905
+ // Blake2s_Increment_Counter(s, Z7_BLAKE2S_BLOCK_SIZE)
1906
+ {
1907
+ const UInt32 t0 = STATE_T(s)[0] + Z7_BLAKE2S_BLOCK_SIZE;
1908
+ const UInt32 t1 = STATE_T(s)[1] + (t0 < Z7_BLAKE2S_BLOCK_SIZE);
1909
+ STATE_T(s)[0] = t0;
1910
+ STATE_T(s)[1] = t1;
1911
+ v[12] = t0 ^ KIV(4);
1912
+ v[13] = t1 ^ KIV(5);
1913
+ }
1914
+ // v[12] = STATE_T(s)[0] ^ KIV(4);
1915
+ // v[13] = STATE_T(s)[1] ^ KIV(5);
1916
+ v[14] = STATE_F(s)[0] ^ KIV(6);
1917
+ v[15] = STATE_F(s)[1] ^ KIV(7);
1918
+
1919
+ v[ 8] = KIV(0);
1920
+ v[ 9] = KIV(1);
1921
+ v[10] = KIV(2);
1922
+ v[11] = KIV(3);
1923
+ // PrintStates2((const UInt32 *)v, 1, 16);
1924
+
1925
+ #define ADD_SIGMA(a, index) V(a, 0) += *(const UInt32 *)GET_SIGMA_PTR(m, sigma[index]);
1926
+ #define ADD32M(dest, src, a) V(a, dest) += V(a, src);
1927
+ #define XOR32M(dest, src, a) V(a, dest) ^= V(a, src);
1928
+ #define RTR32M(dest, shift, a) V(a, dest) = rotrFixed(V(a, dest), shift);
1929
+
1930
+ // big interleaving can provides big performance gain, if scheduler queues are small.
1931
+ #if 0 || 1 && defined(MY_CPU_X86)
1932
+ // interleave-1: for small register number (x86-32bit)
1933
+ #define G2(index, a, x, y) \
1934
+ ADD_SIGMA (a, (index) + 2 * 0) \
1935
+ ADD32M (0, 1, a) \
1936
+ XOR32M (3, 0, a) \
1937
+ RTR32M (3, x, a) \
1938
+ ADD32M (2, 3, a) \
1939
+ XOR32M (1, 2, a) \
1940
+ RTR32M (1, y, a) \
1941
+
1942
+ #define G(a) \
1943
+ G2(a * 2 , a, 16, 12) \
1944
+ G2(a * 2 + 1, a, 8, 7) \
1945
+
1946
+ #define R2 \
1947
+ G(0) \
1948
+ G(1) \
1949
+ G(2) \
1950
+ G(3) \
1951
+ G(4) \
1952
+ G(5) \
1953
+ G(6) \
1954
+ G(7) \
1955
+
1956
+ #elif 0 || 1 && defined(MY_CPU_X86_OR_AMD64)
1957
+ // interleave-2: is good if the number of registers is not big (x86-64).
1958
+
1959
+ #define REP2(mac, dest, src, a, b) \
1960
+ mac(dest, src, a) \
1961
+ mac(dest, src, b)
1962
+
1963
+ #define G2(index, a, b, x, y) \
1964
+ ADD_SIGMA (a, (index) + 2 * 0) \
1965
+ ADD_SIGMA (b, (index) + 2 * 1) \
1966
+ REP2 (ADD32M, 0, 1, a, b) \
1967
+ REP2 (XOR32M, 3, 0, a, b) \
1968
+ REP2 (RTR32M, 3, x, a, b) \
1969
+ REP2 (ADD32M, 2, 3, a, b) \
1970
+ REP2 (XOR32M, 1, 2, a, b) \
1971
+ REP2 (RTR32M, 1, y, a, b) \
1972
+
1973
+ #define G(a, b) \
1974
+ G2(a * 2 , a, b, 16, 12) \
1975
+ G2(a * 2 + 1, a, b, 8, 7) \
1976
+
1977
+ #define R2 \
1978
+ G(0, 1) \
1979
+ G(2, 3) \
1980
+ G(4, 5) \
1981
+ G(6, 7) \
1982
+
1983
+ #else
1984
+ // interleave-4:
1985
+ // it has big register pressure for x86/x64.
1986
+ // and MSVC compilers for x86/x64 are slow for this branch.
1987
+ // but if we have big number of registers, this branch can be faster.
1988
+
1989
+ #define REP4(mac, dest, src, a, b, c, d) \
1990
+ mac(dest, src, a) \
1991
+ mac(dest, src, b) \
1992
+ mac(dest, src, c) \
1993
+ mac(dest, src, d)
1994
+
1995
+ #define G2(index, a, b, c, d, x, y) \
1996
+ ADD_SIGMA (a, (index) + 2 * 0) \
1997
+ ADD_SIGMA (b, (index) + 2 * 1) \
1998
+ ADD_SIGMA (c, (index) + 2 * 2) \
1999
+ ADD_SIGMA (d, (index) + 2 * 3) \
2000
+ REP4 (ADD32M, 0, 1, a, b, c, d) \
2001
+ REP4 (XOR32M, 3, 0, a, b, c, d) \
2002
+ REP4 (RTR32M, 3, x, a, b, c, d) \
2003
+ REP4 (ADD32M, 2, 3, a, b, c, d) \
2004
+ REP4 (XOR32M, 1, 2, a, b, c, d) \
2005
+ REP4 (RTR32M, 1, y, a, b, c, d) \
2006
+
2007
+ #define G(a, b, c, d) \
2008
+ G2(a * 2 , a, b, c, d, 16, 12) \
2009
+ G2(a * 2 + 1, a, b, c, d, 8, 7) \
2010
+
2011
+ #define R2 \
2012
+ G(0, 1, 2, 3) \
2013
+ G(4, 5, 6, 7) \
2014
+
2015
+ #endif
2016
+
2017
+ #define R(r) { const Byte *sigma = k_Blake2s_Sigma_4[r]; R2 }
2018
+
2019
+ // Z7_BLAKE2S_UNROLL gives 5-6 KB larger code, but faster:
2020
+ // 20-40% faster for (x86/x64) VC2010+/GCC/CLANG.
2021
+ // 30-60% faster for (arm64-arm32) GCC.
2022
+ // 5-11% faster for (arm64) CLANG-MAC.
2023
+ // so Z7_BLAKE2S_UNROLL is good optimization, if there is no vector branch.
2024
+ // But if there is vectors branch (for x86*), this scalar code will be unused mostly.
2025
+ // So we want smaller code (without unrolling) in that case (x86*).
2026
+ #if 0 || 1 && !defined(Z7_BLAKE2S_USE_VECTORS)
2027
+ #define Z7_BLAKE2S_UNROLL
2028
+ #endif
2029
+
2030
+ #ifdef Z7_BLAKE2S_UNROLL
2031
+ ROUNDS_LOOP_UNROLLED (R)
2032
+ #else
2033
+ ROUNDS_LOOP (R)
2034
+ #endif
2035
+
2036
+ #undef G
2037
+ #undef G2
2038
+ #undef R
2039
+ #undef R2
2040
+
2041
+ // printf("\n v after: \n");
2042
+ // PrintStates2((const UInt32 *)v, 1, 16);
2043
+ #define XOR_s_PAIR_v(i) s[i] ^= v[i] ^ v[i + 8];
2044
+
2045
+ LOOP_8(XOR_s_PAIR_v)
2046
+ // printf("\n s after:\n");
2047
+ // PrintStates2((const UInt32 *)s, 1, 16);
2048
+ }
2049
+
2050
+
2051
+ static
2052
+ Z7_NO_INLINE
2053
+ void
2054
+ Z7_FASTCALL
2055
+ Blake2sp_Compress2(UInt32 *s_items, const Byte *data, const Byte *end)
2056
+ {
2057
+ size_t pos = 0;
2058
+ // PrintStates2(s_items, 8, 16);
2059
+ do
2060
+ {
2061
+ UInt32 * const s = GET_STATE_TABLE_PTR_FROM_BYTE_POS(s_items, pos);
2062
+ Blake2s_Compress(s, data);
2063
+ data += Z7_BLAKE2S_BLOCK_SIZE;
2064
+ pos += Z7_BLAKE2S_BLOCK_SIZE;
2065
+ pos &= SUPER_BLOCK_MASK;
2066
+ }
2067
+ while (data != end);
2068
+ }
2069
+
2070
+
2071
+ #ifdef Z7_BLAKE2S_USE_VECTORS
2072
+
2073
+ static Z7_BLAKE2SP_FUNC_COMPRESS g_Z7_BLAKE2SP_FUNC_COMPRESS_Fast = Blake2sp_Compress2;
2074
+ static Z7_BLAKE2SP_FUNC_COMPRESS g_Z7_BLAKE2SP_FUNC_COMPRESS_Single = Blake2sp_Compress2;
2075
+ static Z7_BLAKE2SP_FUNC_INIT g_Z7_BLAKE2SP_FUNC_INIT_Init;
2076
+ static Z7_BLAKE2SP_FUNC_INIT g_Z7_BLAKE2SP_FUNC_INIT_Final;
2077
+ static unsigned g_z7_Blake2sp_SupportedFlags;
2078
+
2079
+ #define Z7_BLAKE2SP_Compress_Fast(p) (p)->u.header.func_Compress_Fast
2080
+ #define Z7_BLAKE2SP_Compress_Single(p) (p)->u.header.func_Compress_Single
2081
+ #else
2082
+ #define Z7_BLAKE2SP_Compress_Fast(p) Blake2sp_Compress2
2083
+ #define Z7_BLAKE2SP_Compress_Single(p) Blake2sp_Compress2
2084
+ #endif // Z7_BLAKE2S_USE_VECTORS
2085
+
2086
+
2087
+ #if 1 && defined(MY_CPU_LE)
2088
+ #define GET_DIGEST(_s, _digest) \
2089
+ { memcpy(_digest, _s, Z7_BLAKE2S_DIGEST_SIZE); }
2090
+ #else
2091
+ #define GET_DIGEST(_s, _digest) \
2092
+ { unsigned _i; for (_i = 0; _i < 8; _i++) \
2093
+ { SetUi32((_digest) + 4 * _i, (_s)[_i]) } \
2094
+ }
2095
+ #endif
2096
+
2097
+
2098
+ /* ---------- BLAKE2s ---------- */
2099
+ /*
2100
+ // we need to xor CBlake2s::h[i] with input parameter block after Blake2s_Init0()
2101
+ typedef struct
2102
+ {
2103
+ Byte digest_length;
2104
+ Byte key_length;
2105
+ Byte fanout; // = 1 : in sequential mode
2106
+ Byte depth; // = 1 : in sequential mode
2107
+ UInt32 leaf_length;
2108
+ Byte node_offset[6]; // 0 for the first, leftmost, leaf, or in sequential mode
2109
+ Byte node_depth; // 0 for the leaves, or in sequential mode
2110
+ Byte inner_length; // [0, 32], 0 in sequential mode
2111
+ Byte salt[BLAKE2S_SALTBYTES];
2112
+ Byte personal[BLAKE2S_PERSONALBYTES];
2113
+ } CBlake2sParam;
2114
+ */
2115
+
2116
+ #define k_Blake2sp_IV_0 \
2117
+ (KIV(0) ^ (Z7_BLAKE2S_DIGEST_SIZE | ((UInt32)Z7_BLAKE2SP_PARALLEL_DEGREE << 16) | ((UInt32)2 << 24)))
2118
+ #define k_Blake2sp_IV_3_FROM_NODE_DEPTH(node_depth) \
2119
+ (KIV(3) ^ ((UInt32)(node_depth) << 16) ^ ((UInt32)Z7_BLAKE2S_DIGEST_SIZE << 24))
2120
+
2121
+ Z7_FORCE_INLINE
2122
+ static void Blake2sp_Init_Spec(UInt32 *s, unsigned node_offset, unsigned node_depth)
2123
+ {
2124
+ s[0] = k_Blake2sp_IV_0;
2125
+ s[1] = KIV(1);
2126
+ s[2] = KIV(2) ^ (UInt32)node_offset;
2127
+ s[3] = k_Blake2sp_IV_3_FROM_NODE_DEPTH(node_depth);
2128
+ s[4] = KIV(4);
2129
+ s[5] = KIV(5);
2130
+ s[6] = KIV(6);
2131
+ s[7] = KIV(7);
2132
+
2133
+ STATE_T(s)[0] = 0;
2134
+ STATE_T(s)[1] = 0;
2135
+ STATE_F(s)[0] = 0;
2136
+ STATE_F(s)[1] = 0;
2137
+ }
2138
+
2139
+
2140
+ #ifdef Z7_BLAKE2S_USE_V128_FAST
2141
+
2142
+ static
2143
+ Z7_NO_INLINE
2144
+ #ifdef BLAKE2S_ATTRIB_128BIT
2145
+ BLAKE2S_ATTRIB_128BIT
2146
+ #endif
2147
+ void
2148
+ Z7_FASTCALL
2149
+ Blake2sp_InitState_V128_Fast(UInt32 *states)
2150
+ {
2151
+ #define STORE_128_PAIR_INIT_STATES_2(i, t0, t1) \
2152
+ { STORE_128_TO_STRUCT(states + 0 + 4 * (i), (t0)); \
2153
+ STORE_128_TO_STRUCT(states + 32 + 4 * (i), (t1)); \
2154
+ }
2155
+ #define STORE_128_PAIR_INIT_STATES_1(i, mac) \
2156
+ { const __m128i t = mac; \
2157
+ STORE_128_PAIR_INIT_STATES_2(i, t, t) \
2158
+ }
2159
+ #define STORE_128_PAIR_INIT_STATES_IV(i) \
2160
+ STORE_128_PAIR_INIT_STATES_1(i, GET_128_IV_WAY4(i))
2161
+
2162
+ STORE_128_PAIR_INIT_STATES_1 (0, _mm_set1_epi32((Int32)k_Blake2sp_IV_0))
2163
+ STORE_128_PAIR_INIT_STATES_IV (1)
2164
+ {
2165
+ const __m128i t = GET_128_IV_WAY4(2);
2166
+ STORE_128_PAIR_INIT_STATES_2 (2,
2167
+ XOR_128(t, _mm_set_epi32(3, 2, 1, 0)),
2168
+ XOR_128(t, _mm_set_epi32(7, 6, 5, 4)))
2169
+ }
2170
+ STORE_128_PAIR_INIT_STATES_1 (3, _mm_set1_epi32((Int32)k_Blake2sp_IV_3_FROM_NODE_DEPTH(0)))
2171
+ STORE_128_PAIR_INIT_STATES_IV (4)
2172
+ STORE_128_PAIR_INIT_STATES_IV (5)
2173
+ STORE_128_PAIR_INIT_STATES_IV (6)
2174
+ STORE_128_PAIR_INIT_STATES_IV (7)
2175
+ STORE_128_PAIR_INIT_STATES_1 (16, _mm_set_epi32(0, 0, 0, 0))
2176
+ // printf("\n== exit Blake2sp_InitState_V128_Fast ctr=%d\n", states[64]);
2177
+ }
2178
+
2179
+ #endif // Z7_BLAKE2S_USE_V128_FAST
2180
+
2181
+
2182
+ #ifdef Z7_BLAKE2S_USE_AVX2_FAST
2183
+
2184
+ static
2185
+ Z7_NO_INLINE
2186
+ #ifdef BLAKE2S_ATTRIB_AVX2
2187
+ BLAKE2S_ATTRIB_AVX2
2188
+ #endif
2189
+ void
2190
+ Z7_FASTCALL
2191
+ Blake2sp_InitState_AVX2_Fast(UInt32 *states)
2192
+ {
2193
+ #define STORE_256_INIT_STATES(i, t) \
2194
+ STORE_256_TO_STRUCT(states + 8 * (i), t);
2195
+ #define STORE_256_INIT_STATES_IV(i) \
2196
+ STORE_256_INIT_STATES(i, GET_256_IV_WAY8(i))
2197
+
2198
+ STORE_256_INIT_STATES (0, _mm256_set1_epi32((Int32)k_Blake2sp_IV_0))
2199
+ STORE_256_INIT_STATES_IV (1)
2200
+ STORE_256_INIT_STATES (2, XOR_256( GET_256_IV_WAY8(2),
2201
+ _mm256_set_epi32(7, 6, 5, 4, 3, 2, 1, 0)))
2202
+ STORE_256_INIT_STATES (3, _mm256_set1_epi32((Int32)k_Blake2sp_IV_3_FROM_NODE_DEPTH(0)))
2203
+ STORE_256_INIT_STATES_IV (4)
2204
+ STORE_256_INIT_STATES_IV (5)
2205
+ STORE_256_INIT_STATES_IV (6)
2206
+ STORE_256_INIT_STATES_IV (7)
2207
+ STORE_256_INIT_STATES (8, _mm256_set_epi32(0, 0, 0, 0, 0, 0, 0, 0))
2208
+ // printf("\n== exit Blake2sp_InitState_AVX2_Fast\n");
2209
+ }
2210
+
2211
+ #endif // Z7_BLAKE2S_USE_AVX2_FAST
2212
+
2213
+
2214
+
2215
+ Z7_NO_INLINE
2216
+ void Blake2sp_InitState(CBlake2sp *p)
2217
+ {
2218
+ size_t i;
2219
+ // memset(p->states, 0, sizeof(p->states)); // for debug
2220
+ p->u.header.cycPos = 0;
2221
+ #ifdef Z7_BLAKE2SP_USE_FUNCTIONS
2222
+ if (p->u.header.func_Init)
2223
+ {
2224
+ p->u.header.func_Init(p->states);
2225
+ return;
2226
+ }
2227
+ #endif
2228
+ for (i = 0; i < Z7_BLAKE2SP_PARALLEL_DEGREE; i++)
2229
+ Blake2sp_Init_Spec(p->states + i * NSW, (unsigned)i, 0);
2230
+ }
2231
+
2232
+ void Blake2sp_Init(CBlake2sp *p)
2233
+ {
2234
+ #ifdef Z7_BLAKE2SP_USE_FUNCTIONS
2235
+ p->u.header.func_Compress_Fast =
2236
+ #ifdef Z7_BLAKE2S_USE_VECTORS
2237
+ g_Z7_BLAKE2SP_FUNC_COMPRESS_Fast;
2238
+ #else
2239
+ NULL;
2240
+ #endif
2241
+
2242
+ p->u.header.func_Compress_Single =
2243
+ #ifdef Z7_BLAKE2S_USE_VECTORS
2244
+ g_Z7_BLAKE2SP_FUNC_COMPRESS_Single;
2245
+ #else
2246
+ NULL;
2247
+ #endif
2248
+
2249
+ p->u.header.func_Init =
2250
+ #ifdef Z7_BLAKE2S_USE_VECTORS
2251
+ g_Z7_BLAKE2SP_FUNC_INIT_Init;
2252
+ #else
2253
+ NULL;
2254
+ #endif
2255
+
2256
+ p->u.header.func_Final =
2257
+ #ifdef Z7_BLAKE2S_USE_VECTORS
2258
+ g_Z7_BLAKE2SP_FUNC_INIT_Final;
2259
+ #else
2260
+ NULL;
2261
+ #endif
2262
+ #endif
2263
+
2264
+ Blake2sp_InitState(p);
2265
+ }
2266
+
2267
+
2268
+ void Blake2sp_Update(CBlake2sp *p, const Byte *data, size_t size)
2269
+ {
2270
+ size_t pos;
2271
+ // printf("\nsize = 0x%6x, cycPos = %5u data = %p\n", (unsigned)size, (unsigned)p->u.header.cycPos, data);
2272
+ if (size == 0)
2273
+ return;
2274
+ pos = p->u.header.cycPos;
2275
+ // pos < SUPER_BLOCK_SIZE * 2 : is expected
2276
+ // pos == SUPER_BLOCK_SIZE * 2 : is not expected, but is supported also
2277
+ {
2278
+ const size_t pos2 = pos & SUPER_BLOCK_MASK;
2279
+ if (pos2)
2280
+ {
2281
+ const size_t rem = SUPER_BLOCK_SIZE - pos2;
2282
+ if (rem > size)
2283
+ {
2284
+ p->u.header.cycPos = (unsigned)(pos + size);
2285
+ // cycPos < SUPER_BLOCK_SIZE * 2
2286
+ memcpy((Byte *)(void *)p->buf32 + pos, data, size);
2287
+ /* to simpilify the code here we don't try to process first superblock,
2288
+ if (cycPos > SUPER_BLOCK_SIZE * 2 - Z7_BLAKE2S_BLOCK_SIZE) */
2289
+ return;
2290
+ }
2291
+ // (rem <= size)
2292
+ memcpy((Byte *)(void *)p->buf32 + pos, data, rem);
2293
+ pos += rem;
2294
+ data += rem;
2295
+ size -= rem;
2296
+ }
2297
+ }
2298
+
2299
+ // pos <= SUPER_BLOCK_SIZE * 2
2300
+ // pos % SUPER_BLOCK_SIZE == 0
2301
+ if (pos)
2302
+ {
2303
+ /* pos == SUPER_BLOCK_SIZE ||
2304
+ pos == SUPER_BLOCK_SIZE * 2 */
2305
+ size_t end = pos;
2306
+ if (size > SUPER_BLOCK_SIZE - Z7_BLAKE2S_BLOCK_SIZE
2307
+ || (end -= SUPER_BLOCK_SIZE))
2308
+ {
2309
+ Z7_BLAKE2SP_Compress_Fast(p)(p->states,
2310
+ (const Byte *)(const void *)p->buf32,
2311
+ (const Byte *)(const void *)p->buf32 + end);
2312
+ if (pos -= end)
2313
+ memcpy(p->buf32, (const Byte *)(const void *)p->buf32
2314
+ + SUPER_BLOCK_SIZE, SUPER_BLOCK_SIZE);
2315
+ }
2316
+ }
2317
+
2318
+ // pos == 0 || (pos == SUPER_BLOCK_SIZE && size <= SUPER_BLOCK_SIZE - Z7_BLAKE2S_BLOCK_SIZE)
2319
+ if (size > SUPER_BLOCK_SIZE * 2 - Z7_BLAKE2S_BLOCK_SIZE)
2320
+ {
2321
+ // pos == 0
2322
+ const Byte *end;
2323
+ const size_t size2 = (size - (SUPER_BLOCK_SIZE - Z7_BLAKE2S_BLOCK_SIZE + 1))
2324
+ & ~(size_t)SUPER_BLOCK_MASK;
2325
+ size -= size2;
2326
+ // size < SUPER_BLOCK_SIZE * 2
2327
+ end = data + size2;
2328
+ Z7_BLAKE2SP_Compress_Fast(p)(p->states, data, end);
2329
+ data = end;
2330
+ }
2331
+
2332
+ if (size != 0)
2333
+ {
2334
+ memcpy((Byte *)(void *)p->buf32 + pos, data, size);
2335
+ pos += size;
2336
+ }
2337
+ p->u.header.cycPos = (unsigned)pos;
2338
+ // cycPos < SUPER_BLOCK_SIZE * 2
2339
+ }
2340
+
2341
+
2342
+ void Blake2sp_Final(CBlake2sp *p, Byte *digest)
2343
+ {
2344
+ // UInt32 * const R_states = p->states;
2345
+ // printf("\nBlake2sp_Final \n");
2346
+ #ifdef Z7_BLAKE2SP_USE_FUNCTIONS
2347
+ if (p->u.header.func_Final)
2348
+ p->u.header.func_Final(p->states);
2349
+ #endif
2350
+ // printf("\n=====\nBlake2sp_Final \n");
2351
+ // PrintStates(p->states, 32);
2352
+
2353
+ // (p->u.header.cycPos == SUPER_BLOCK_SIZE) can be processed in any branch:
2354
+ if (p->u.header.cycPos <= SUPER_BLOCK_SIZE)
2355
+ {
2356
+ unsigned pos;
2357
+ memset((Byte *)(void *)p->buf32 + p->u.header.cycPos,
2358
+ 0, SUPER_BLOCK_SIZE - p->u.header.cycPos);
2359
+ STATE_F(&p->states[(Z7_BLAKE2SP_PARALLEL_DEGREE - 1) * NSW])[1] = BLAKE2S_FINAL_FLAG;
2360
+ for (pos = 0; pos < SUPER_BLOCK_SIZE; pos += Z7_BLAKE2S_BLOCK_SIZE)
2361
+ {
2362
+ UInt32 * const s = GET_STATE_TABLE_PTR_FROM_BYTE_POS(p->states, pos);
2363
+ Blake2s_Set_LastBlock(s)
2364
+ if (pos + Z7_BLAKE2S_BLOCK_SIZE > p->u.header.cycPos)
2365
+ {
2366
+ UInt32 delta = Z7_BLAKE2S_BLOCK_SIZE;
2367
+ if (pos < p->u.header.cycPos)
2368
+ delta -= p->u.header.cycPos & (Z7_BLAKE2S_BLOCK_SIZE - 1);
2369
+ // 0 < delta <= Z7_BLAKE2S_BLOCK_SIZE
2370
+ {
2371
+ const UInt32 v = STATE_T(s)[0];
2372
+ STATE_T(s)[1] -= v < delta; // (v < delta) is same condition here as (v == 0)
2373
+ STATE_T(s)[0] = v - delta;
2374
+ }
2375
+ }
2376
+ }
2377
+ // PrintStates(p->states, 16);
2378
+ Z7_BLAKE2SP_Compress_Single(p)(p->states,
2379
+ (Byte *)(void *)p->buf32,
2380
+ (Byte *)(void *)p->buf32 + SUPER_BLOCK_SIZE);
2381
+ // PrintStates(p->states, 16);
2382
+ }
2383
+ else
2384
+ {
2385
+ // (p->u.header.cycPos > SUPER_BLOCK_SIZE)
2386
+ unsigned pos;
2387
+ for (pos = 0; pos < SUPER_BLOCK_SIZE; pos += Z7_BLAKE2S_BLOCK_SIZE)
2388
+ {
2389
+ UInt32 * const s = GET_STATE_TABLE_PTR_FROM_BYTE_POS(p->states, pos);
2390
+ if (pos + SUPER_BLOCK_SIZE >= p->u.header.cycPos)
2391
+ Blake2s_Set_LastBlock(s)
2392
+ }
2393
+ if (p->u.header.cycPos <= SUPER_BLOCK_SIZE * 2 - Z7_BLAKE2S_BLOCK_SIZE)
2394
+ STATE_F(&p->states[(Z7_BLAKE2SP_PARALLEL_DEGREE - 1) * NSW])[1] = BLAKE2S_FINAL_FLAG;
2395
+
2396
+ Z7_BLAKE2SP_Compress_Single(p)(p->states,
2397
+ (Byte *)(void *)p->buf32,
2398
+ (Byte *)(void *)p->buf32 + SUPER_BLOCK_SIZE);
2399
+
2400
+ // if (p->u.header.cycPos > SUPER_BLOCK_SIZE * 2 - Z7_BLAKE2S_BLOCK_SIZE;
2401
+ STATE_F(&p->states[(Z7_BLAKE2SP_PARALLEL_DEGREE - 1) * NSW])[1] = BLAKE2S_FINAL_FLAG;
2402
+
2403
+ // if (p->u.header.cycPos != SUPER_BLOCK_SIZE)
2404
+ {
2405
+ pos = SUPER_BLOCK_SIZE;
2406
+ for (;;)
2407
+ {
2408
+ UInt32 * const s = GET_STATE_TABLE_PTR_FROM_BYTE_POS(p->states, pos & SUPER_BLOCK_MASK);
2409
+ Blake2s_Set_LastBlock(s)
2410
+ pos += Z7_BLAKE2S_BLOCK_SIZE;
2411
+ if (pos >= p->u.header.cycPos)
2412
+ {
2413
+ if (pos != p->u.header.cycPos)
2414
+ {
2415
+ const UInt32 delta = pos - p->u.header.cycPos;
2416
+ const UInt32 v = STATE_T(s)[0];
2417
+ STATE_T(s)[1] -= v < delta;
2418
+ STATE_T(s)[0] = v - delta;
2419
+ memset((Byte *)(void *)p->buf32 + p->u.header.cycPos, 0, delta);
2420
+ }
2421
+ break;
2422
+ }
2423
+ }
2424
+ Z7_BLAKE2SP_Compress_Single(p)(p->states,
2425
+ (Byte *)(void *)p->buf32 + SUPER_BLOCK_SIZE,
2426
+ (Byte *)(void *)p->buf32 + pos);
2427
+ }
2428
+ }
2429
+
2430
+ {
2431
+ size_t pos;
2432
+ for (pos = 0; pos < SUPER_BLOCK_SIZE / 2; pos += Z7_BLAKE2S_BLOCK_SIZE / 2)
2433
+ {
2434
+ const UInt32 * const s = GET_STATE_TABLE_PTR_FROM_BYTE_POS(p->states, (pos * 2));
2435
+ Byte *dest = (Byte *)(void *)p->buf32 + pos;
2436
+ GET_DIGEST(s, dest)
2437
+ }
2438
+ }
2439
+ Blake2sp_Init_Spec(p->states, 0, 1);
2440
+ {
2441
+ size_t pos;
2442
+ for (pos = 0; pos < (Z7_BLAKE2SP_PARALLEL_DEGREE * Z7_BLAKE2S_DIGEST_SIZE)
2443
+ - Z7_BLAKE2S_BLOCK_SIZE; pos += Z7_BLAKE2S_BLOCK_SIZE)
2444
+ {
2445
+ Z7_BLAKE2SP_Compress_Single(p)(p->states,
2446
+ (const Byte *)(const void *)p->buf32 + pos,
2447
+ (const Byte *)(const void *)p->buf32 + pos + Z7_BLAKE2S_BLOCK_SIZE);
2448
+ }
2449
+ }
2450
+ // Blake2s_Final(p->states, 0, digest, p, (Byte *)(void *)p->buf32 + i);
2451
+ Blake2s_Set_LastBlock(p->states)
2452
+ STATE_F(p->states)[1] = BLAKE2S_FINAL_FLAG;
2453
+ {
2454
+ Z7_BLAKE2SP_Compress_Single(p)(p->states,
2455
+ (const Byte *)(const void *)p->buf32 + Z7_BLAKE2SP_PARALLEL_DEGREE / 2 * Z7_BLAKE2S_BLOCK_SIZE - Z7_BLAKE2S_BLOCK_SIZE,
2456
+ (const Byte *)(const void *)p->buf32 + Z7_BLAKE2SP_PARALLEL_DEGREE / 2 * Z7_BLAKE2S_BLOCK_SIZE);
2457
+ }
2458
+ GET_DIGEST(p->states, digest)
2459
+ // printf("\n Blake2sp_Final 555 numDataInBufs = %5u\n", (unsigned)p->u.header.numDataInBufs);
2460
+ }
2461
+
2462
+
2463
+ BoolInt Blake2sp_SetFunction(CBlake2sp *p, unsigned algo)
2464
+ {
2465
+ // printf("\n========== setfunction = %d ======== \n", algo);
2466
+ #ifdef Z7_BLAKE2SP_USE_FUNCTIONS
2467
+ Z7_BLAKE2SP_FUNC_COMPRESS func = NULL;
2468
+ Z7_BLAKE2SP_FUNC_COMPRESS func_Single = NULL;
2469
+ Z7_BLAKE2SP_FUNC_INIT func_Final = NULL;
2470
+ Z7_BLAKE2SP_FUNC_INIT func_Init = NULL;
2471
+ #else
2472
+ UNUSED_VAR(p)
2473
+ #endif
2474
+
2475
+ #ifdef Z7_BLAKE2S_USE_VECTORS
2476
+
2477
+ func = func_Single = Blake2sp_Compress2;
2478
+
2479
+ if (algo != Z7_BLAKE2SP_ALGO_SCALAR)
2480
+ {
2481
+ // printf("\n========== setfunction NON-SCALER ======== \n");
2482
+ if (algo == Z7_BLAKE2SP_ALGO_DEFAULT)
2483
+ {
2484
+ func = g_Z7_BLAKE2SP_FUNC_COMPRESS_Fast;
2485
+ func_Single = g_Z7_BLAKE2SP_FUNC_COMPRESS_Single;
2486
+ func_Init = g_Z7_BLAKE2SP_FUNC_INIT_Init;
2487
+ func_Final = g_Z7_BLAKE2SP_FUNC_INIT_Final;
2488
+ }
2489
+ else
2490
+ {
2491
+ if ((g_z7_Blake2sp_SupportedFlags & (1u << algo)) == 0)
2492
+ return False;
2493
+
2494
+ #ifdef Z7_BLAKE2S_USE_AVX2
2495
+
2496
+ func_Single =
2497
+ #if defined(Z7_BLAKE2S_USE_AVX2_WAY2)
2498
+ Blake2sp_Compress2_AVX2_Way2;
2499
+ #else
2500
+ Z7_BLAKE2S_Compress2_V128;
2501
+ #endif
2502
+
2503
+ #ifdef Z7_BLAKE2S_USE_AVX2_FAST
2504
+ if (algo == Z7_BLAKE2SP_ALGO_V256_FAST)
2505
+ {
2506
+ func = Blake2sp_Compress2_AVX2_Fast;
2507
+ func_Final = Blake2sp_Final_AVX2_Fast;
2508
+ func_Init = Blake2sp_InitState_AVX2_Fast;
2509
+ }
2510
+ else
2511
+ #endif
2512
+ #ifdef Z7_BLAKE2S_USE_AVX2_WAY2
2513
+ if (algo == Z7_BLAKE2SP_ALGO_V256_WAY2)
2514
+ func = Blake2sp_Compress2_AVX2_Way2;
2515
+ else
2516
+ #endif
2517
+ #ifdef Z7_BLAKE2S_USE_AVX2_WAY4
2518
+ if (algo == Z7_BLAKE2SP_ALGO_V256_WAY4)
2519
+ {
2520
+ func_Single = func = Blake2sp_Compress2_AVX2_Way4;
2521
+ }
2522
+ else
2523
+ #endif
2524
+ #endif // avx2
2525
+ {
2526
+ if (algo == Z7_BLAKE2SP_ALGO_V128_FAST)
2527
+ {
2528
+ func = Blake2sp_Compress2_V128_Fast;
2529
+ func_Final = Blake2sp_Final_V128_Fast;
2530
+ func_Init = Blake2sp_InitState_V128_Fast;
2531
+ func_Single = Z7_BLAKE2S_Compress2_V128;
2532
+ }
2533
+ else
2534
+ #ifdef Z7_BLAKE2S_USE_V128_WAY2
2535
+ if (algo == Z7_BLAKE2SP_ALGO_V128_WAY2)
2536
+ func = func_Single = Blake2sp_Compress2_V128_Way2;
2537
+ else
2538
+ #endif
2539
+ {
2540
+ if (algo != Z7_BLAKE2SP_ALGO_V128_WAY1)
2541
+ return False;
2542
+ func = func_Single = Blake2sp_Compress2_V128_Way1;
2543
+ }
2544
+ }
2545
+ }
2546
+ }
2547
+ #else // !VECTORS
2548
+ if (algo > 1) // Z7_BLAKE2SP_ALGO_SCALAR
2549
+ return False;
2550
+ #endif // !VECTORS
2551
+
2552
+ #ifdef Z7_BLAKE2SP_USE_FUNCTIONS
2553
+ p->u.header.func_Compress_Fast = func;
2554
+ p->u.header.func_Compress_Single = func_Single;
2555
+ p->u.header.func_Final = func_Final;
2556
+ p->u.header.func_Init = func_Init;
2557
+ #endif
2558
+ // printf("\n p->u.header.func_Compress = %p", p->u.header.func_Compress);
2559
+ return True;
2560
+ }
2561
+
2562
+
2563
+ void z7_Black2sp_Prepare(void)
2564
+ {
2565
+ #ifdef Z7_BLAKE2S_USE_VECTORS
2566
+ unsigned flags = 0; // (1u << Z7_BLAKE2SP_ALGO_V128_SCALAR);
2567
+
2568
+ Z7_BLAKE2SP_FUNC_COMPRESS func_Fast = Blake2sp_Compress2;
2569
+ Z7_BLAKE2SP_FUNC_COMPRESS func_Single = Blake2sp_Compress2;
2570
+ Z7_BLAKE2SP_FUNC_INIT func_Init = NULL;
2571
+ Z7_BLAKE2SP_FUNC_INIT func_Final = NULL;
2572
+
2573
+ #if defined(MY_CPU_X86_OR_AMD64)
2574
+ #if defined(Z7_BLAKE2S_USE_AVX512_ALWAYS)
2575
+ // optional check
2576
+ #if 0 || !(defined(__AVX512F__) && defined(__AVX512VL__))
2577
+ if (CPU_IsSupported_AVX512F_AVX512VL())
2578
+ #endif
2579
+ #elif defined(Z7_BLAKE2S_USE_SSE41)
2580
+ if (CPU_IsSupported_SSE41())
2581
+ #elif defined(Z7_BLAKE2S_USE_SSSE3)
2582
+ if (CPU_IsSupported_SSSE3())
2583
+ #elif !defined(MY_CPU_AMD64)
2584
+ if (CPU_IsSupported_SSE2())
2585
+ #endif
2586
+ #endif
2587
+ {
2588
+ #if defined(Z7_BLAKE2S_USE_SSE41)
2589
+ // printf("\n========== Blake2s SSE41 128-bit\n");
2590
+ #elif defined(Z7_BLAKE2S_USE_SSSE3)
2591
+ // printf("\n========== Blake2s SSSE3 128-bit\n");
2592
+ #else
2593
+ // printf("\n========== Blake2s SSE2 128-bit\n");
2594
+ #endif
2595
+ // func_Fast = f_vector = Blake2sp_Compress2_V128_Way2;
2596
+ // printf("\n========== Blake2sp_Compress2_V128_Way2\n");
2597
+ func_Fast =
2598
+ func_Single = Z7_BLAKE2S_Compress2_V128;
2599
+ flags |= (1u << Z7_BLAKE2SP_ALGO_V128_WAY1);
2600
+ #ifdef Z7_BLAKE2S_USE_V128_WAY2
2601
+ flags |= (1u << Z7_BLAKE2SP_ALGO_V128_WAY2);
2602
+ #endif
2603
+ #ifdef Z7_BLAKE2S_USE_V128_FAST
2604
+ flags |= (1u << Z7_BLAKE2SP_ALGO_V128_FAST);
2605
+ func_Fast = Blake2sp_Compress2_V128_Fast;
2606
+ func_Init = Blake2sp_InitState_V128_Fast;
2607
+ func_Final = Blake2sp_Final_V128_Fast;
2608
+ #endif
2609
+
2610
+ #ifdef Z7_BLAKE2S_USE_AVX2
2611
+ #if defined(MY_CPU_X86_OR_AMD64)
2612
+
2613
+ #if defined(Z7_BLAKE2S_USE_AVX512_ALWAYS)
2614
+ #if 0
2615
+ if (CPU_IsSupported_AVX512F_AVX512VL())
2616
+ #endif
2617
+ #else
2618
+ if (CPU_IsSupported_AVX2())
2619
+ #endif
2620
+ #endif
2621
+ {
2622
+ // #pragma message ("=== Blake2s AVX2")
2623
+ // printf("\n========== Blake2s AVX2\n");
2624
+
2625
+ #ifdef Z7_BLAKE2S_USE_AVX2_WAY2
2626
+ func_Single = Blake2sp_Compress2_AVX2_Way2;
2627
+ flags |= (1u << Z7_BLAKE2SP_ALGO_V256_WAY2);
2628
+ #endif
2629
+ #ifdef Z7_BLAKE2S_USE_AVX2_WAY4
2630
+ flags |= (1u << Z7_BLAKE2SP_ALGO_V256_WAY4);
2631
+ #endif
2632
+
2633
+ #ifdef Z7_BLAKE2S_USE_AVX2_FAST
2634
+ flags |= (1u << Z7_BLAKE2SP_ALGO_V256_FAST);
2635
+ func_Fast = Blake2sp_Compress2_AVX2_Fast;
2636
+ func_Init = Blake2sp_InitState_AVX2_Fast;
2637
+ func_Final = Blake2sp_Final_AVX2_Fast;
2638
+ #elif defined(Z7_BLAKE2S_USE_AVX2_WAY4)
2639
+ func_Fast = Blake2sp_Compress2_AVX2_Way4;
2640
+ #elif defined(Z7_BLAKE2S_USE_AVX2_WAY2)
2641
+ func_Fast = Blake2sp_Compress2_AVX2_Way2;
2642
+ #endif
2643
+ } // avx2
2644
+ #endif // avx2
2645
+ } // sse*
2646
+ g_Z7_BLAKE2SP_FUNC_COMPRESS_Fast = func_Fast;
2647
+ g_Z7_BLAKE2SP_FUNC_COMPRESS_Single = func_Single;
2648
+ g_Z7_BLAKE2SP_FUNC_INIT_Init = func_Init;
2649
+ g_Z7_BLAKE2SP_FUNC_INIT_Final = func_Final;
2650
+ g_z7_Blake2sp_SupportedFlags = flags;
2651
+ // printf("\nflags=%x\n", flags);
2652
+ #endif // vectors
2653
+ }
2654
+
2655
+ /*
2656
+ #ifdef Z7_BLAKE2S_USE_VECTORS
2657
+ void align_test2(CBlake2sp *sp);
2658
+ void align_test2(CBlake2sp *sp)
2659
+ {
2660
+ __m128i a = LOAD_128(sp->states);
2661
+ D_XOR_128(a, LOAD_128(sp->states + 4));
2662
+ STORE_128(sp->states, a);
2663
+ }
2664
+ void align_test2(void);
2665
+ void align_test2(void)
2666
+ {
2667
+ CBlake2sp sp;
2668
+ Blake2sp_Init(&sp);
2669
+ Blake2sp_Update(&sp, NULL, 0);
2670
+ }
2671
+ #endif
2672
+ */