fix: stop using write_all in brotli decompression#9
Open
kokoISnoTarget wants to merge 1 commit intonicoburns:mainfrom
Open
fix: stop using write_all in brotli decompression#9kokoISnoTarget wants to merge 1 commit intonicoburns:mainfrom
kokoISnoTarget wants to merge 1 commit intonicoburns:mainfrom
Conversation
Author
|
@nicoburns Just if you didn't see this. |
Owner
|
I did see this. I'm just not confident I understand why it's correct. Although I suspect it is as your other PRs have been good. It seems weird to me that Brotli would write all at once and then return 0. Isn't that against the documented contract of the trait's API? @taj-p @harrison-canva Can I request you guys' review on this one? |
Contributor
|
Hey @nicoburns! Happy to take a look at this tomorrow if no-one LGTM's it first. I am also curious to understand the semantics here... |
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.
This is a fix for DioxusLabs/blitz#314.
Brotli should decompress in one write call and on succeeding calls it returns 0 to signal that it finished decompressing, which
std::io::Writehandles as an error inwrite_all.