Package: brotlicffi
BrotliCFFIThis library contains Python CFFI bindings for the reference Brotli encoder/decoder,available here. This allows Python software to use the Brotli compression
algorithm directly from Python code.Install from PyPI:$ python -m pip install brotlicffiInstall from Conda:$ conda install -c conda-forge brotlicffiTo use it simply, try this:importbrotlicffidata=brotlicffi.decompress(compressed_data)More information can be foundin the documentation.Using BrotliCFFI in ProjectsThe API is 100% compatible with theBrotli Python C bindings.
We recommend installing the C bindings on CPython and the CFFI
bindings everywhere else (PyPy, etc)Essentially you use requirements like this:install_requires=["brotli; platform_python_implementation == 'CPython'","brotlicffi; platform_python_implementation != 'CPython'"]and then import the correct Brotli library like so:try:importbrotlicffiasbrotliexceptImportError:importbrotliWe provide anexample projectthat shows how to use both
libraries together to support Brotli with multiple Python implementations.LicenseThe source code of BrotliCFFI is available under the MIT license. Brotli itself
is made available under the Version 2.0 of the Apache Software License. See the
LICENSE and libbrotli/LICENSE files for more information.AuthorsBrotliCFFI/brotlipy was authored by Cory Benfield and
is currently maintained by Seth Michael Larson.Changelog1.1.0.0 (2023-09-14)Upgraded libbrotli to v1.1.0Added explicit support for Python 3.10, 3.11, and 3.12Removed support for Python 2.7, 3.5, and 3.61.0.9.2 (2021-04-06)Addedmanylinux_aarch64wheels1.0.9.1 (2021-01-27)Avoid byte/string comparison warning in error message construction1.0.9.0 (2021-01-20)Updated to v1.0.9 of the Brotli libraryLibrary version now follows Brotli versionRemoved thedictionaryparameter fromcompressandCompressorNOTE:Python 2.7 wheels for Windows likely won’t work untilgoogle/brotli#848is resolved0.8.0 (2020-11-30)Renamed the package on PyPI tobrotlicffi, all further updates will be
published to the new package. Using thebrotlipyis deprecated.Changed the importable namespace frombrotlitobrotlicffito no longer
conflict with theBrotliPyPI package.Addedprocess()method toCompressorandDecompressor.Addedis_finished()method toDecompressor.0.7.0 (2017-05-30)Update to v0.6.0 of the Brotli library.0.6.0 (2016-09-08)Resolved a bug wheredecompress()would return an empty bytestring
instead of erroring if the provided bytestring was small enough.Added thefinish()method to the streaming decompressor.0.5.1 (2016-08-17)Update to v0.5.2 of the Brotli library.Add new exception type (Error).Add compatibility with C++ brotli library by aliasingErrortoerror.Extra error checking of input parameters to the compressor.0.5.0 (2016-08-16)Update to v0.5.0 of the Brotli library.Extend one-shot compression API to include all control parameters.Added streaming/incremental compression API.Added flags to control compression mode.0.4.0 (2016-08-01)Update to v0.4.0 of the Brotli library.0.3.0 (2016-05-11)Update to v0.3.0 of the Brotli library.0.2.0 (2015-10-05)Fix brokenbrotli.compresssupport on Windows.0.1.3 (2015-10-05)Added basic forbrotli.compressthrough a C wrapper included in this
library.