deflate
Python wrapper for libdeflate.
Decision gist · record as of 2026-08-14
Yes, if you need faster compression/decompression than the standard library and are comfortable with a compiled dependency. The package is actively maintained, has no known vulnerabilities, and offers pre-compiled wheels for most platforms. Install friction is medium but manageable. Not necessary if standard library zlib meets your performance needs.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.9 or later.
- Pre-compiled wheels available; building from source requires a C compiler and optionally LIBDEFLATE_PREFIX environment variable if linking to system libdeflate.
- Pre-compiled wheels available for common platforms (macOS, Linux, Windows, multiple architectures).
License · maintenance · safety
permissive license (permissive) — MIT license (permissive); you can use this freely in commercial and private projects with minimal restrictions.
last release 2025-07-18 (392 days) · last repo commit 2026-08-01 · 33 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 331,744 downloads/mo, #7,512 on PyPI
Alternatives
Verify before relying
pip install deflate
import deflate
compressed = deflate.gzip_compress(b"hello world!" * 1000, level=6)
original = deflate.gzip_decompress(compressed)- Performance comparison with standard library zlib or other compression libraries to justify adoption.
- Whether the compression level range (1-12 for libdeflate) offers practical benefits over standard zlib (1-9).
- API stability and backward compatibility guarantees across future releases.
What it is and what it does
deflate is a thin Python binding to Eric Biggers' libdeflate C library, exposing compression and decompression for gzip, raw DEFLATE, and zlib formats. It also provides CRC32 and Adler-32 checksum functions. The package is built as a compiled extension with pre-compiled wheels for common platforms, so installation typically requires no build step.
You use it when you need faster compression than Python's built-in zlib module, or when you want to work with raw DEFLATE or zlib data streams where the original decompressed size must be tracked separately. The API is minimal: functions like gzip_compress, deflate_decompress, and crc32 take byte strings and optional parameters (compression level, initial checksum state) and return the result directly.
Use it for
- Compress large text or binary payloads for network transmission or storage when speed matters more than standard library zlib.
- Decompress gzip or zlib data received from external sources with a simpler API than the standard library.
- Compute rolling CRC32 or Adler-32 checksums across multiple data chunks for integrity verification.
- Work with raw DEFLATE streams where you manage the original size separately, as required by some protocols.
- Replace zlib in performance-critical paths where libdeflate's faster implementation reduces CPU overhead.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need faster compression/decompression than the standard library and are comfortable with a compiled dependency.
The package is actively maintained, has no known vulnerabilities, and offers pre-compiled wheels for most platforms. Install friction is medium but manageable. Not necessary if standard library zlib meets your performance needs.
Install
deflate on PyPI
Before you install
Pre-compiled wheels available for common platforms (macOS, Linux, Windows, multiple architectures). Medium install friction due to compiled C extension, but wheels reduce build overhead. Active maintenance with last commit 2026-08-01.
Requires Python 3.9 or later. Pre-compiled wheels available; building from source requires a C compiler and optionally LIBDEFLATE_PREFIX environment variable if linking to system libdeflate.
License in practice
MIT license (permissive); you can use this freely in commercial and private projects with minimal restrictions.
Quickstart
pip install deflate
import deflate
compressed = deflate.gzip_compress(b"hello world!" * 1000, level=6)
original = deflate.gzip_decompress(compressed)
Verify before relying
- Performance comparison with standard library zlib or other compression libraries to justify adoption.
- Whether the compression level range (1-12 for libdeflate) offers practical benefits over standard zlib (1-9).
- API stability and backward compatibility guarantees across future releases.
Package facts
| License | permissive license permissive |
| Python support | Supports the current Python release >=3.9 |
| Install friction | Medium. Platform-specific wheel |
| Runtime dependencies | None |
| Maintenance | Actively maintained 392 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 331,744 / month, #7,512 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: MacOS :: MacOS XOperating System :: Microsoft :: WindowsOperating System :: POSIX :: LinuxProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9Topic :: Software Development :: LibrariesTopic :: System :: Archiving :: Compression |
Evidence: deflate-0.8.1-cp310-cp310-macosx_10_9_x86_64.whl; deflate-0.8.1-cp310-cp310-macosx_11_0_arm64.whl; deflate-0.8.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; deflate-0.8.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; deflate-0.8.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl; deflate-0.8.1-cp310-cp310-musllinux_1_2_aarch64.whl; deflate-0.8.1-cp310-cp310-musllinux_1_2_i686.whl; deflate-0.8.1-cp310-cp310-musllinux_1_2_x86_64.whl; deflate-0.8.1-cp310-cp310-win32.whl; deflate-0.8.1-cp310-cp310-win_amd64.whl; deflate-0.8.1-cp311-abi3-macosx_10_9_x86_64.whl; deflate-0.8.1-cp311-abi3-macosx_11_0_arm64.whl; deflate-0.8.1-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; deflate-0.8.1-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; deflate-0.8.1-cp311-abi3-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl; deflate-0.8.1-cp311-abi3-musllinux_1_2_aarch64.whl; deflate-0.8.1-cp311-abi3-musllinux_1_2_i686.whl; deflate-0.8.1-cp311-abi3-musllinux_1_2_x86_64.whl; deflate-0.8.1-cp311-abi3-win32.whl; deflate-0.8.1-cp311-abi3-win_amd64.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “zlib wrapper python”
- deflateThin Python wrapper around libdeflate for fast gzip, DEFLATE, and…
- aiohttp-fast-zlibReplaces aiohttp's default zlib compression with faster alternatives…
- cmeel-zlibProvides zlib 1.3.2 as a pre-built wheel for use within cmeel-based…
Give your agent the search over MCP, or paste the wish link into any chat.
More Libraries packages
urllib3 is an HTTP client library that provides thread-safe connection pooling, SSL/TLS verification, multipart file uploads, request retries, compression support, and proxy handling for Python applications.
Requests is a Python HTTP library that simplifies sending HTTP/1.1 requests with automatic handling of headers, authentication, cookies, and response parsing.
Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.
Install it if you're building an extensible application or framework.
Provides parsing, arithmetic, and recurrence rule computation for dates and times, with timezone support and iCalendar RFC compliance.
Install it if you need to parse flexible date strings, compute relative dates, handle timezones, or work with recurrence rules—it's the de facto choice for these tasks.
Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.
pytest is a testing framework that lets you write test functions using plain assert statements and automatically discovers and runs them, with detailed failure reporting.
See also malduck · zlib-ng · zlib-state · cramjam · compress-pickle · stream-inflate · zopfli · inflate64 · binapy · blosc