Expand description
Per-message compression and grpc-accept-encoding negotiation.
Zstd uses its frame format, LZ4 uses a single standard frame (without legacy or skippable frames), Gzip uses RFC 1952, Deflate uses the RFC 1950 zlib wrapper, and Snappy uses its raw block format. Compression contexts are independent for each gRPC message.
Structs§
- Compressed
Message - Payload bytes and the value of the gRPC frame’s compressed flag.
- Compression
Config - Compression policy for outgoing and incoming messages.
Enums§
- Compression
Algorithm - A supported value of the
grpc-encodingheader.
Constants§
- DEFAULT_
MAX_ DECODING_ MESSAGE_ SIZE - Maximum decoded message size accepted by the default configuration.
- DEFAULT_
MIN_ COMPRESS_ SIZE_ BYTES - Messages smaller than this are sent without compression by default.
Functions§
- accept_
encoding_ header - Formats a comma-separated header, removing duplicate algorithms.
- negotiate_
compression - Selects the first locally preferred encoding explicitly accepted by a peer. Unknown tokens are ignored; identity is always available as the fallback. An absent header can be represented by an empty string. Parameters and wildcards are not part of the gRPC accept-encoding grammar.