ws-arch2: codecs/compress/Lzh (lh1 / lh4-lh7 / lhx / lzs / lz5 / ARJ 4; ported from lhasa, ISC) + archive/lha (levels 0-3, extended headers, symlinks, DOS-name case, read; level-2 lh0 write); bench lines
This commit is contained in:
1 parent
94d79313d4
commit
572cd42f8a
10 files changed
+1303
No files matched your search
@@ -1078,3 +1078,25 @@ do
|
||||
jitTune(false)
|
||||
end
|
||||
end
|
||||
|
||||
-- ws-arch2 archives: the LHA family (codecs/compress/Lzh) over tools/fixtures/lha.py archives (MB/s of output)
|
||||
do
|
||||
local Lha = require("@formats/archive/lha")
|
||||
local LF = require("@tests/gen/lha")
|
||||
for _, want in { "lha114i -h2 -5", "lha114i -h2 -7", "lengths/lh1-1m.lzh", "lengths/lz5-1m.lzs", "larc333/long.lzs" } do
|
||||
for _, c in LF.cases do
|
||||
if c.name == want then
|
||||
local a = Lha.decode(Bytes.reader(buffer.fromstring(c.data))) :: any
|
||||
local total = 0
|
||||
for _, e in a:list() do
|
||||
total += e.size
|
||||
end
|
||||
bench("lha " .. want, 3, total, function()
|
||||
for _, e in a:list() do
|
||||
a:read(e.name)
|
||||
end
|
||||
end)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in new issue
Block a user