pub fn decompress_body(
data: &[u8],
encoding: &str,
config: &DecompressionConfig,
) -> Result<DecompressionResult, DecompressionError>Expand description
Decompress body data with ratio and size limits
Returns the decompressed data or an error if limits are exceeded.
§Arguments
data- Compressed data bytesencoding- Content-Encoding value (gzip, deflate, br)config- Decompression limits configuration
§Returns
Ok(DecompressionResult)- Successfully decompressed with metadataErr(DecompressionError)- Limit exceeded or decompression failed