Experimental Python hpack implementation using nghttp2.
The API is nearly compatible with hpack. (httpx runs without issues).
It requires Cython because nghttp2pyx requires some updates:
- to raise hpack.exceptions.* instead of a generic Exception
- to handle the sentive flag
About speed:
- the encoder is about 20 times faster
- the decoder is about 10 times faster
python -m pip install git+https://github.com/dalf/hpack_nghttp2.git
Warning: it will replace the existing the hpack module
- hpack.exceptions.InvalidTableIndex : never raised
- hpack.exceptions.InvalidTableSizeError : never raised