It would be nice to have the mentioned functionality in `flate2` even when relying on pure Rust code. This got forwarded here from https://github.com/rust-lang/flate2-rs/issues/358, see that for a bit more details.