Skip to main content

Monkey patch the standard zipfile module to enable accelerated deflate via isal

Project description

zipfile-isal

PyPI

Monkey patch the standard zipfile module to enable accelerated deflate support via isal.

Based on zipfile-deflate64 and zipfile-zstandard, which provides similar functionality but for the deflate64 algorithm. Unlike zipfile-deflate64, this package supports both compression and decompression.

Requires isal.

Note: if you need Python2, use zipfile39 instead (it is also compatible with Python3).

Installation

pip install zipfile-isal

Usage

Anywhere in a Python codebase:

import zipfile_isal  # This has the side effect of patching the zipfile module to support isal

Alternatively, zipfile_isal re-exports the zipfile API, as a convenience:

import zipfile_isal as zipfile

zipfile.ZipFile(...)

Compression example:

import zipfile_isal as zipfile

zf = zipfile.ZipFile('/tmp/test.zip', 'w', zipfile.ZIP_DEFLATED, compresslevel=-2)
zf.write('large_file.img')

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

zipfile-isal-0.0.3.1.tar.gz (4.3 kB view details)

Uploaded Source

File details

Details for the file zipfile-isal-0.0.3.1.tar.gz.

File metadata

  • Download URL: zipfile-isal-0.0.3.1.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.7.0 requests/2.6.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/2.7.13

File hashes

Hashes for zipfile-isal-0.0.3.1.tar.gz
Algorithm Hash digest
SHA256 09dea151bdc2691c56a549c0a59feeea49a5779019f4ed98900a7be3fdb24749
MD5 e3257a64976f643e55f36c92e3c02de5
BLAKE2b-256 f01da06b379c19093dbae039cb9faf1721f7a02b5e3c2a0924d0da9e7d3752ff

See more details on using hashes here.

Supported by

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