pub fn decompress_bytes(
compression: RecordBatchCompression,
records: &[u8],
max_decompressed_bytes: usize,
) -> Result<Vec<u8>>Expand description
Decompresses a Kafka-compatible codec payload with an explicit output limit.
The limit is checked before and during decompression so callers handling untrusted broker data can bound memory growth. The returned bytes contain only the decompressed payload; record-batch framing remains the caller’s responsibility.