Skip to content

fix: stop using write_all in brotli decompression#9

Open
kokoISnoTarget wants to merge 1 commit intonicoburns:mainfrom
kokoISnoTarget:fix/brotli
Open

fix: stop using write_all in brotli decompression#9
kokoISnoTarget wants to merge 1 commit intonicoburns:mainfrom
kokoISnoTarget:fix/brotli

Conversation

@kokoISnoTarget
Copy link

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::Write handles as an error in write_all.

@kokoISnoTarget
Copy link
Author

@nicoburns Just if you didn't see this.

@nicoburns
Copy link
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?

@harrison-canva
Copy link
Contributor

harrison-canva commented Feb 4, 2026

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...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants