zipfile-zstd-0.0.4
توضیحات
Monkey patch the standard zipfile module to enable Zstandard support
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | zipfile-zstd-0.0.4 |
| نام | zipfile-zstd |
| نسخه کتابخانه | 0.0.4 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Andrei Alexeyev |
| ایمیل نویسنده | akari@taisei-project.org |
| آدرس صفحه اصلی | https://github.com/taisei-project/python-zipfile-zstd |
| آدرس اینترنتی | https://pypi.org/project/zipfile-zstd/ |
| مجوز | - |
# zipfile-zstd
[](https://pypi.org/project/zipfile-zstd/)
Monkey patch the standard `zipfile` module to enable Zstandard support.
Based on [`zipfile-deflate64`](https://github.com/brianhelba/zipfile-deflate64), which provides similar functionality but for the `deflate64` algorithm. Unlike `zipfile-deflate64`, this package supports both compression and decompression.
Requires [`python-zstandard`](https://github.com/indygreg/python-zstandard) for libzstd bindings.
## Installation
```bash
pip install zipfile-zstd
```
## Usage
Anywhere in a Python codebase:
```python
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:
```python
import zipfile_zstd as zipfile
zipfile.ZipFile(...)
```
Compression example:
```python
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.
نیازمندی
| مقدار | نام |
|---|---|
| >=0.15.0 | zstandard |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.6 | Python |
نحوه نصب
نصب پکیج whl zipfile-zstd-0.0.4:
pip install zipfile-zstd-0.0.4.whl
نصب پکیج tar.gz zipfile-zstd-0.0.4:
pip install zipfile-zstd-0.0.4.tar.gz