Replies: 3 comments 10 replies
-
The test passes with |
Beta Was this translation helpful? Give feedback.
-
I upstreamed the issue to miniz_oxide: Frommi/miniz_oxide#158 |
Beta Was this translation helpful? Give feedback.
-
My recommendation is to check how |
Beta Was this translation helpful? Give feedback.
-
flate2::Decompress::decompress
is documented as "consuming only as much input as needed and writing as much output as possible". However in my tests it consumes the whole input even if output buffer size is not sufficient. Because of this I cannot useflate2
to decode the IMAP stream incrementally usingasync-compression
crate: async-email/async-imap#112Here is a failing test where output buffer is only 8 bytes long, but the whole input is consumed:
Here
miniz_oxide::inflate::stream::inflate
returnsbytes_consumed
equal to the whole input size even though there was not enough space in the output buffer:flate2-rs/src/ffi/rust.rs
Line 73 in 1a28821
I thought about reporting the bug directly to
miniz_oxide
, but don't see in its documentation any guarantee that it will consume only as much as needed.Beta Was this translation helpful? Give feedback.
All reactions