7zip-native 0.0.7 → 0.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +96 -24
- package/bench/compare.mts +25 -11
- package/bench/folder-concurrency.mts +56 -14
- package/bench/multiprocess-extract.cjs +334 -0
- package/dist/index.cjs +194 -102
- package/dist/index.d.cts +10 -9
- package/dist/index.d.mts +10 -9
- package/dist/index.d.ts +10 -9
- package/dist/index.mjs +196 -104
- package/native/addon.cpp +1399 -71
- package/package.json +5 -3
- package/patches/deflate-input-buffer-size.patch +47 -0
- package/prebuilds/darwin-arm64/7zip_native.node +0 -0
- package/prebuilds/darwin-arm64/lib7z.dylib +0 -0
- package/prebuilds/darwin-x64/7zip_native.node +0 -0
- package/prebuilds/darwin-x64/lib7z.dylib +0 -0
- package/prebuilds/linux-arm/7z.so +0 -0
- package/prebuilds/linux-arm/7zip_native.node +0 -0
- package/prebuilds/linux-arm64/7z.so +0 -0
- package/prebuilds/linux-arm64/7zip_native.node +0 -0
- package/prebuilds/linux-ia32/7z.so +0 -0
- package/prebuilds/linux-ia32/7zip_native.node +0 -0
- package/prebuilds/linux-x64/7z.so +0 -0
- package/prebuilds/linux-x64/7zip_native.node +0 -0
- package/prebuilds/win32-arm64/7z.dll +0 -0
- package/prebuilds/win32-arm64/7zip_native.node +0 -0
- package/prebuilds/win32-x64/7z.dll +0 -0
- package/prebuilds/win32-x64/7zip_native.node +0 -0
- package/scripts/build-native.mjs +22 -1
- package/vendor/7zip/CPP/7zip/Archive/Archive2.def +1 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/7z.so +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/7zAes.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/7zAesRegister.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/7zBuf2.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/7zCompressionMode.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/7zCrc.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/7zCrcOpt.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/7zDecode.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/7zEncode.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/7zExtract.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/7zFolderInStream.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/7zHandler.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/7zHandlerOut.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/7zHeader.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/7zIn.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/7zOut.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/7zProperties.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/7zRegister.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/7zSpecStream.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/7zStream.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/7zUpdate.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Aes.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/AesOpt.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Alloc.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/ApfsHandler.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/ApmHandler.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/ArHandler.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/ArchiveExports.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/ArjHandler.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/BZip2Crc.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/BZip2Decoder.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/BZip2Encoder.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/BZip2Register.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Base64Handler.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Bcj2.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Bcj2Coder.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Bcj2Enc.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Bcj2Register.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/BcjCoder.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/BcjRegister.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/BitlDecoder.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Blake2s.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Bra.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Bra86.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/BraIA64.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/BranchMisc.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/BranchRegister.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/BwtSort.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/ByteSwap.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Bz2Handler.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/CRC.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/CWrappers.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/CabBlockInStream.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/CabHandler.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/CabHeader.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/CabIn.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/CabRegister.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/ChmHandler.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/ChmIn.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/CodecExports.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/CoderMixer2.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/ComHandler.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/CopyCoder.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/CopyRegister.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/CpioHandler.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/CpuArch.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/CramfsHandler.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/CrcReg.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/CreateCoder.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Deflate64Register.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/DeflateDecoder.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/DeflateEncoder.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/DeflateProps.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/DeflateRegister.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Delta.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/DeltaFilter.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/DllExports2.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/DmgHandler.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/DummyOutStream.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/DynLimBuf.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/ElfHandler.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/ExtHandler.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/FatHandler.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/FileDir.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/FileFind.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/FileIO.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/FileName.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/FilterCoder.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/FindSignature.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/FlvHandler.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/GptHandler.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/GzHandler.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/HandlerCont.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/HandlerOut.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/HfsHandler.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/HmacSha1.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/HmacSha256.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/HuffEnc.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/IhexHandler.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/ImplodeDecoder.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/InBuffer.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/InOutTempBuffer.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/InStreamWithCRC.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/IntToString.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/IsoHandler.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/IsoHeader.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/IsoIn.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/IsoRegister.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/ItemNameUtils.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/LimitedStreams.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/LockedStream.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/LpHandler.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/LzFind.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/LzFindMt.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/LzFindOpt.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/LzFindPrepare.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/LzOutWindow.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/LzfseDecoder.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/LzhDecoder.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/LzhHandler.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Lzma2Dec.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Lzma2DecMt.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Lzma2Decoder.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Lzma2Enc.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Lzma2Encoder.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Lzma2Register.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/LzmaDec.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/LzmaDecoder.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/LzmaEnc.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/LzmaEncoder.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/LzmaHandler.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/LzmaRegister.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/LzmsDecoder.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/LzxDecoder.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/MachoHandler.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/MbrHandler.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Md5.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Md5Reg.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/MemBlocks.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/MethodId.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/MethodProps.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/MslzHandler.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/MtCoder.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/MtDec.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/MubHandler.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/MultiStream.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/MyAes.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/MyAesReg.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/MyMap.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/MyString.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/MyVector.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/MyWindows.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/MyXml.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/NewHandler.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/NsisDecode.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/NsisHandler.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/NsisIn.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/NsisRegister.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/NtfsHandler.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/OffsetStream.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/OutBuffer.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/OutMemStream.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/OutStreamWithCRC.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/OutStreamWithSha1.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/ParseProperties.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Pbkdf2HmacSha1.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/PeHandler.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Ppmd7.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Ppmd7Dec.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Ppmd7Enc.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Ppmd7aDec.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Ppmd8.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Ppmd8Dec.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Ppmd8Enc.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/PpmdDecoder.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/PpmdEncoder.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/PpmdHandler.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/PpmdRegister.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/PpmdZip.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/ProgressMt.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/ProgressUtils.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/PropId.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/PropVariant.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/PropVariantConv.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/PropVariantUtils.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/QcowHandler.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/QuantumDecoder.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/RandGen.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Rar1Decoder.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Rar20Crypto.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Rar2Decoder.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Rar3Decoder.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Rar3Vm.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Rar5Aes.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Rar5Decoder.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Rar5Handler.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/RarAes.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/RarCodecsRegister.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/RarHandler.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/RpmHandler.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Sha1.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Sha1Opt.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Sha1Prepare.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Sha1Reg.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Sha256.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Sha256Opt.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Sha256Prepare.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Sha256Reg.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Sha3.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Sha3Reg.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Sha512.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Sha512Opt.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Sha512Prepare.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Sha512Reg.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/ShrinkDecoder.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Sort.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/SparseHandler.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/SplitHandler.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/SquashfsHandler.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/StreamBinder.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/StreamObjects.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/StreamUtils.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/StringConvert.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/StringToInt.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/SwapBytes.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/SwfHandler.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Synchronization.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/System.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/TarHandler.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/TarHandlerOut.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/TarHeader.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/TarIn.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/TarOut.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/TarRegister.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/TarUpdate.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Threads.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/TimeUtils.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/UTFConvert.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/UdfHandler.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/UdfIn.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/UefiHandler.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/UniqBlocks.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/VdiHandler.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/VhdHandler.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/VhdxHandler.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/VirtThread.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/VmdkHandler.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Wildcard.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/WimHandler.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/WimHandlerOut.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/WimIn.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/WimRegister.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/WzAes.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/XarHandler.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/XpressDecoder.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Xxh64.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Xxh64Reg.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/Xz.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/XzCrc64.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/XzCrc64Init.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/XzCrc64Opt.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/XzCrc64Reg.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/XzDec.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/XzDecoder.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/XzEnc.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/XzEncoder.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/XzHandler.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/XzIn.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/ZDecoder.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/ZHandler.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/ZipAddCommon.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/ZipCrypto.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/ZipHandler.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/ZipHandlerOut.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/ZipIn.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/ZipItem.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/ZipOut.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/ZipRegister.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/ZipStrong.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/ZipUpdate.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/ZlibDecoder.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/ZlibEncoder.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/ZstdDec.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/ZstdDecoder.o +0 -0
- package/vendor/7zip/CPP/7zip/Bundles/Format7zF/_o/ZstdHandler.o +0 -0
- package/vendor/7zip/CPP/7zip/Compress/DeflateDecoder.cpp +15 -1
- package/scripts/clean-upstream-build.mjs +0 -9
|
@@ -0,0 +1,334 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const {spawn} = require('node:child_process');
|
|
4
|
+
const {mkdtemp, rm, stat} = require('node:fs/promises');
|
|
5
|
+
const {tmpdir} = require('node:os');
|
|
6
|
+
const path = require('node:path');
|
|
7
|
+
|
|
8
|
+
function elapsedMs(start)
|
|
9
|
+
{
|
|
10
|
+
return Number(process.hrtime.bigint() - start) / 1e6;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
function errorText(chunks)
|
|
14
|
+
{
|
|
15
|
+
return Buffer.concat(chunks).toString('utf8').trim();
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
async function extractNative(Archive, archivePath, outputPath, files, deflateBufferSize)
|
|
19
|
+
{
|
|
20
|
+
const started = process.hrtime.bigint();
|
|
21
|
+
let archive;
|
|
22
|
+
try
|
|
23
|
+
{
|
|
24
|
+
archive = await Archive.open(archivePath, {deflateBufferSize});
|
|
25
|
+
await archive.extractToFolder(outputPath, {
|
|
26
|
+
paths: files.map(file => file.path),
|
|
27
|
+
concurrency: 1,
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
finally
|
|
31
|
+
{
|
|
32
|
+
await archive?.close();
|
|
33
|
+
}
|
|
34
|
+
return elapsedMs(started);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function extractWithCli(binaryPath, archivePath, outputPath, files)
|
|
38
|
+
{
|
|
39
|
+
return new Promise((resolve, reject) => {
|
|
40
|
+
const started = process.hrtime.bigint();
|
|
41
|
+
const args = [
|
|
42
|
+
'x',
|
|
43
|
+
archivePath,
|
|
44
|
+
...files.map(file => file.path),
|
|
45
|
+
`-o${outputPath}`,
|
|
46
|
+
'-y',
|
|
47
|
+
'-bd',
|
|
48
|
+
'-bb0',
|
|
49
|
+
'-mmt=1',
|
|
50
|
+
'-sccUTF-8',
|
|
51
|
+
'-spd',
|
|
52
|
+
];
|
|
53
|
+
const child = spawn(binaryPath, args, {stdio: ['ignore', 'ignore', 'pipe']});
|
|
54
|
+
const stderr = [];
|
|
55
|
+
let stderrLength = 0;
|
|
56
|
+
child.stderr.on('data', chunk => {
|
|
57
|
+
if(stderrLength < 64 * 1024)
|
|
58
|
+
{
|
|
59
|
+
const kept = chunk.subarray(0, 64 * 1024 - stderrLength);
|
|
60
|
+
stderr.push(kept);
|
|
61
|
+
stderrLength += kept.length;
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
child.once('error', reject);
|
|
65
|
+
child.once('close', (code, signal) => {
|
|
66
|
+
if(code !== 0)
|
|
67
|
+
{
|
|
68
|
+
const detail = errorText(stderr);
|
|
69
|
+
reject(new Error(
|
|
70
|
+
`7zip-bin-full exited with ${signal ?? code}${detail ? `: ${detail}` : ''}`,
|
|
71
|
+
));
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
resolve(elapsedMs(started));
|
|
75
|
+
});
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
function safeOutputPath(root, entryPath)
|
|
80
|
+
{
|
|
81
|
+
const normalized = entryPath.replace(/\\/g, '/');
|
|
82
|
+
const parts = normalized.split('/').filter(part => part !== '' && part !== '.');
|
|
83
|
+
if(normalized.startsWith('/') || parts.length === 0 || parts.some(part => part === '..'))
|
|
84
|
+
{
|
|
85
|
+
throw new Error(`Unsafe archive path in benchmark input: ${entryPath}`);
|
|
86
|
+
}
|
|
87
|
+
return path.resolve(root, ...parts);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
async function verifyOutput(outputPath, files)
|
|
91
|
+
{
|
|
92
|
+
let totalBytes = 0n;
|
|
93
|
+
for(const file of files)
|
|
94
|
+
{
|
|
95
|
+
const outputFile = safeOutputPath(outputPath, file.path);
|
|
96
|
+
const outputStat = await stat(outputFile);
|
|
97
|
+
if(!outputStat.isFile() || BigInt(outputStat.size) !== file.size)
|
|
98
|
+
{
|
|
99
|
+
throw new Error(
|
|
100
|
+
`Extraction mismatch for ${file.path}: expected ${file.size} bytes, got ${outputStat.size}`,
|
|
101
|
+
);
|
|
102
|
+
}
|
|
103
|
+
totalBytes += file.size;
|
|
104
|
+
}
|
|
105
|
+
return totalBytes;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
async function runWave(
|
|
109
|
+
backend,
|
|
110
|
+
Archive,
|
|
111
|
+
binaryPath,
|
|
112
|
+
archivePath,
|
|
113
|
+
groups,
|
|
114
|
+
expectedFileCount,
|
|
115
|
+
parallelOperations,
|
|
116
|
+
deflateBufferSize,
|
|
117
|
+
)
|
|
118
|
+
{
|
|
119
|
+
if(groups.length !== parallelOperations
|
|
120
|
+
|| groups.some(files => files.length === 0)
|
|
121
|
+
|| groups.reduce((sum, files) => sum + files.length, 0) !== expectedFileCount)
|
|
122
|
+
{
|
|
123
|
+
throw new Error(`The concurrent operations must partition exactly ${expectedFileCount} files`);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
const temporaryRoot = await mkdtemp(path.join(tmpdir(), '7zip-native-parallel-extract-'));
|
|
127
|
+
const started = process.hrtime.bigint();
|
|
128
|
+
try
|
|
129
|
+
{
|
|
130
|
+
const operations = groups.map((files, index) => {
|
|
131
|
+
const outputPath = path.join(temporaryRoot, `operation-${index + 1}`);
|
|
132
|
+
return backend === 'native'
|
|
133
|
+
? extractNative(Archive, archivePath, outputPath, files, deflateBufferSize)
|
|
134
|
+
: extractWithCli(binaryPath, archivePath, outputPath, files);
|
|
135
|
+
});
|
|
136
|
+
let operationTimes;
|
|
137
|
+
try
|
|
138
|
+
{
|
|
139
|
+
operationTimes = await Promise.all(operations);
|
|
140
|
+
}
|
|
141
|
+
catch(error)
|
|
142
|
+
{
|
|
143
|
+
await Promise.allSettled(operations);
|
|
144
|
+
throw error;
|
|
145
|
+
}
|
|
146
|
+
const wallMs = elapsedMs(started);
|
|
147
|
+
let totalBytes = 0n;
|
|
148
|
+
for(let index = 0; index < parallelOperations; index++)
|
|
149
|
+
{
|
|
150
|
+
const files = groups[index];
|
|
151
|
+
totalBytes += await verifyOutput(
|
|
152
|
+
path.join(temporaryRoot, `operation-${index + 1}`),
|
|
153
|
+
files,
|
|
154
|
+
);
|
|
155
|
+
}
|
|
156
|
+
return {wallMs, operationTimes, totalBytes};
|
|
157
|
+
}
|
|
158
|
+
finally
|
|
159
|
+
{
|
|
160
|
+
await rm(temporaryRoot, {recursive: true, force: true});
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
function summarize(values)
|
|
165
|
+
{
|
|
166
|
+
const sorted = [...values].sort((left, right) => left - right);
|
|
167
|
+
const median = sorted.length % 2 === 0
|
|
168
|
+
? (sorted[sorted.length / 2 - 1] + sorted[sorted.length / 2]) / 2
|
|
169
|
+
: sorted[Math.floor(sorted.length / 2)];
|
|
170
|
+
const p95 = sorted[Math.ceil(sorted.length * 0.95) - 1];
|
|
171
|
+
return {median_ms: median, p95_ms: p95, samples_ms: values};
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
function partitionFiles(files, partitionCount)
|
|
175
|
+
{
|
|
176
|
+
const groups = [];
|
|
177
|
+
const baseSize = Math.floor(files.length / partitionCount);
|
|
178
|
+
const remainder = files.length % partitionCount;
|
|
179
|
+
let offset = 0;
|
|
180
|
+
for(let index = 0; index < partitionCount; index++)
|
|
181
|
+
{
|
|
182
|
+
const groupSize = baseSize + (index < remainder ? 1 : 0);
|
|
183
|
+
groups.push(files.slice(offset, offset + groupSize));
|
|
184
|
+
offset += groupSize;
|
|
185
|
+
}
|
|
186
|
+
return groups;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
function parseArguments(args)
|
|
190
|
+
{
|
|
191
|
+
const values = new Map();
|
|
192
|
+
for(let index = 0; index < args.length; index++)
|
|
193
|
+
{
|
|
194
|
+
const argument = args[index];
|
|
195
|
+
if(!argument.startsWith('--'))
|
|
196
|
+
{
|
|
197
|
+
throw new TypeError(`Unexpected argument ${argument}`);
|
|
198
|
+
}
|
|
199
|
+
const equals = argument.indexOf('=');
|
|
200
|
+
const key = argument.slice(2, equals === -1 ? undefined : equals);
|
|
201
|
+
const value = equals === -1 ? args[++index] : argument.slice(equals + 1);
|
|
202
|
+
if(!value || value.startsWith('--') || values.has(key))
|
|
203
|
+
{
|
|
204
|
+
throw new TypeError(`Invalid or repeated option --${key}`);
|
|
205
|
+
}
|
|
206
|
+
if(!['archive', 'parallel-counts', 'iterations', 'deflate-buffer-size'].includes(key))
|
|
207
|
+
{
|
|
208
|
+
throw new TypeError(`Unknown option --${key}`);
|
|
209
|
+
}
|
|
210
|
+
values.set(key, value);
|
|
211
|
+
}
|
|
212
|
+
const archivePath = values.get('archive');
|
|
213
|
+
if(!archivePath)
|
|
214
|
+
{
|
|
215
|
+
throw new TypeError(
|
|
216
|
+
'Usage: node bench/multiprocess-extract.cjs --archive <zip> [--parallel-counts 1,2,4] [--iterations 3] [--deflate-buffer-size 262144]',
|
|
217
|
+
);
|
|
218
|
+
}
|
|
219
|
+
const parallelCounts = [...new Set((values.get('parallel-counts') ?? '1,2,4')
|
|
220
|
+
.split(',')
|
|
221
|
+
.map(value => Number(value)))];
|
|
222
|
+
if(parallelCounts.length === 0
|
|
223
|
+
|| parallelCounts.some(value => !Number.isSafeInteger(value) || value < 1 || value > 32))
|
|
224
|
+
{
|
|
225
|
+
throw new RangeError('--parallel-counts must contain integers between 1 and 32');
|
|
226
|
+
}
|
|
227
|
+
const iterations = Number(values.get('iterations') ?? 3);
|
|
228
|
+
if(!Number.isSafeInteger(iterations) || iterations < 1 || iterations > 20)
|
|
229
|
+
{
|
|
230
|
+
throw new RangeError('--iterations must be an integer between 1 and 20');
|
|
231
|
+
}
|
|
232
|
+
const deflateBufferSize = Number(values.get('deflate-buffer-size') ?? 256 * 1024);
|
|
233
|
+
if(!Number.isSafeInteger(deflateBufferSize)
|
|
234
|
+
|| deflateBufferSize < 4 * 1024
|
|
235
|
+
|| deflateBufferSize > 2 * 1024 * 1024)
|
|
236
|
+
{
|
|
237
|
+
throw new RangeError('--deflate-buffer-size must be between 4096 and 2097152 bytes');
|
|
238
|
+
}
|
|
239
|
+
return {archivePath: path.resolve(archivePath), parallelCounts, iterations, deflateBufferSize};
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
async function main()
|
|
243
|
+
{
|
|
244
|
+
const {Archive} = require('7zip-native');
|
|
245
|
+
const {path7zc} = require('7zip-bin-full');
|
|
246
|
+
const options = parseArguments(process.argv.slice(2));
|
|
247
|
+
Archive.concurrency(Math.max(...options.parallelCounts));
|
|
248
|
+
const listingArchive = await Archive.open(options.archivePath);
|
|
249
|
+
let files;
|
|
250
|
+
try
|
|
251
|
+
{
|
|
252
|
+
files = (await listingArchive.entries())
|
|
253
|
+
.filter(entry => !entry.isDirectory)
|
|
254
|
+
.map(entry => ({path: entry.path, size: entry.size}));
|
|
255
|
+
}
|
|
256
|
+
finally
|
|
257
|
+
{
|
|
258
|
+
await listingArchive.close();
|
|
259
|
+
}
|
|
260
|
+
if(files.length === 0)
|
|
261
|
+
{
|
|
262
|
+
throw new RangeError('The archive contains no files to extract');
|
|
263
|
+
}
|
|
264
|
+
if(options.parallelCounts.some(count => count > files.length))
|
|
265
|
+
{
|
|
266
|
+
throw new RangeError('The parallel count cannot exceed the number of files in the archive');
|
|
267
|
+
}
|
|
268
|
+
const runtime = process.versions.electron ? 'electron-as-node' : 'node';
|
|
269
|
+
const totalBytes = files.reduce((sum, file) => sum + file.size, 0n);
|
|
270
|
+
const results = [];
|
|
271
|
+
for(const parallelOperations of options.parallelCounts)
|
|
272
|
+
{
|
|
273
|
+
const groups = partitionFiles(files, parallelOperations);
|
|
274
|
+
const samples = {native: [], cli: []};
|
|
275
|
+
await runWave(
|
|
276
|
+
'native', Archive, path7zc, options.archivePath, groups, files.length,
|
|
277
|
+
parallelOperations, options.deflateBufferSize,
|
|
278
|
+
);
|
|
279
|
+
await runWave(
|
|
280
|
+
'cli', Archive, path7zc, options.archivePath, groups, files.length,
|
|
281
|
+
parallelOperations, options.deflateBufferSize,
|
|
282
|
+
);
|
|
283
|
+
for(let iteration = 0; iteration < options.iterations; iteration++)
|
|
284
|
+
{
|
|
285
|
+
const backends = iteration % 2 === 0 ? ['native', 'cli'] : ['cli', 'native'];
|
|
286
|
+
for(const backend of backends)
|
|
287
|
+
{
|
|
288
|
+
samples[backend].push(await runWave(
|
|
289
|
+
backend, Archive, path7zc, options.archivePath, groups, files.length,
|
|
290
|
+
parallelOperations, options.deflateBufferSize,
|
|
291
|
+
));
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
for(const backend of ['native', 'cli'])
|
|
295
|
+
{
|
|
296
|
+
const waves = samples[backend];
|
|
297
|
+
const wall = summarize(waves.map(wave => wave.wallMs));
|
|
298
|
+
const operationTimes = summarize(waves.flatMap(wave => wave.operationTimes));
|
|
299
|
+
const medianWall = wall.median_ms;
|
|
300
|
+
results.push({
|
|
301
|
+
backend: backend === 'native' ? '7zip-native' : '7zip-bin-full (7zzc)',
|
|
302
|
+
parallel_promises: parallelOperations,
|
|
303
|
+
files_per_promise: groups.map(group => group.length),
|
|
304
|
+
total_file_extractions: files.length,
|
|
305
|
+
unique_files: files.length,
|
|
306
|
+
total_output_bytes: totalBytes.toString(),
|
|
307
|
+
median_wall_ms: medianWall,
|
|
308
|
+
p95_wall_ms: wall.p95_ms,
|
|
309
|
+
median_operation_ms: operationTimes.median_ms,
|
|
310
|
+
throughput_mib_per_second: Number(totalBytes) / (medianWall / 1000) / 1024 / 1024,
|
|
311
|
+
samples_ms: wall.samples_ms,
|
|
312
|
+
});
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
console.log(JSON.stringify({
|
|
316
|
+
runtime,
|
|
317
|
+
archive: options.archivePath,
|
|
318
|
+
archive_file_count: files.length,
|
|
319
|
+
iterations: options.iterations,
|
|
320
|
+
deflate_buffer_size: options.deflateBufferSize,
|
|
321
|
+
total_files_per_run: files.length,
|
|
322
|
+
files_partitioned_across_promises: true,
|
|
323
|
+
includes_archive_open: true,
|
|
324
|
+
includes_cli_process_startup: true,
|
|
325
|
+
native_extraction_runs_in_benchmark_process: true,
|
|
326
|
+
cli_binary: path7zc,
|
|
327
|
+
results,
|
|
328
|
+
}, null, 2));
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
main().catch((error) => {
|
|
332
|
+
console.error(error);
|
|
333
|
+
process.exitCode = 1;
|
|
334
|
+
});
|