Skip to main content

compress_bytes

Function compress_bytes 

Source
pub fn compress_bytes(
    compression: RecordBatchCompression,
    records: &[u8],
) -> Result<Vec<u8>>
Expand description

Compresses an arbitrary payload with a Kafka-compatible codec.

The implementation is shared by record-batch encoding and higher-level protocol payloads such as KIP-714 telemetry. The returned bytes contain only the codec payload; callers remain responsible for framing and for declaring the codec on the wire.