brotli
Python bindings for the Brotli compression library
Decision gist · record as of 2026-08-14
Yes. Brotli is actively maintained, widely deployed (top 1000 PyPI package), has no known vulnerabilities, and offers a permissive MIT license. Medium install friction is acceptable for a compiled library with good wheel coverage. Install it if you need Brotli compression in Python; the API is straightforward and the library is battle-tested.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires a C/C++ compiler if installing from source on platforms without pre-built wheels; pre-built wheels available for common architectures.
- Medium install friction due to compiled C/C++ bindings; wheels are available for many platforms (Python 2.7 through 3.11+, Linux/macOS/Windows), but source builds may require a C compiler.
- Package is actively maintained with recent commits and no known vulnerabilities.
License · maintenance · safety
MIT (permissive) — MIT license is permissive; you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.
last release 2025-11-05 (282 days) · last repo commit 2026-08-11 · 14,840 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 94,740,431 downloads/mo, #359 on PyPI
Alternatives
Verify before relying
pip install brotli
import brotli
compressed = brotli.compress(b'data')
decompressed = brotli.decompress(compressed)- Whether the package supports streaming compression/decompression or only full-buffer operations.
- Specific compression quality/speed tuning parameters available in the Python API.
- Performance characteristics (speed, ratio) compared to other compression libraries in typical use cases.
What it is and what it does
Brotli is a general-purpose lossless compression algorithm that combines LZ77, Huffman coding, and 2nd-order context modeling to achieve compression ratios comparable to the best available methods while maintaining deflate-like speed. The Python bindings expose the underlying C/C++ library, allowing developers to compress and decompress data programmatically.
The package is widely used in HTTP compression (RFC 7932), web serving, and anywhere dense compression is needed. It has no runtime dependencies beyond the compiled library itself. Note that Brotli is a stream format without built-in checksums or length metadata, so raw stream ranges can be modified without detection by the decoder.
Use it for
- Compress HTTP responses in web applications to reduce bandwidth and improve load times.
- Archive and compress large files or datasets for storage and transfer.
- Integrate compression into data pipelines where high compression ratios are prioritized over speed.
- Decompress Brotli-encoded content received from external APIs or services.
- Build command-line or programmatic compression tools with better density than gzip/deflate.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
Brotli is actively maintained, widely deployed (top 1000 PyPI package), has no known vulnerabilities, and offers a permissive MIT license. Medium install friction is acceptable for a compiled library with good wheel coverage. Install it if you need Brotli compression in Python; the API is straightforward and the library is battle-tested.
Install
brotli on PyPI
Before you install
Medium install friction due to compiled C/C++ bindings; wheels are available for many platforms (Python 2.7 through 3.11+, Linux/macOS/Windows), but source builds may require a C compiler. Package is actively maintained with recent commits and no known vulnerabilities.
Requires a C/C++ compiler if installing from source on platforms without pre-built wheels; pre-built wheels available for common architectures.
License in practice
MIT license is permissive; you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.
Quickstart
pip install brotli
import brotli
compressed = brotli.compress(b'data')
decompressed = brotli.decompress(compressed)
Verify before relying
- Whether the package supports streaming compression/decompression or only full-buffer operations.
- Specific compression quality/speed tuning parameters available in the Python API.
- Performance characteristics (speed, ratio) compared to other compression libraries in typical use cases.
Package facts
| License | MIT permissive |
| Python support | Not specified |
| Install friction | Medium. Platform-specific wheel |
| Runtime dependencies | None |
| Maintenance | Actively maintained 282 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 94,740,431 / month, #359 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaEnvironment :: ConsoleIntended Audience :: DevelopersOperating System :: MacOS :: MacOS XOperating System :: Microsoft :: WindowsOperating System :: POSIX :: LinuxProgramming Language :: CProgramming Language :: C++Programming Language :: PythonProgramming Language :: Python :: 2Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.3Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Programming Language :: Unix ShellTopic :: Software Development :: LibrariesTopic :: Software Development :: Libraries :: Python ModulesTopic :: System :: ArchivingTopic :: System :: Archiving :: CompressionTopic :: Text Processing :: FontsTopic :: Utilities |
Evidence: brotli-1.2.0-cp27-cp27m-macosx_10_9_x86_64.whl; brotli-1.2.0-cp27-cp27m-manylinux1_i686.whl; brotli-1.2.0-cp27-cp27m-manylinux1_x86_64.whl; brotli-1.2.0-cp27-cp27mu-manylinux1_i686.whl; brotli-1.2.0-cp27-cp27mu-manylinux1_x86_64.whl; brotli-1.2.0-cp27-cp27m-win32.whl; brotli-1.2.0-cp27-cp27m-win_amd64.whl; brotli-1.2.0-cp310-cp310-macosx_10_9_universal2.whl; brotli-1.2.0-cp310-cp310-macosx_10_9_x86_64.whl; brotli-1.2.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; brotli-1.2.0-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl; brotli-1.2.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl; brotli-1.2.0-cp310-cp310-musllinux_1_2_aarch64.whl; brotli-1.2.0-cp310-cp310-musllinux_1_2_ppc64le.whl; brotli-1.2.0-cp310-cp310-musllinux_1_2_x86_64.whl; brotli-1.2.0-cp310-cp310-win32.whl; brotli-1.2.0-cp310-cp310-win_amd64.whl; brotli-1.2.0-cp311-cp311-macosx_10_9_universal2.whl; brotli-1.2.0-cp311-cp311-macosx_10_9_x86_64.whl; brotli-1.2.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.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 › “high-ratio compression algorithm”
- brotliProvides Python bindings to the Brotli compression library, enabling…
- ncompressProvides LZW compression and decompression functions that accept…
- pylzsspylzss decodes and encodes data compressed with the LZSS algorithm, a…
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 brotlipy · laszip · brotlicffi · py7zr · zopfli · pylzss · python-lzf · python-neo-lzf · Flask-Compress · pylsqpack