tooling: recognize smaller zlib windows in section probes #222
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/225"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from R0Y00/Xbox2Windows. Originally posted by Vonsek on 2026-11-21T18:37:06Z.
Change
Recognize RFC 1950 DEFLATE headers with smaller advertised windows when probing aligned tagged section records. The probe checks both header bytes, skips preset-dictionary streams and retains its stored and decoded size limits. RFC 1950 section 2.2
Verification
Windows 11 build 26200.9974, Visual Studio Build Tools 2022 17.14.45, Python 3.12.10, CMake 3.31.6.
cmake --preset dev: configured a fresh build directory with the repository Python environment.out/pe-env/Scripts/python.exe -B tests/resource_ranges_check.py: the new case reported 1 valid tagged stream out of 7 onf02c237. All 5 tests passed at48fff16.out/pe-env/Scripts/python.exe -B tests/script_state_check.py: all 13 tests passed at48fff16.ctest --preset dev --no-tests=error -R '^resource_range_controls$' -V: 0/1 with the new case on base, 1/1 at48fff16.ctest --preset dev --no-tests=error -R '^(resource_range_controls|script_state_literals)$' -V: 2/2 at48fff16, zero skips.git diff --check: passed.Evidence and follow-up
The original MIT-licensed fixture compresses one synthetic
HEAD FOOTsection record with window sizes from 512 bytes through 32 KiB. It places seven streams at aligned offsets, one small-window stream at an unaligned offset and one stream with a preset dictionary. The report counts all seven aligned streams that require no dictionary. A separate control checks alignment when the sampled window itself starts at an unaligned file offset.On this host, median
time.perf_counterwall time over ninescan_window(data, 0, "HEAD", "FOOT")calls on an 8 MiB zero buffer went from 1.7 ms to 1.0 ms. On an 8 MiB buffer fromrandom.Random(731).randbytes(8 << 20), it went from 4.2 ms to 13.7 ms. Both implementations reported no records in those buffers.Checklist
AI-assisted with Codex.
Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-21T18:37:17Z.
Codex Review Summary: ✅ Completed
This comment shows the latest Codex review activity on this pull request.
48fff16ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.