runtime/inflate: return structured InflateStatus via inflate_zlib_ex #1428

Manually merged
github merged 1 commit from gh-pr/1428/head into gh-pr/1428/base 2026-11-26 23:06:22 +00:00
Owner

@⁠tedin7 on GitHub · 2026-11-24 11:20 UTC · original
tedin7:x2w-h-inflate-ex → main · +271 −16 · 4 files · 1 commits · merged 2026-11-24 12:07 UTC

Addresses #1198

Adds enum class InflateStatus { ok, insufficient_output, corrupt_stream, bad_checksum } and inflate_zlib_ex(...) to src/startup_stubs/inflate.h so callers can distinguish output-capacity overflow from corrupt streams and Adler-32 checksum mismatches, while keeping inflate_zlib(...) as a thin compatible wrapper.

Verification

  • g++ -std=c++17 -Wall -Wextra -Werror -Isrc tests/startup_inflate_status.cpp -o /tmp/startup_inflate_status && /tmp/startup_inflate_status
  • g++ -std=c++17 -Isrc tests/startup_inflate_probe.cpp -o /tmp/startup_inflate_probe && python3 tests/startup_inflate_check.py /tmp/startup_inflate_probe
  • python3 tests/docs_links_check.py && python3 tests/bidi_controls_check.py && git diff --check

AI-assisted; commands listed were executed locally.

**@⁠tedin7** on GitHub · 2026-11-24 11:20 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/1428) `tedin7:x2w-h-inflate-ex` → `main` · +271 −16 · 4 files · 1 commits · merged 2026-11-24 12:07 UTC Addresses #1198 Adds `enum class InflateStatus { ok, insufficient_output, corrupt_stream, bad_checksum }` and `inflate_zlib_ex(...)` to `src/startup_stubs/inflate.h` so callers can distinguish output-capacity overflow from corrupt streams and Adler-32 checksum mismatches, while keeping `inflate_zlib(...)` as a thin compatible wrapper. ### Verification - `g++ -std=c++17 -Wall -Wextra -Werror -Isrc tests/startup_inflate_status.cpp -o /tmp/startup_inflate_status && /tmp/startup_inflate_status` - `g++ -std=c++17 -Isrc tests/startup_inflate_probe.cpp -o /tmp/startup_inflate_probe && python3 tests/startup_inflate_check.py /tmp/startup_inflate_probe` - `python3 tests/docs_links_check.py && python3 tests/bidi_controls_check.py && git diff --check` AI-assisted; commands listed were executed locally.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 23:06:20 +00:00
github manually merged commit 4e69fd96f9 into gh-pr/1428/base 2026-11-26 23:06:22 +00:00
Author
Owner

@⁠tedin7 on GitHub · 2026-11-24 11:25 UTC · original

Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207) at commit 4e69fd96:

  • Debug (--preset dev): ctest --preset dev -R '^startup_inflate_status$' --no-tests=error --output-on-failure — 1/1 passed (0.02s)
  • Release /O2 (--preset release): ctest --preset release -R '^startup_inflate_status$' --no-tests=error --output-on-failure — 1/1 passed (0.01s)
**@⁠tedin7** on GitHub · 2026-11-24 11:25 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/1428#issuecomment-7130088459) Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207) at commit `4e69fd96`: - **Debug (`--preset dev`)**: `ctest --preset dev -R '^startup_inflate_status$' --no-tests=error --output-on-failure` — **1/1 passed** (0.02s) - **Release `/O2` (`--preset release`)**: `ctest --preset release -R '^startup_inflate_status$' --no-tests=error --output-on-failure` — **1/1 passed** (0.01s)
Author
Owner

@⁠chatgpt-codex-connector[bot] on GitHub · 2026-11-24 11:26 UTC · original · edited 2026-11-24 11:28 UTC

Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-24T11:28:52.833708Z 4e69fd9 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@⁠codex review" or "@⁠codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

**@⁠chatgpt-codex-connector[bot]** on GitHub · 2026-11-24 11:26 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/1428#issuecomment-7130091721) · edited 2026-11-24 11:28 UTC <!-- codex-pull-request-review-summary --> <!-- codex-review-state:v1 {"code_review":{"commit_sha":"4e69fd96f9785e9f249f6fb55a646e49e1706d65","has_any_findings":false,"has_unresolved_findings":false,"status":"completed"},"security_review":{"commit_sha":null,"has_any_findings":null,"has_unresolved_findings":null,"status":null}} --> <details> <summary><strong>Codex Review Summary</strong>: ✅ Completed</summary> This comment shows the latest Codex review activity on this pull request. | Review | Status | Commit | Review trigger | | --- | --- | --- | --- | | 📝 **Code Review** | ✅ **Completed** <relative-time datetime="2026-11-24T11:28:52.833708Z">2026-11-24T11:28:52.833708Z</relative-time> | `4e69fd9` | Draft marked ready | <details> <summary>ℹ️ About Codex in GitHub</summary> <br/> [Your team has set up Codex to review pull requests in this repo](https://chatgpt.com/codex/cloud/settings/general). Reviews are triggered when you - Open a pull request for review - Mark a draft as ready - Comment "@⁠codex review" or "@⁠codex security review". Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. </details> </details>
This discussion has been locked. Commenting is limited to contributors.
No description provided.