rust-lang / flate2-rs

DEFLATE, gzip, and zlib bindings for Rust
https://docs.rs/flate2
Apache License 2.0
862 stars 159 forks source link

unknown return code: -4 #411

Open prz23 opened 1 month ago

prz23 commented 1 month ago

image

prz23 commented 1 month ago

image

The case with -4 will cause an error, and data is transient..

Byron commented 1 month ago

Indeed, the code triggered is here and it seems like -4 refers to Z_MEM_ERROR.

I think it that should be handled as well and cause an error instead.

Would you like to contribute this as PR? I'd do it too but can't merge my own PRs, so having a base-PR would be helpful to get a fix more quickly.