-
Notifications
You must be signed in to change notification settings - Fork 105
Flush compressed data out of encoders more often #383
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Currently flush() is not getting called so compressed output is not returned to the client the encoder until input is fully read(). In my use case, flushing more often is necessary as otherwise it appears to the client the data gets 'buffered'. There's been a previous PR here and some discussion Nullus157#155 but appears to be abandonded so if there's interest in this fix, this PR tries this again. The tests are passing with this change.
NobodyXu
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
can you also update the futures bufread encoder as well?
It's equivalent to the tokio implementation.
Sure, updated it just now. |
NobodyXu
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #383 +/- ##
===========================
===========================
☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Released in 0.4.31 |
* Flush compressed data out of encoders more often Currently flush() is not getting called so compressed output is not returned to the client the encoder until input is fully read(). In my use case, flushing more often is necessary as otherwise it appears to the client the data gets 'buffered'. There's been a previous PR here and some discussion Nullus157#155 but appears to be abandonded so if there's interest in this fix, this PR tries this again. The tests are passing with this change. * Update futures bufread futures encoder to add more flushes It's equivalent to the tokio implementation.
Currently flush() is not getting called so compressed output is not returned to the client the encoder until input is fully read(). In my use case, flushing more often is necessary as otherwise it appears to the client the data gets 'buffered'.
There's been a previous PR here and some discussion #155 but appears to be abandonded so if there's interest in this fix, this PR tries this again.
The tests are passing with this change.