GzipHttpCompressor
Hierarchy
- HttpCompressor
- GzipHttpCompressor
Index
Methods
Properties
Methods
__init__
Initialize the gzip compressor.
Parameters
optionalkeyword-onlyquality: int = _max_quality
Compression level, from the fastest to the best compression.
Returns None
compress
Compress a request body.
Parameters
data: bytes
The raw bytes to compress.
Returns bytes
The compressed bytes.
Properties
content_encoding
Value sent in the Content-Encoding header, for example gzip or br.
Compresses request bodies using gzip.
Uses the standard library
gzipmodule. No extra dependencies required.