Skip to main content

MAX_DECOMPRESSED_LEN

Constant MAX_DECOMPRESSED_LEN 

Source
pub const MAX_DECOMPRESSED_LEN: usize = _; // 1_073_741_824usize
Expand description

Hard ceiling on the decompressed size of a single payload.

Wire frames are already capped at crate::frame::MAX_FRAME_LENGTH (100 MiB), so this allows roughly a 10:1 expansion of the largest possible compressed batch while stopping a decompression bomb — a tiny payload that inflates without bound — from exhausting memory and aborting the process under panic = "abort".