A wrapper to use the fastest available zlib
Project description
zlib-fast
Documentation: https://zlib-fast.readthedocs.io
Source Code: https://github.com/bdraco/zlib-fast
A wrapper to use the fastest available zlib
zlib is be a bottleneck for creating backups with tarfile
. zlib-fast
replaces usage of zlib
with isal
which is a drop-in faster replacement.
Unlike the base isal implementation, this module maps zlib compression
levels for compressobj
to their nearest isal
equivalent which allows
it to be used as a drop in replacement with tarfile
.
Installation
Install this via pip (or your favourite package manager):
pip install zlib-fast
Usage
Enable zlib-fast support by calling zlib_fast.enable()
.
import zlib_fast
zlib_fast.enable()
zlib_fast.disable()
The most common use case is for use with tarfile
which does a late import. enable
will only be effective for future imports of zlib
, and will not redirect existing imports. If you need to use this module for other use cases, be sure to call zlib_fast.enable()
before any code that loads zlib
.
Contributors ✨
Thanks goes to these wonderful people (emoji key):
This project follows the all-contributors specification. Contributions of any kind welcome!
Credits
This package was created with Copier and the browniebroke/pypackage-template project template.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for zlib_fast-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3d4abf1a4199afc70c8d7164af266fe4756a83d8ec443b8f14b2c0449a129497 |
|
MD5 | 25074d70e2676fe5e62f1769c4b9ae6d |
|
BLAKE2b-256 | 2b50461c23b6607bfd389972daaeaa6272c31a7e6baaede6ae750b448fef47b1 |