Skip to main content

zipfile-zstd

PyPI

Monkey patch the standard zipfile module to enable Zstandard support.

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

Requires python-zstandard for libzstd bindings.

Installation

pip install zipfile-zstd

Usage

Anywhere in a Python codebase:

import zipfile_zstd  # This has the side effect of patching the zipfile module to support Zstandard

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

import zipfile_zstd as zipfile

zipfile.ZipFile(...)

Compression example:

import zipfile_zstd as zipfile

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

Dictionaries and advanced compression parameters are not supported, sorry.

Release files for zipfile-zstd 0.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for zipfile-zstd 0.0.4
File Size Uploaded
zipfile-zstd-0.0.4.tar.gz 4.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for zipfile-zstd 0.0.4
File Interpreter ABI Platform
zipfile_zstd-0.0.4-py3-none-any.whl Python 3 none any Details

Total release size: 8.7 kB

Release files / zipfile-zstd-0.0.4.tar.gz

Download URL zipfile-zstd-0.0.4.tar.gz
Size 4.6 kB
Tags Source
SHA-256 checksum
How to use checksums
c1498e15b7922a3d1af0ea55df8b11b2af4e8f7e0e80e414e25d66899f7def89
BLAKE2b-256 checksum
How to use checksums
f72a2e0941bc0058d10ab37d8c578b94a19f611f6ae54f124140f2fb451f0932
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.12

Release files / zipfile_zstd-0.0.4-py3-none-any.whl

Download URL zipfile_zstd-0.0.4-py3-none-any.whl
Size 4.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c8e07be35765c072eb7b1be715c89ecb248a1127b014e12a9b8ac7db2600c166
BLAKE2b-256 checksum
How to use checksums
b13abc3011d26bbb490741f58c28a2df559445c59e8524cbbb71ecf33db23bb7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.12

Release history Release notifications | RSS feed

This release

0.0.4 This release

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page