Expand description
Compression utilities for HTTP content encoding.
This module provides support for automatic compression and decompression of HTTP responses using various encoding formats.
Enums§
- Content
Encoding - Supported content encodings for streaming decompression.
Functions§
- add_
accept_ encoding - Insert an
Accept-Encodingheader (br, zstd, gzip) if not already present. - add_
content_ encoding - Add a Content-Encoding header for outgoing requests that will be compressed.
- compress_
payload - Compress a byte payload using the specified encoding.
- decompress_
body - Decompress a response body based on the content encoding.
- decompress_
stream - Create a buffered reader with decompression support for streaming.
- detect_
encoding - Backwards-compatible helper that returns the first encoding in the chain or identity when none.
- detect_
encodings - Detect the response
Content-Encodingheader and return the ordered chain of encodings. - detect_
request_ compression_ preference - Detect the most efficient request compression supported by the server.