Skip to main content

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 zipfile API
  • uses uv for 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.zip
  • uv run zipfile64 -e archive.zip output-dir

Development

Create the virtual environment and install dependencies with uv:

  • uv sync
  • uv sync --group dev for 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


Download files

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

Source Distribution

zipfile64-0.1.0.tar.gz (2.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

zipfile64-0.1.0-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

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

Hashes for zipfile64-0.1.0.tar.gz
Algorithm Hash digest
SHA256 313e3f9be3e87e3ecad1f9bb0e69976835e118f494be48f71853875255104644
MD5 f7e37c6ed9cd365b6bcdf5781d54424b
BLAKE2b-256 673607073ce5698ddc5f26cef0af8aa0a5135563333f1c6cdede406a1e68bfd9

See more details on using hashes here.

Provenance

The following attestation bundles were made for zipfile64-0.1.0.tar.gz:

Publisher: ci.yml on braincreators/zipfile64

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for zipfile64-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 79b262a44cadfe884f548e5ff2a3f099a0d03a132e59fda086dd78127765a280
MD5 9122dff4755f2b5dbc3cf96ccde3146e
BLAKE2b-256 690c81b7281dd52cf349e2e97720ae1ec3706c09c246981b294a75855728e484

See more details on using hashes here.

Provenance

The following attestation bundles were made for zipfile64-0.1.0-py3-none-any.whl:

Publisher: ci.yml on braincreators/zipfile64

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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