Fix update of bytes read in the encoder state machine.#456
Fix update of bytes read in the encoder state machine.#456robjtede merged 1 commit intoNullus157:mainfrom
Conversation
494f082 to
5996a6f
Compare
|
I'll try to add a test for this. Right now I'm investigating the failing tests. |
This seems to be another bug introduced in 8947fed. I've reverted that commit in this PR (first commit). I think the bug is that we were turning some |
4ed8167 to
2954200
Compare
|
@NobodyXu This should be ready for review now. |
NobodyXu
left a comment
There was a problem hiding this comment.
Thanks the encoder the change look good to me, but the decoder change really got me confused on what exactly is changed (its behavior is identical before and after this PR) and not related to this PR, can we have the decoder change reverted please?
crates/async-compression/src/futures/bufread/generic/decoder.rs
Outdated
Show resolved
Hide resolved
2954200 to
f87860a
Compare
Previously we were not updating the number of bytes read: we were just changing the local binding of `read`. This means that read was always zero and therefore the encoder never flushed. Fixes Nullus157#455.
f87860a to
a093589
Compare
|
@robjtede Hi. Can you take a look to unblock the PR from landing? |
robjtede
left a comment
There was a problem hiding this comment.
nice catch, that's a subtle bug
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #456 +/- ##
===========================
===========================
☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
## 🤖 New release * `compression-codecs`: 0.4.36 -> 0.4.37 (✓ API compatible changes) * `async-compression`: 0.4.39 -> 0.4.40 (✓ API compatible changes) <details><summary><i><b>Changelog</b></i></summary><p> ## `compression-codecs` <blockquote> ## [0.4.37](compression-codecs-v0.4.36...compression-codecs-v0.4.37) - 2026-02-18 ### Other - Stop consuming input on errors in codecs. ([#451](#451)) </blockquote> ## `async-compression` <blockquote> ## [0.4.40](async-compression-v0.4.39...async-compression-v0.4.40) - 2026-02-18 ### Other - Fix update of bytes read in the encoder state machine. ([#456](#456)) - *(deps)* update rand requirement from 0.9 to 0.10 ([#449](#449)) </blockquote> </p></details> --- This PR was generated with [release-plz](https://github.com/release-plz/release-plz/). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Previously we were not updating the number of bytes read: we were just changing the local binding of
read. This means that read was always zero and therefore the encoder never flushed.Fixes #455