Content Encodings¶
Compress event payloads before sending to a destination.
Overview¶
Content encodings apply compression to the serialized event body. They're optional — without a content encoding, the payload is sent uncompressed.
Content encoding runs after serialization but before content transfer encoding.
Available Content Encodings¶
| Encoding | Config | Algorithm |
|---|---|---|
| Gzip | gzip |
RFC 1952 (GZIP) |
| Deflate | deflate |
RFC 1951 (DEFLATE) |
Quick Examples¶
Gzip compression:
Deflate compression:
Processing Order¶
The encoding pipeline runs in this order:
- Serialization — event → bytes (e.g., JSON, Protobuf)
- Content Encoding — compress bytes (e.g., gzip)
- Content Transfer Encoding — encode bytes (e.g., base64)
See Also¶
- Serializers — format events before encoding
- Content Transfer Encodings — encode after compression
- Destinations — where events are sent