Adds Deflate64 support to Python's zipfile module
Project description
zipfile64
Adds Deflate64 support to Python's standard zipfile module.
Features
- reads ZIP archives that use compression method
9(Deflate64) - writes ZIP archives with Deflate64 when requested
- keeps the standard
zipfileAPI - uses
uvfor dependency and virtualenv management
Getting started
Example using pip:
pip install zipfile64
Usage
# Importing zipfile64.zipfile will patch the built-in zipfile module
import zipfile64.zipfile as zipfile
with zipfile.ZipFile("archive.zip") as zf:
print(zf.namelist())
data = zf.read("example.txt")
Writing a Deflate64 archive:
import io
import zipfile
from zipfile64 import ZIP_DEFLATE64, patch
patch()
buffer = io.BytesIO()
with zipfile.ZipFile(buffer, mode="w", compression=ZIP_DEFLATE64) as zf:
zf.writestr("hello.txt", b"hello world")
You can also use the patched python zipfile CLI:
uv run zipfile64 -l archive.zipuv run zipfile64 -e archive.zip output-dir
Development
Create the virtual environment and install dependencies with uv:
uv syncuv sync --group devfor test dependencies
uv will create the local virtual environment for the project.
uv run pytest
Limitations
- patching is process-wide because it extends the standard-library module
- Deflate64 compression level is currently ignored by the backend library
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file zipfile64-0.1.0.tar.gz.
File metadata
- Download URL: zipfile64-0.1.0.tar.gz
- Upload date:
- Size: 2.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
313e3f9be3e87e3ecad1f9bb0e69976835e118f494be48f71853875255104644
|
|
| MD5 |
f7e37c6ed9cd365b6bcdf5781d54424b
|
|
| BLAKE2b-256 |
673607073ce5698ddc5f26cef0af8aa0a5135563333f1c6cdede406a1e68bfd9
|
Provenance
The following attestation bundles were made for zipfile64-0.1.0.tar.gz:
Publisher:
ci.yml on braincreators/zipfile64
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
zipfile64-0.1.0.tar.gz -
Subject digest:
313e3f9be3e87e3ecad1f9bb0e69976835e118f494be48f71853875255104644 - Sigstore transparency entry: 1098192550
- Sigstore integration time:
-
Permalink:
braincreators/zipfile64@bc28a5998fc36499d851e3dc59d97bab08773bc9 -
Branch / Tag:
refs/tags/0.1.0 - Owner: https://github.com/braincreators
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@bc28a5998fc36499d851e3dc59d97bab08773bc9 -
Trigger Event:
push
-
Statement type:
File details
Details for the file zipfile64-0.1.0-py3-none-any.whl.
File metadata
- Download URL: zipfile64-0.1.0-py3-none-any.whl
- Upload date:
- Size: 3.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
79b262a44cadfe884f548e5ff2a3f099a0d03a132e59fda086dd78127765a280
|
|
| MD5 |
9122dff4755f2b5dbc3cf96ccde3146e
|
|
| BLAKE2b-256 |
690c81b7281dd52cf349e2e97720ae1ec3706c09c246981b294a75855728e484
|
Provenance
The following attestation bundles were made for zipfile64-0.1.0-py3-none-any.whl:
Publisher:
ci.yml on braincreators/zipfile64
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
zipfile64-0.1.0-py3-none-any.whl -
Subject digest:
79b262a44cadfe884f548e5ff2a3f099a0d03a132e59fda086dd78127765a280 - Sigstore transparency entry: 1098192602
- Sigstore integration time:
-
Permalink:
braincreators/zipfile64@bc28a5998fc36499d851e3dc59d97bab08773bc9 -
Branch / Tag:
refs/tags/0.1.0 - Owner: https://github.com/braincreators
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@bc28a5998fc36499d851e3dc59d97bab08773bc9 -
Trigger Event:
push
-
Statement type: