skillfed

aiohttp-zlib-ng

Enable zlib_ng on aiohttp

aiohttp-zlib-ng v0.3.2 83.3K downloads/30d#14,086 on PyPI1
Permissive license Abandoned released

What it is and what it does

aiohttp-zlib-ng is a thin wrapper that patches aiohttp's compression layer to use zlib-ng instead of the standard zlib library. zlib-ng is a faster, drop-in replacement for zlib that reduces CPU overhead during compression and decompression, particularly beneficial for WebSocket connections where compression happens frequently. The package automatically attempts to use isal (Intel's faster compression library) if available, falling back to zlib-ng otherwise.

You install it, call enable_zlib_ng() once at startup, and aiohttp automatically uses the faster compression for all subsequent connections. The package requires aiohttp and zlib-ng as runtime dependencies, both widely available. However, the project is archived and has not been maintained for over 781 days, which means it may not work with newer aiohttp releases or Python versions beyond those it was last tested against.

Use it for:

  • Reduce CPU usage in aiohttp servers handling high-volume WebSocket connections by replacing default compression.
  • Speed up HTTP responses with large payloads by using faster compression without changing application code.
  • Optimize latency-sensitive aiohttp applications where compression overhead is measurable.
  • Enable optional isal compression for additional performance gains on systems where isal is available.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Replaces aiohttp's default zlib compression with the faster zlib-ng library, optionally using isal for additional speed gains, to reduce compression overhead in HTTP and WebSocket connections.

No—the package is abandoned (last commit 2024-07-30, no releases for 781 days) and classified as Pre-Alpha, making it unsuitable for production use. While the concept is sound and install friction is low, the lack of maintenance means it will likely break with future aiohttp updates. Consider using aiohttp's built-in compression tuning or evaluating maintained alternatives before adopting this package.

Install

aiohttp-zlib-ng on PyPI

pip

pip install aiohttp-zlib-ng

uv

uv add aiohttp-zlib-ng

poetry

poetry add aiohttp-zlib-ng

Installing aiohttp-zlib-ng

Before you install

Low install friction with only two runtime dependencies (aiohttp and zlib-ng), both standard packages. However, the project is archived and abandoned as of the last commit on 2024-07-30, with no releases for 781 days, raising concerns about future maintenance and compatibility with newer aiohttp versions.

License in practice

Licensed under Apache Software License (permissive), which allows commercial and private use with minimal restrictions, making it safe from a licensing perspective for most projects.

Quickstart

pip install aiohttp-zlib-ng

import aiohttp_zlib_ng
aiohttp_zlib_ng.enable_zlib_ng()

Requires aiohttp and zlib-ng as runtime dependencies; optional isal package available for additional performance.

Verify before relying

  • Whether the package remains compatible with current aiohttp versions given its abandoned status.
  • Performance improvement magnitude compared to standard zlib in typical aiohttp workloads.
  • Whether isal integration actually activates automatically or requires additional configuration.

Package facts

License not declared (permissive)
Python support supports the current Python release (<4.0,>=3.8)
Install friction low — pure-Python wheel
Runtime dependencies 2 — aiohttp, zlib-ng
Maintenance abandoned — 781 days since the last release
Last repo commit (repository archived)
First released
Downloads 83,260/month — #14,086 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: aiohttp_zlib_ng-0.3.2-py3-none-any.whl

Development Status :: 2 - Pre-AlphaIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseNatural Language :: EnglishOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Software Development :: Libraries

Tags

aiohttp compression optimizationzlib-ng for aiohttpfaster http compressionwebsocket compression speedupaiohttp performance tuningdrop-in zlib replacementisal compression support
compression-optimizationwebsocket-performance

More Libraries packages