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
@@ -0,0 +1,21 @@
|
||||
-- tools/fixtures/_lz4frame_encode.luau: run by tools/fixtures/lz4frame.py under the luau CLI: writes every corpus of
|
||||
-- tests/gen/lz4frame_corpora as LZ4 frames with archive/lz4 (several option sets) and prints "<name> <hex>" lines for
|
||||
-- the lz4 tool to decompress.
|
||||
local Lz4F = require("@formats/archive/lz4")
|
||||
local C = require("@tests/gen/lz4frame_corpora")
|
||||
|
||||
local sets = {
|
||||
default = {},
|
||||
b64k = { blockSize = 65536, blockChecksum = true, contentSize = true },
|
||||
nocrc = { contentChecksum = false, blockSize = 262144 },
|
||||
}
|
||||
for name, data in C do
|
||||
for sname, o in sets do
|
||||
local b = assert(Lz4F.compress(data, o :: any))
|
||||
local t = table.create(buffer.len(b))
|
||||
for i = 0, buffer.len(b) - 1 do
|
||||
t[i + 1] = string.format("%02x", buffer.readu8(b, i))
|
||||
end
|
||||
print(name .. "/" .. sname .. " " .. table.concat(t))
|
||||
end
|
||||
end
|
||||
Reference in new issue
Block a user