compress.zlib: changed to pure V RFC-compliant code#27189
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 08a756f861
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
The last commit fixed a bug in embed_file that's been there a long time, but miniz allowed it to work. It was caught because this zlib code is stricter than miniz. It didn't fail unless you used Why it only failed in In Outside Why the new zlib code exposes it The previous miniz-backed path was more forgiving and could ignore junk after the DEFLATE stream. The new code is stricter (per the RFC) and now rejects malformed zlib containers where extra bytes appear between the end of the DEFLATE payload and the final Adler-32 footer So the stricter decoder exposed a bug that was already present in the caller. Fix The runtime needed to remember the compressed length separately from the uncompressed length.
Before this fix, the code only stored one len, and that value was being used for the wrong purpose. |
|
Note that the I don't have a Windows system to test on. No BSD systems, either. I'll look into a docker container, qemu, etc. unless someone else can take a look... |
Also has
interopsubdir with code for full V<->C<->Python cross-validation.