]> git.ipfire.org Git - thirdparty/httpx.git/commit
Add support for zstd decoding (#3139)
authorMichiel W. Beijen <mb@x14.nl>
Thu, 21 Mar 2024 10:17:15 +0000 (11:17 +0100)
committerGitHub <noreply@github.com>
Thu, 21 Mar 2024 10:17:15 +0000 (10:17 +0000)
commit392dbe45f086d0877bd288c5d68abf860653b680
tree2607b9e37d12ad5b198eff48e4e915cc785cebda
parent7df47ce4d93a06f2c3310cd692b4c2336d7663ba
Add support for zstd decoding (#3139)

This adds support for zstd decoding using the python package zstandard.
This is similar to how it is implemented in urllib3. I also chose the
optional installation option httpx[zstd] to mimic the same option in
urllib3.

zstd decoding is similar to brotli, but in benchmarks it is supposed to
be even faster. The zstd compression is described in RFC 8878.

See https://github.com/encode/httpx/discussions/1986

Co-authored-by: Kamil Monicz <kamil@monicz.dev>
15 files changed:
CHANGELOG.md
README.md
docs/index.md
docs/quickstart.md
httpx/_compat.py
httpx/_decoders.py
httpx/_models.py
pyproject.toml
requirements.txt
tests/client/test_client.py
tests/client/test_event_hooks.py
tests/client/test_headers.py
tests/test_asgi.py
tests/test_decoders.py
tests/test_main.py