ws-arch2-cab: codecs/compress/Lzx (CAB LZX: windows 2^15..2^21, verbatim / aligned / uncompressed blocks, delta-coded trees, R0..R2, E8 translation, 32 KB frames; written from the spec) + cab LZX folders, checked against cabextract on cabinets of a fixture LZX compressor (tools/fixtures/_lzx.py) and libmspack's samples; Deflate.mszip (generic MSZIP blocks: CK + deflate, dictionary carried across blocks; for cab and later model/x); cab bench lines
This commit is contained in:
1 parent
825c45b03c
commit
c54c8daff5
9 files changed
+990
-49
No files matched your search
+27
-1
@@ -2,7 +2,7 @@
|
||||
-- Fixtures: tools/fixtures/deflate.py (a 6 MB corpus), tools/fixtures/png.py (1024 x 768 images), tools/fixtures/mp3.py,
|
||||
-- tools/fixtures/opus.py (3 s stereo files; MB/s of f32 output, 48 kHz stereo f32 is 0.384 MB/s of real time),
|
||||
-- tools/fixtures/flac.py; wav encodes / decodes a generated tone; zstd / brotli / bzip2 / lzma / lz4 (*_bench corpora), .Z (tools/fixtures/z.py), fonts
|
||||
-- (glyphs per second), json / xml / yaml, jpeg / gif / tiff / qoi / tga / pnm / hdr and ImageOps.
|
||||
-- (glyphs per second), cab (LZX / MSZIP / Quantum), json / xml / yaml, jpeg / gif / tiff / qoi / tga / pnm / hdr and ImageOps.
|
||||
local Deflate = require("@formats/codecs/compress/Deflate")
|
||||
local Crc32 = require("@formats/core/Crc32")
|
||||
local Bytes = require("@formats/core/Bytes")
|
||||
@@ -1177,6 +1177,32 @@ do
|
||||
end
|
||||
end
|
||||
end
|
||||
-- ws-arch2 cabinets: LZX (codecs/compress/Lzx) and MSZIP folders of tools/fixtures/cab.py (MB/s of output; each run
|
||||
-- decodes the cabinet again, so the folder cache does not count)
|
||||
do
|
||||
local Cab = require("@formats/archive/cab")
|
||||
local CF = require("@tests/gen/cab")
|
||||
for _, kind in { "lzx", "mszip" } do
|
||||
local datas, total = {}, 0
|
||||
for _, c in CF.cases do
|
||||
local a = Cab.decode(Bytes.reader(buffer.fromstring(c.data))) :: any
|
||||
if a and a.meta.folders[1].method == kind and #c.data > 20000 then
|
||||
table.insert(datas, buffer.fromstring(c.data))
|
||||
for _, e in a:list() do
|
||||
total += e.size
|
||||
end
|
||||
end
|
||||
end
|
||||
bench("cab " .. kind .. " (" .. #datas .. " cabinets)", 5, total, function()
|
||||
for _, d in datas do
|
||||
local a = Cab.decode(Bytes.reader(d)) :: any
|
||||
for _, e in a:list() do
|
||||
a:read(e.name)
|
||||
end
|
||||
end
|
||||
end)
|
||||
end
|
||||
end
|
||||
do
|
||||
-- NBT / voxels (ws-voxel): a chunk-like NBT tree (24 sections with packed long arrays, 4000 entity-like compounds)
|
||||
-- through codecs/text/Nbt (binary and SNBT), 1M packed 5-bit indices, a 64^3 Sponge schematic and Qubicle file
|
||||
|
||||
Reference in new issue
Block a user