Skip to main content

MAX_DECOMPRESSED_LEN

Constant MAX_DECOMPRESSED_LEN 

Source
pub const MAX_DECOMPRESSED_LEN: usize = _; // 16_777_216usize
Expand description

Default upper bound on decompressed output (16 MiB — matches the established-session frame cap in TcpSessionTransport). Decompression is an asymmetric operation: a few KiB of crafted LZ4/Zstd can expand to gigabytes (a “decompression bomb”). AdaptiveCompressor::decompress enforces this cap unconditionally; callers that need a different bound use AdaptiveCompressor::decompress_with_limit.