flate2 creates slices of uninitialized memory in several places. The only two places where it happens when using the Rust backend are here and here.
This is equivalent to the use of the now-deprecated mem::uninitialized. Instead, either a slice of MaybeUninit<T> should be constructed and passed to the backends, or the backends should receive a structure that does not expose uninitialized memory by design such as Vec or a Vec-like fixed-capacity view of memory.
If the backend does not overwrite the entire slice, this can become an exploitable security vulnerability.