--- id: aiohttp-fast-zlib version: "0.3.0" license: Apache-2.0 license_treatment: permissive maintenance: active --- # aiohttp-fast-zlib — Use the fastest installed zlib compatible library with aiohttp License: permissive · Maintenance: active · Downloads: 1.8M/mo ## What it is and what it does aiohttp-fast-zlib is a thin wrapper that swaps aiohttp's compression layer to use faster zlib-compatible libraries. Compression is a known bottleneck in aiohttp, especially for WebSocket connections that compress frequently; this package patches aiohttp to use isal or zlib-ng instead of the standard library's zlib, both of which are drop-in replacements with better performance. You call a single enable() function at startup, and all subsequent aiohttp compression operations use the faster library. The package is in Pre-Alpha development, meaning the API and behavior may change. It has a single runtime dependency on aiohttp and requires Python 3.9 or later. Installation is straightforward, but you must also install one of the optional compression libraries (isal or zlib-ng) to see any benefit. Use it for: - Speed up WebSocket communication in aiohttp applications by reducing compression CPU overhead. - Improve throughput for HTTP APIs that heavily compress responses (JSON, HTML, etc.). - Reduce latency in real-time aiohttp services where zlib compression is a measurable bottleneck. - Optimize resource usage on servers handling many concurrent aiohttp connections. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Replaces aiohttp's default zlib compression with faster alternatives (isal or zlib-ng) to reduce compression bottlenecks in HTTP and WebSocket connections. Yes, if you use aiohttp and compression is a known bottleneck in your workload. The package is low-friction to install and maintain, has no known vulnerabilities, and offers a straightforward performance win. Pre-Alpha status means you should test it in a non-critical environment first and monitor for API changes in future releases. ## Install pip install aiohttp-fast-zlib uv add aiohttp-fast-zlib poetry add aiohttp-fast-zlib ## Installing aiohttp-fast-zlib Before you install: Low friction: pure Python wheel with a single runtime dependency (aiohttp). Actively maintained with recent commits. Pre-Alpha status signals the package is still stabilizing, so expect potential API changes. License in practice: Apache-2.0 permissive license allows commercial and private use with minimal restrictions; you must retain license notices in distributions. Quickstart: pip install aiohttp-fast-zlib[isal] import aiohttp_fast_zlib aiohttp_fast_zlib.enable() Requires either isal or zlib-ng to be installed as an optional extra; without one, the package will not provide a performance benefit. Verify before relying: - Whether isal or zlib-ng must be pre-installed or are automatically pulled in by the extras. - Specific performance gains (percentage improvement) over standard aiohttp compression. - Compatibility with all aiohttp versions or specific version constraints. ## Package facts - License: Apache-2.0 (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 1.8M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags aiohttp compression performance, zlib optimization aiohttp, fast compression websockets, isal zlib-ng wrapper, http compression speedup, aiohttp deflate faster, compression-optimization, websocket-performance [View on SkillFed](https://skillfed.io/packages/aiohttp-fast-zlib) · [View on PyPI](https://pypi.org/project/aiohttp-fast-zlib/)