pub fn decode_with_limits<S: SampleSink>(
encoding: u8,
data: &[u8],
limits: &DecodeLimits,
sink: &mut S,
) -> Result<DecodeOutcome>Expand description
Decodes a chunk body with explicit limits.
Every count that comes from the payload (samples, spans, buckets, custom bounds) is checked before it is used to allocate, so a corrupt chunk fails fast instead of reserving memory for a size it claims to have.