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
File details
Details for the file zlib_fast-0.2.0.tar.gz
.
File metadata
- Download URL: zlib_fast-0.2.0.tar.gz
- Upload date:
- Size: 9.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 23c80e89518854eaea85c52db88c0551de67d3ac32d5ac5441196acfe6f8b24f |
|
MD5 | 078a3b0bd3e22b807f240b5bcb51dbeb |
|
BLAKE2b-256 | 85c9563bd86968a221c28875c34f6bcf94f2512b9ac7830f74760aa22ed77921 |
File details
Details for the file zlib_fast-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: zlib_fast-0.2.0-py3-none-any.whl
- Upload date:
- Size: 10.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 40e4f306061904e08354dfcdff25a614709e962a87ce3a833a052d9d8e877bf4 |
|
MD5 | 8da158233321c248c7ae0969ab6b3db3 |
|
BLAKE2b-256 | b7be9ff15fc445e2ac690535e2bdf9da37f1deaef535ae8d60c641f47c282b82 |