ws-arch: archive/7z reads BZip2 (codecs/Bzip2) and Zstd (codecs/Zstd) coders; fixtures test BZip2 solid + BCJ

This commit is contained in:
4DBug committed 2026-10-31 08:55:24 -05:00
1 parent a9110bdab2
commit 6226ec41e4
4 files changed
+26 -8

No files matched your search

+3 -2
View File
@@ -1,7 +1,7 @@
# 7z fixtures (tools/fixtures.py): a small tree (text, x86 machine code, runs, an empty file, empty and nested
# directories, UTF-16 names with accents and a surrogate pair) archived by 7-Zip 2x (nix _7zz) with many method chains:
# LZMA / LZMA2 / copy / Deflate, solid and non-solid, BCJ / ARM64 / delta filters, plain and compressed headers; plus
# archives whose methods are not supported (BZip2, PPMd, BCJ2, AES) and an empty archive.
# BZip2 archives (codecs/Bzip2), archives whose methods are not supported (PPMd, BCJ2, AES) and an empty archive.
# tests/gen/7z.luau { files = { { name, dir, data?, mtime } }, cases = { { name, data, unsupported? } } }
import os, random, subprocess, sys, tempfile
@@ -85,7 +85,8 @@ def generate(ctx):
make("lzma-lc-lp", ["-m0=LZMA:lc=0:lp=2:pb=0", "-ms=e"])
make("auto", ["-mx=9"])
make("fast", ["-mx=1"])
make("bzip2", ["-m0=BZip2", "-mhc=off"], unsupported="bzip2")
make("bzip2", ["-m0=BZip2", "-mhc=off"])
make("bzip2-solid-bcj", ["-m0=BCJ", "-m1=BZip2", "-ms=on", "-mhc=on"])
make("ppmd", ["-m0=PPMd", "-mhc=off"], unsupported="ppmd")
make("bcj2", ["-m0=BCJ2", "-m1=LZMA", "-m2=LZMA", "-m3=LZMA", "-mb0s0:1", "-mb0s1:2", "-mb0s2:3", "-mhc=off"],
unsupported="bcj2")