ws-arch2-unix: archive/lz4 (LZ4 frame read: linked / independent blocks, block / content XXH32, content size, skippable + legacy frames, concatenation; write: independent blocks) on codecs/compress/Lz4 (merged from ws/roblox ba4b20e) + codecs/compress/Xxh32; containers/Archive.streamData (shared single-stream payload: buffer / one entry / tar of entries; used by z and lz4); tests vs the lz4 tool both ways; bench lines
containers/Archive: additive helper streamData (requires containers/Tar); nothing existing changes.
This commit is contained in:
1 parent
197ddc561a
commit
411261470a
10 files changed
+705
-34
No files matched your search
@@ -267,6 +267,24 @@ do
|
||||
Bzip2.decompress(bz)
|
||||
end)
|
||||
end
|
||||
do
|
||||
local Lz4F = require("@formats/archive/lz4")
|
||||
local LF = require("@tests/gen/lz4frame")
|
||||
local LC = require("@tests/gen/lz4frame_corpora")
|
||||
local frameData
|
||||
for _, c in LF.cases do
|
||||
if c.name == "text/BX" then
|
||||
frameData = buffer.fromstring(c.data)
|
||||
end
|
||||
end
|
||||
bench("lz4 frame decode (64K, xxh32)", 5, #LC.text, function()
|
||||
Lz4F.decompress(frameData)
|
||||
end)
|
||||
local tb = buffer.fromstring(LC.text)
|
||||
bench("lz4 frame encode (xxh32)", 5, #LC.text, function()
|
||||
Lz4F.compress(tb)
|
||||
end)
|
||||
end
|
||||
do
|
||||
local UnixCompress = require("@formats/codecs/compress/UnixCompress")
|
||||
local ZC = require("@tests/gen/z")
|
||||
|
||||
Reference in new issue
Block a user