# zipfile-isal
[![PyPI](https://img.shields.io/pypi/v/zipfile-isal)](https://pypi.org/project/zipfile-isal/)
Monkey patch the standard `zipfile` module to enable accelerated deflate support via isal.
Based on [`zipfile-deflate64`](https://github.com/brianhelba/zipfile-deflate64) and [`zipfile-zstandard`](https://github.com/taisei-project/python-zipfile-zstd), which provides similar functionality but for the `deflate64` algorithm. Unlike `zipfile-deflate64`, this package supports both compression and decompression.
Requires [`isal`](https://github.com/pycompression/python-isal) (and [`slz`](https://github.com/cielavenir/python-slz) optionally).
Note: if you need Python2, use [zipfile39](https://github.com/cielavenir/zipfile39) instead (it is also compatible with Python3).
## Installation
```bash
pip install zipfile-isal
```
## Usage
Anywhere in a Python codebase:
```python
import zipfile_isal # This has the side effect of patching the zipfile module to support isal
```
Alternatively, `zipfile_isal` re-exports the `zipfile` API, as a convenience:
```python
import zipfile_isal as zipfile
zipfile.ZipFile(...)
```
Compression example:
```python
import zipfile_isal as zipfile
zf = zipfile.ZipFile('/tmp/test.zip', 'w', zipfile.ZIP_DEFLATED, compresslevel=-12)
zf.write('large_file.img')
```
compresslevel:
- -10, -11, -12, -13 correspond to isal 0, 1, 2, 3
- -21 corresponds to slz
- 11 to 19 correspond to 7-zip 1-9
Raw data
{
"_id": null,
"home_page": "https://github.com/cielavenir/python-zipfile-ppmd",
"name": "zipfile-isal",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": "",
"keywords": "zip zipfile deflate isal",
"author": "cielavenir",
"author_email": "cielartisan@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/84/f6/ee4f85f16bb3d58f54c932d4811d78666f0dc785dd37c4d04a46b766a1bf/zipfile-isal-0.0.3.3.tar.gz",
"platform": "",
"description": "# zipfile-isal\n[![PyPI](https://img.shields.io/pypi/v/zipfile-isal)](https://pypi.org/project/zipfile-isal/)\n\nMonkey patch the standard `zipfile` module to enable accelerated deflate support via isal.\n\nBased on [`zipfile-deflate64`](https://github.com/brianhelba/zipfile-deflate64) and [`zipfile-zstandard`](https://github.com/taisei-project/python-zipfile-zstd), which provides similar functionality but for the `deflate64` algorithm. Unlike `zipfile-deflate64`, this package supports both compression and decompression.\n\nRequires [`isal`](https://github.com/pycompression/python-isal) (and [`slz`](https://github.com/cielavenir/python-slz) optionally).\n\nNote: if you need Python2, use [zipfile39](https://github.com/cielavenir/zipfile39) instead (it is also compatible with Python3).\n\n## Installation\n```bash\npip install zipfile-isal\n```\n\n## Usage\nAnywhere in a Python codebase:\n```python\nimport zipfile_isal # This has the side effect of patching the zipfile module to support isal\n```\n\nAlternatively, `zipfile_isal` re-exports the `zipfile` API, as a convenience:\n```python\nimport zipfile_isal as zipfile\n\nzipfile.ZipFile(...)\n```\n\nCompression example:\n```python\nimport zipfile_isal as zipfile\n\nzf = zipfile.ZipFile('/tmp/test.zip', 'w', zipfile.ZIP_DEFLATED, compresslevel=-12)\nzf.write('large_file.img')\n```\n\ncompresslevel:\n\n- -10, -11, -12, -13 correspond to isal 0, 1, 2, 3\n- -21 corresponds to slz\n- 11 to 19 correspond to 7-zip 1-9\n\n\n",
"bugtrack_url": null,
"license": "",
"summary": "Monkey patch the standard zipfile module to enable accelerated deflate via isal",
"version": "0.0.3.3",
"project_urls": {
"Bug Tracker": "https://github.com/cielavenir/python-zipfile-ppmd/issues",
"Homepage": "https://github.com/cielavenir/python-zipfile-ppmd"
},
"split_keywords": [
"zip",
"zipfile",
"deflate",
"isal"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "84f6ee4f85f16bb3d58f54c932d4811d78666f0dc785dd37c4d04a46b766a1bf",
"md5": "e1fa94c4f1444912fa05f14ced0fb456",
"sha256": "58795854fa02e5c6631446773565fc657a4dc92d15f908261240a69ceb8ba533"
},
"downloads": -1,
"filename": "zipfile-isal-0.0.3.3.tar.gz",
"has_sig": false,
"md5_digest": "e1fa94c4f1444912fa05f14ced0fb456",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 4890,
"upload_time": "2022-03-04T16:06:06",
"upload_time_iso_8601": "2022-03-04T16:06:06.029568Z",
"url": "https://files.pythonhosted.org/packages/84/f6/ee4f85f16bb3d58f54c932d4811d78666f0dc785dd37c4d04a46b766a1bf/zipfile-isal-0.0.3.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2022-03-04 16:06:06",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "cielavenir",
"github_project": "python-zipfile-ppmd",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "zipfile-isal"
}