Repository navigation
fix: return buffered gzip data from bounded reads - #251
Merged
Merged
Conversation
pyrooka
requested changes
Oct 5, 2026
pyrooka
left a comment
Member
There was a problem hiding this comment.
One small cosmetic issue to address, otherwise it looks good. Thanks for the contribution!
| # Return buffered data whether it was already available or was | ||
| # produced above. An empty read must only indicate end-of-stream. | ||
| compressed = self.buffer[:size] | ||
| # then remove them from the buffer. |
Member
There was a problem hiding this comment.
This residual comment should be removed as it doesn't make any now.
Suggested change
| # then remove them from the buffer. |
Signed-off-by: Shubham Padkonde <shubhampadkonde12@gmail.com>
Shubham-Padkonde
force-pushed
the
fix/gzip-bounded-reads
branch
from
October 5, 2026 15:58
5ef9189 to
c0da072
Compare
ibm-devx-sdk
pushed a commit
that referenced
this pull request
Oct 6, 2026
## [3.27.2](v3.27.1...v3.27.2) (2026-10-06) ### Bug Fixes * return buffered gzip data from bounded reads ([#251](#251)) ([8b65cf7](8b65cf7))
|
🎉 This PR is included in version 3.27.2 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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.
Bounded
GzipStream.read(size)calls can return an empty byte string after producing compressed data, even though the internal buffer still contains bytes. Consumers interpret that as EOF and can truncate the upload.Return up to the requested number of bytes after filling the buffer, as well as when enough bytes were already buffered. Unbounded reads retain their existing behavior.
Regression coverage decompresses complete streams read in five chunk sizes across empty, byte, Unicode text, and large inputs. It also checks that a zero-length read preserves the payload.
Validation: 224 unit tests passed, one skipped, with 99% coverage on Linux. Lint and formatting checks passed. Live IBM Cloud integration tests were not run.