Skip to main content

decompress_zlib_pooled

Function decompress_zlib_pooled 

Source
pub fn decompress_zlib_pooled(
    compressed: &[u8],
    max_size: u64,
) -> Result<Vec<u8>>
Expand description

Decompress zlib data using a pooled decompressor.

Reuses the per-thread zlib_rs::Inflate internal state (~48 KB) across calls. The output buffer is taken by the caller (zero-copy), so it is sized up-front from the compressed length to avoid repeated doubling reallocations while it grows to the decompressed size.