Skip to main content

MAX_DECOMPRESSED_BYTES

Constant MAX_DECOMPRESSED_BYTES 

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

v0.7.0 I1 hardening — hard cap on the size of a single decompressed transcript. A pathological zstd blob (e.g. 1 KB compressed → 1 GB decompressed) would otherwise OOM the daemon when fetch runs. 16 MiB is large enough that no legitimate transcript stored via store is rejected (the store path itself ingests &str, so rows above this ceiling could only have been hand-crafted by a hostile writer with direct DB access). Surfaced as a constant so a downstream operator can audit the boundary in a code review without chasing magic numbers across modules.