You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was using this library with a wrapped reader that can timeout to bound search time for a best compression algorithm. The reader returns an Error(ErrorKind::TimedOut) but brotli doesn't report it. I was looking at the code and it appears that https://github.com/dropbox/rust-brotli/blob/master/src/enc/mod.rs#L249 doesn't follow the contract of readers. The only error that is ignorable is an interrupt, but all errors are ignored and the stream happily closes even though it's only read like 2% of the data. Needless to say this makes it impossible to get the original data back when the BrotliCompress function returns Ok(_).
The text was updated successfully, but these errors were encountered:
Sorry about the delay. It appears to work as expected now.
The project is on an embedded platform where we're trying to losslessly compress artifacts for uploading and analysis later as much as possible to save on bandwidth. I get between the readers and writers and determine if the compression ratio is after some percentage of the reads is too high or taking too long and raise my own error to not let it go forever.
Brotli levels 10 and 11 take an incredibly long time between calls to read or to write. It would be nice to set a maximum time limit to write calls even if you wrote out a buffer of zero length because then I can cancel the operation with better time granularity.
I was using this library with a wrapped reader that can timeout to bound search time for a best compression algorithm. The reader returns an
Error(ErrorKind::TimedOut)
but brotli doesn't report it. I was looking at the code and it appears that https://github.com/dropbox/rust-brotli/blob/master/src/enc/mod.rs#L249 doesn't follow the contract of readers. The only error that is ignorable is an interrupt, but all errors are ignored and the stream happily closes even though it's only read like 2% of the data. Needless to say this makes it impossible to get the original data back when theBrotliCompress
function returnsOk(_)
.The text was updated successfully, but these errors were encountered: