Skip to main content

phpack

CI PyPI Python Versions License: MIT

Fast drop-in HPACK header compression and decompression for HTTP/2 in Python, delivering 6.1x–7.4x faster header encoding and decoding than pure-Python hpack with zero API changes.

Install

pip install phpack

Prebuilt wheels are included for Linux, macOS, and Windows (Python 3.9+, no Rust toolchain needed).

Usage

import phpack

encoder = phpack.Encoder()
decoder = phpack.Decoder()

wire = encoder.encode([(":method", "GET"), (":path", "/"), ("accept", "application/json")])
headers = decoder.decode(wire)

Performance

Workload hpack (x86-64) phpack (x86-64 AVX2) phpack (Apple M4 NEON)
Small (4 headers, 10k iters) 89.65 ms 14.75 ms (6.08x) 11.53 ms (5.21x vs M4 hpack)
Medium (10 headers, 5k iters) 130.76 ms 17.65 ms (7.41x) 14.78 ms (5.24x vs M4 hpack)
Large (40 headers, 1k iters) 99.21 ms 15.18 ms (6.54x) 11.85 ms (5.60x vs M4 hpack)

Under the hood

  • Written in Rust (PyO3) with zero external runtime dependencies and runtime SIMD dispatch (AVX2 / SSE2 / ARM64 NEON)
  • Compact cp39-abi3 wheel with PEP 561 type stubs (py.typed + __init__.pyi)

License

MIT

Metadata

Release files for phpack 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for phpack 0.1.0
File Size Uploaded Provenance Actions
phpack-0.1.0.tar.gz 32.4 kB With provenance Details for phpack-0.1.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for phpack 0.1.0
File Actions
phpack-0.1.0-cp39-abi3-win_amd64.whl CPython 3.9 abi3 Windows x86-64 Details for phpack-0.1.0-cp39-abi3-win_amd64.whl
phpack-0.1.0-cp39-abi3-musllinux_1_2_x86_64.whl CPython 3.9 abi3 Linux musl 1.2+ x86-64 Details for phpack-0.1.0-cp39-abi3-musllinux_1_2_x86_64.whl
phpack-0.1.0-cp39-abi3-musllinux_1_2_aarch64.whl CPython 3.9 abi3 Linux musl 1.2+ ARM64 Details for phpack-0.1.0-cp39-abi3-musllinux_1_2_aarch64.whl
phpack-0.1.0-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.9 abi3 Linux glibc 2.17+ x86-64 Details for phpack-0.1.0-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
phpack-0.1.0-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl CPython 3.9 abi3 Linux glibc 2.17+ ARM64 Details for phpack-0.1.0-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
phpack-0.1.0-cp39-abi3-macosx_11_0_arm64.whl CPython 3.9 abi3 macOS 11.0+ ARM64 Details for phpack-0.1.0-cp39-abi3-macosx_11_0_arm64.whl
phpack-0.1.0-cp39-abi3-macosx_10_12_x86_64.whl CPython 3.9 abi3 macOS 10.12+ x86-64 Details for phpack-0.1.0-cp39-abi3-macosx_10_12_x86_64.whl

Total release size: 2.1 MB

Release files / phpack-0.1.0.tar.gz

Download URL phpack-0.1.0.tar.gz
Size 32.4 kB
Tags Source
SHA-256 checksum
How to use checksums
74b1dfc268acb9f1a7bb05bae4f0d3b0012127c995dec9ab46ec317b280fa4ee
BLAKE2b-256 checksum
How to use checksums
883629eaccfa834eb91034c4f4cc6dd853f690e77a261d320f10f0f80663f6de
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.

Transparency log

Release files / phpack-0.1.0-cp39-abi3-win_amd64.whl

Download URL phpack-0.1.0-cp39-abi3-win_amd64.whl
Size 170.8 kB
Tags CPython 3.9 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
ba276e4a1a117698741ad0abb556369c706d88c1253a123d1f70a14a2b3e14a6
BLAKE2b-256 checksum
How to use checksums
919cb24dd67c82168d542ff7311971e0f7f1884211a4bb690fd7475885225c9e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.

Transparency log

Release files / phpack-0.1.0-cp39-abi3-musllinux_1_2_x86_64.whl

Download URL phpack-0.1.0-cp39-abi3-musllinux_1_2_x86_64.whl
Size 393.0 kB
Tags CPython 3.9 Linux musl 1.2+ x86-64 abi3
SHA-256 checksum
How to use checksums
932c2ed0a88ebec1994cdf227299fc307d585e978b3af2406d27c6c0c9312179
BLAKE2b-256 checksum
How to use checksums
547bc9390b8c066c9dc5ce99c6b324c068d2cd45b32dadc540441b4d062a4516
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.

Transparency log

Release files / phpack-0.1.0-cp39-abi3-musllinux_1_2_aarch64.whl

Download URL phpack-0.1.0-cp39-abi3-musllinux_1_2_aarch64.whl
Size 383.3 kB
Tags CPython 3.9 Linux musl 1.2+ ARM64 abi3
SHA-256 checksum
How to use checksums
9430c8d02d6cc950f181f3b377c89b1c0ee62aeeefaa37740fc9a587ffa2baf0
BLAKE2b-256 checksum
How to use checksums
801ce5f3221acc11f527c213e4de10de8d0c19065e0735a4308732d3c6fbfd2f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.

Transparency log

Release files / phpack-0.1.0-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL phpack-0.1.0-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 288.1 kB
Tags CPython 3.9 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
9a81e9e7fd6651e1e04484bb93568f7cb667d2702e71c0a858efd12aea41fff3
BLAKE2b-256 checksum
How to use checksums
e88ee46e890eb2f4750f3381bb572dc3c5c3a2deeb7bfb946a81ca1eef88b2fa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.

Transparency log

Release files / phpack-0.1.0-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL phpack-0.1.0-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 288.1 kB
Tags CPython 3.9 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
55a33829dc41a15bf0b97b6bddd193868f91a39c3a68bc137fcf579a25d7911e
BLAKE2b-256 checksum
How to use checksums
0b081e1b39f774437cfdf64dd8cfd4fc401a893b1f7beaf807447b0fda0880cd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.

Transparency log

Release files / phpack-0.1.0-cp39-abi3-macosx_11_0_arm64.whl

Download URL phpack-0.1.0-cp39-abi3-macosx_11_0_arm64.whl
Size 260.8 kB
Tags CPython 3.9 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
83f6f347ba2e503244165a86174d23d42a29c5c39ac422cdceee39bf90087654
BLAKE2b-256 checksum
How to use checksums
a3103a799c9142100f61727b7979ea443eae15071676025b50eec40bea47cd30
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.

Transparency log

Release files / phpack-0.1.0-cp39-abi3-macosx_10_12_x86_64.whl

Download URL phpack-0.1.0-cp39-abi3-macosx_10_12_x86_64.whl
Size 267.4 kB
Tags CPython 3.9 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
05d58f9484b074349a17c07663570408131cd9c0bd65fbcb35a4ec53335ce123
BLAKE2b-256 checksum
How to use checksums
06ef345eb06cca080143f62f721bac0536e9b5ac470c994f3bd036e4e868b0b9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.

Transparency log

Security for phpack 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 8 files in this release have been uploaded with provenance metadata.

Select from 8 files

Attestation for phpack-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

8 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page