Skip to main content

bit7z-python

The Support of bit7z in Python

PyPI version License GitHub Actions

⚠️Notice: this package needs Python 3.9 or later

🚀 Usage

To install, just simply use this command:

pip install bit7z-python

To verify install (⚠️Not available in v0.0.1 becuase there is a minor bug), run:

python -c "import bit7z_python; print(bit7z_python.__version__)"

Quick Start

import bit7z_python as b7z

lib = b7z.Bit7zLibrary()
compressor = b7z.BitFileCompressor(lib, b7z.FORMAT_7Z)

# 压缩整个目录
compressor.compress_directory_contents("./my_folder", "./archive.7z")

# 解压
extractor = b7z.BitFileExtractor(lib, b7z.FORMAT_AUTO)
extractor.extract("./archive.7z", "./output/")

⚡ Performance

Compared to pure‑Python alternatives like py7zr, bit7z‑python delivers ~2.2× faster extraction and ~2.85× faster compression — thanks to the underlying C++ 7‑zip library.

Operation py7zr (pure Python) bit7z‑python (Newest) Speedup
Extract (137 MB) 44.88 s 20.18 s 2.22x
Compress (37 MB) 16.63 s 5.83 s 2.85x

Test environment:
Intel Core i5‑6500, 16 GB RAM, Windows 10 22H2, Python 3.14.3 free‑threading

Notice: Speedup figures are from our test environment; on other hardware (e.g., Core i5‑1135G7) the speedup was about 2.3x. The key takeaway is that bit7z‑python consistently outperforms py7zr by 2.2~2.3x or more across platforms.

Test archives are located in the test/ directory of this repository:

  • test/GTK4.7z — 137 MB archive for extraction tests
  • test/wx_demos/ — 37 MB folder for compression tests

Run the benchmark yourself with the included test/test.py script (requires py7zr installed).

Status

This project is still developing. However, the first release has published🚀, and more function will be added in the future releases.

🗺️ Roadmap

v0.1.1 (This Release)

  • Upgrade bit7z to v4.1.0
  • API compatibility updates (no breaking changes)
  • Performance improvements from bit7z v4.1.0

v0.2.0 ~ v1.0.0

  • BitArchiveEditor — edit existing archives (add/remove/update)
  • BitArchiveWriter — create archives
  • BitArchiveReader — read archive metadata

v1.0.0+

  • Memory compression/decompression (BitMemCompressor/BitMemExtractor)
  • Stream compression/decompression
  • Nested archive support (v4.1.0 feature)

Goal

Provide a full-featured, convenient, and efficient compression library for Python.

📖 Documentation

For now, please refer to the bit7z Wiki for API details.
The Python API follows the same structure with PEP8 naming conventions:

bit7z (C++) bit7z-python (Python)
compressFiles() compress_files()
extractArchive() extract_archive()
BitFileCompressor BitFileCompressor (same)

Full API documentation is planned for the next release.

License

This project is under the Apache-2.0 License, see here for more details

Metadata

Release files for bit7z-python 0.1.1

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

Built distributions (wheels)

Table of built distributions (wheels) for bit7z-python 0.1.1
File Actions
bit7z_python-0.1.1-cp314-cp314t-win_amd64.whl CPython 3.14 CPython 3.14 free-threading Windows x86-64 Details for bit7z_python-0.1.1-cp314-cp314t-win_amd64.whl
bit7z_python-0.1.1-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.14 CPython 3.14 free-threading Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details for bit7z_python-0.1.1-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
bit7z_python-0.1.1-cp314-cp314-win_amd64.whl CPython 3.14 CPython 3.14 Windows x86-64 Details for bit7z_python-0.1.1-cp314-cp314-win_amd64.whl
bit7z_python-0.1.1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details for bit7z_python-0.1.1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
bit7z_python-0.1.1-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details for bit7z_python-0.1.1-cp313-cp313-win_amd64.whl
bit7z_python-0.1.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details for bit7z_python-0.1.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
bit7z_python-0.1.1-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details for bit7z_python-0.1.1-cp312-cp312-win_amd64.whl
bit7z_python-0.1.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details for bit7z_python-0.1.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
bit7z_python-0.1.1-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details for bit7z_python-0.1.1-cp311-cp311-win_amd64.whl
bit7z_python-0.1.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details for bit7z_python-0.1.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
bit7z_python-0.1.1-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details for bit7z_python-0.1.1-cp310-cp310-win_amd64.whl
bit7z_python-0.1.1-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details for bit7z_python-0.1.1-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
bit7z_python-0.1.1-cp39-cp39-win_amd64.whl CPython 3.9 CPython 3.9 Windows x86-64 Details for bit7z_python-0.1.1-cp39-cp39-win_amd64.whl
bit7z_python-0.1.1-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details for bit7z_python-0.1.1-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Total release size: 39.1 MB

Release files / bit7z_python-0.1.1-cp314-cp314t-win_amd64.whl

Download URL bit7z_python-0.1.1-cp314-cp314t-win_amd64.whl
Size 2.8 MB
Tags CPython 3.14 CPython 3.14 free-threading Windows x86-64
SHA-256 checksum
How to use checksums
204bff2e8852e11296366a1d852110664a6e87121397a9d2caca0bc3605d4381
BLAKE2b-256 checksum
How to use checksums
e41de4640315b1a4ae345a4e8af54863d2b433353b3e694b55341f6430fb9008
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / bit7z_python-0.1.1-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL bit7z_python-0.1.1-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 2.8 MB
Tags CPython 3.14 CPython 3.14 free-threading Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
98358d932d341d6f7bbbf6c27d6502e145f8b3543500f2358dc5cee732cf9b3f
BLAKE2b-256 checksum
How to use checksums
487b7b54fa6f3fc3a20a8dc86b7d35748ba1688f437ac9b9d91b67a428b03071
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / bit7z_python-0.1.1-cp314-cp314-win_amd64.whl

Download URL bit7z_python-0.1.1-cp314-cp314-win_amd64.whl
Size 2.8 MB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
5c75150b9707532e23a32f3df256bd71a3354c921b18b123b94fd431b37dc31d
BLAKE2b-256 checksum
How to use checksums
8bd1a61901b7c100fbfc1d2aa3b343951f65db44348f21f159970405492636ab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / bit7z_python-0.1.1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL bit7z_python-0.1.1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 2.8 MB
Tags CPython 3.14 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
b486f7e710e4b9d61a4712af02d4bf6ff41b13901a03c131a7a6ad7a9a4121f7
BLAKE2b-256 checksum
How to use checksums
48b26e3c6b80178f84dd8e4aa4e8ccd90704dd5aa2cbd76e3039ce85c4640107
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / bit7z_python-0.1.1-cp313-cp313-win_amd64.whl

Download URL bit7z_python-0.1.1-cp313-cp313-win_amd64.whl
Size 2.7 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
780f6fb5fbe0c5ce54e302109dc231afbbedf836bbf66f7fb627f16dfc470d42
BLAKE2b-256 checksum
How to use checksums
762d45292407440c65ce150e0ca8bab6ae99b65f57be7023719ca8f11484a9b6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / bit7z_python-0.1.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL bit7z_python-0.1.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 2.8 MB
Tags CPython 3.13 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
cad894e11bc16f2ebb8db4e6ea6b66f003e9deca1425bcade2fa4fc1eb80eb7b
BLAKE2b-256 checksum
How to use checksums
15e0d4525136697805d98fb6afd2cee2b73caea3caf666d431d28e6d100673ef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / bit7z_python-0.1.1-cp312-cp312-win_amd64.whl

Download URL bit7z_python-0.1.1-cp312-cp312-win_amd64.whl
Size 2.7 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
44d576597c50426a3c870653d1a2561ee94180486562b5e95f4988d3021967ef
BLAKE2b-256 checksum
How to use checksums
f383834e85b1efed0a843bd41fe98fc68a3e4c605748069a7b76066c2da54981
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / bit7z_python-0.1.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL bit7z_python-0.1.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 2.8 MB
Tags CPython 3.12 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
0814e26c78a5ed69417f90245055c4eaf2dda65c93602faa717ac20420b28ff7
BLAKE2b-256 checksum
How to use checksums
602c7f9191c37a4670fa27446155fb50cc17133065616ad9ffa9b081f04320e6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / bit7z_python-0.1.1-cp311-cp311-win_amd64.whl

Download URL bit7z_python-0.1.1-cp311-cp311-win_amd64.whl
Size 2.7 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
822d8148c9e41c276903b1153c401c6994c1951027f45b4d53c5b1bbae5f8dff
BLAKE2b-256 checksum
How to use checksums
57f7cdf681828baf74f0f829dcd14d80482a9d7811ec364ab7eb018e3f426803
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / bit7z_python-0.1.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL bit7z_python-0.1.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 2.8 MB
Tags CPython 3.11 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
ed1282f1797c0a2cb2ae77f3397784d348abc2d56a16c8f07f7d83e20a5ca209
BLAKE2b-256 checksum
How to use checksums
da4ea52788579dc6844b86f4d3b6872de9d05a9be6649cd5380d3174081acc09
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / bit7z_python-0.1.1-cp310-cp310-win_amd64.whl

Download URL bit7z_python-0.1.1-cp310-cp310-win_amd64.whl
Size 2.7 MB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
5d4eb01f194f382d6a8fe46732767b9ca0197b77425e3941f01a84f73505d64b
BLAKE2b-256 checksum
How to use checksums
36a785e4555c17c37d935e5faa38c394feb143888db8897aee21868856ed6a3f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / bit7z_python-0.1.1-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL bit7z_python-0.1.1-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 2.8 MB
Tags CPython 3.10 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
105fa29d3d1b06cb375aaff6cfdfaf70f097965667f875a9d62c21e6a8d3b907
BLAKE2b-256 checksum
How to use checksums
bd8e2c906fac21dec593d9d0a96c3702bdf5dbe5d8429c26b409fd0a0a4a1889
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / bit7z_python-0.1.1-cp39-cp39-win_amd64.whl

Download URL bit7z_python-0.1.1-cp39-cp39-win_amd64.whl
Size 2.8 MB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
7ddf661d8bd8dbb57f9a5ead6874e07ff5db1c2d9ba4466d67ec76c38a7ac340
BLAKE2b-256 checksum
How to use checksums
617560f05d258da3b01346d0a9e8f13218e58dfa828a7817c9e9cd5c82f9a8fa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / bit7z_python-0.1.1-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL bit7z_python-0.1.1-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 2.8 MB
Tags CPython 3.9 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
68efac39c1cca768246e6f3f89acab5197b7be5a2bea60df23928db97b8a96bb
BLAKE2b-256 checksum
How to use checksums
e4213ea7dd5df4477fd22f474dcaae32d825e2d9822e1ab19f518824c32e9f0f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Security for bit7z-python 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

14 release files No provenance

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