Skip to main content

A wrapper to use the fastest available zlib

Project description

zlib-fast

CI Status Documentation Status Test coverage percentage

Poetry black pre-commit

PyPI Version Supported Python versions License


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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

zlib_fast-0.2.0.tar.gz (9.6 kB view hashes)

Uploaded Source

Built Distribution

zlib_fast-0.2.0-py3-none-any.whl (10.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page