Conversation
Collaborator
|
Thanks. I will take a look at this next week. Thanks for the extra regression tests! |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Streams produced by
isal_zlib.compressobj(zdict=...)can fail when decoded by Python's standardzlibwith the same dictionary:invalid distance too far back. The deflate stream uses dictionary history, but the zlib wrapper omits FDICT and DICTID.This change writes the dictionary header once before the first
compress()orflush(), then lets ISA-L produce deflate data and the Adler-32 trailer. DICTID covers the full supplied dictionary and is stored explicitly in network byte order, including with the older ISA-L revision bundled by this repository. Raw deflate and empty dictionaries keep their existing paths.Adds 155 regression checks covering levels, window sizes, short and long dictionaries, empty input, flush-first operation, repeated flushes, and cross-decoding with standard zlib. The smallest reproducer uses
dictionary = b'hello world'anddata = dictionary * 10at compression level 1.Validation on Linux x86_64 / CPython 3.14.7:
The sanitizer run used CPython 3.14 with
PYTHONMALLOC=malloc,detect_leaks=1, and pytest plugin autoload disabled; pytest-timeout was explicitly enabled. It was not the debug-interpreter tox environment. Skips are the existing big-memory and unsupported copy scenarios.Checklist