Skip to main content

Module snappy

Module snappy 

Source
Expand description

Snappy codec (snap Rust backend). Level is accepted but ignored.

Kafka uses the xerial-snappy framing format (NOT the standard snappy framing format). This consists of a 16-byte magic header followed by a sequence of snappy-compressed blocks, each preceded by a big-endian u32 length.

Functions§

compress_with_level
Compress payload. The level parameter is accepted for API symmetry but has no effect — Snappy has no tunable level.
decompress
Decompress payload, bounded by super::MAX_DECOMPRESSED_LEN.
decompress_bounded
Decompress payload, refusing to produce more than max_len bytes.