Skip to main content

Monkey patch the standard zipfile module to enable DCL Implode support

Project description

zipfile-dclimplode

PyPI

Monkey patch the standard zipfile module to enable DCL Implode support.

DCL stands for PKWARE(R) Data Compression Library.

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 dclimplode for dclimplode bindings.

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

Installation

pip install zipfile-dclimplode

Usage

Anywhere in a Python codebase:

import zipfile_dclimplode  # This has the side effect of patching the zipfile module to support DCL Implode

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

import zipfile_dclimplode as zipfile

zipfile.ZipFile(...)

Compression example:

import zipfile_dclimplode as zipfile

zf = zipfile.ZipFile('/tmp/test.zip', 'w', zipfile.ZIP_DCLIMPLODED, compresslevel=3)
zf.write('large_file.img')

compresslevel: 1,2,3 (binary) 11,12,13 (ascii)

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-dclimplode-0.0.3.1.tar.gz (4.9 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page