Zopfli module for python
Project description
PYZOPFLI
cPython bindings for zopfli.
USAGE
pyzopfli is a straight forward wrapper around zopfli’s ZlibCompress method.
from zopfli.zlib import compress from zlib import decompress s = 'Hello World' print decompress(compress(s))
pyzopfli also wraps GzipCompress, but the API point does not try to mimic the gzip module.
from zopfli.gzip import compress from StringIO import StringIO from gzip import GzipFile print GzipFile(fileobj=StringIO(compress("Hello World!"))).read()
Both zopfli.zlib.compress and zopfli.gzip.compress support the following keyword arguments. All values should be integers; boolean parmaters are treated as expected, 0 and >0 as false and true.
- verbose dumps zopfli debugging data to stderr
- numiterations Maximum amount of times to rerun forward and backward pass to optimize LZ77 compression cost. Good values: 10, 15 for small files, 5 for files over several MB in size or it will be too slow.
- blocksplitting If true, splits the data in multiple deflate blocks with optimal choice for the block boundaries. Block splitting gives better compression. Default: true (1).
- blocksplittinglast If true, chooses the optimal block split points only after doing the iterative LZ77 compression. If false, chooses the block split points first, then does iterative LZ77 on each individual block. Depending on the file, either first or last gives the best compression. Default: false (0).
- blocksplittingmax Maximum amount of blocks to split into (0 for unlimited, but this can give extreme results that hurt compression on some files). Default value: 15.
TODO
- Stop reading the entire file into memory and support streaming
- Monkey patch zlib and gzip so code with an overly tight binding can be easily modified to use zopfli.
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.
Filename, size | File type | Python version | Upload date | Hashes |
---|---|---|---|---|
Filename, size zopfli-0.1.7-cp27-cp27m-macosx_10_6_intel.whl (70.6 kB) | File type Wheel | Python version cp27 | Upload date | Hashes View |
Filename, size zopfli-0.1.7-cp27-cp27m-manylinux1_i686.whl (35.7 kB) | File type Wheel | Python version cp27 | Upload date | Hashes View |
Filename, size zopfli-0.1.7-cp27-cp27m-manylinux1_x86_64.whl (41.0 kB) | File type Wheel | Python version cp27 | Upload date | Hashes View |
Filename, size zopfli-0.1.7-cp27-cp27mu-manylinux1_i686.whl (35.7 kB) | File type Wheel | Python version cp27 | Upload date | Hashes View |
Filename, size zopfli-0.1.7-cp27-cp27mu-manylinux1_x86_64.whl (41.0 kB) | File type Wheel | Python version cp27 | Upload date | Hashes View |
Filename, size zopfli-0.1.7-cp27-cp27m-win32.whl (28.8 kB) | File type Wheel | Python version cp27 | Upload date | Hashes View |
Filename, size zopfli-0.1.7-cp27-cp27m-win_amd64.whl (33.9 kB) | File type Wheel | Python version cp27 | Upload date | Hashes View |
Filename, size zopfli-0.1.7-cp35-cp35m-macosx_10_6_intel.whl (72.0 kB) | File type Wheel | Python version cp35 | Upload date | Hashes View |
Filename, size zopfli-0.1.7-cp35-cp35m-manylinux1_i686.whl (36.0 kB) | File type Wheel | Python version cp35 | Upload date | Hashes View |
Filename, size zopfli-0.1.7-cp35-cp35m-manylinux1_x86_64.whl (41.9 kB) | File type Wheel | Python version cp35 | Upload date | Hashes View |
Filename, size zopfli-0.1.7-cp35-cp35m-win32.whl (33.2 kB) | File type Wheel | Python version cp35 | Upload date | Hashes View |
Filename, size zopfli-0.1.7-cp35-cp35m-win_amd64.whl (39.1 kB) | File type Wheel | Python version cp35 | Upload date | Hashes View |
Filename, size zopfli-0.1.7-cp36-cp36m-macosx_10_6_intel.whl (72.0 kB) | File type Wheel | Python version cp36 | Upload date | Hashes View |
Filename, size zopfli-0.1.7-cp36-cp36m-manylinux1_i686.whl (36.0 kB) | File type Wheel | Python version cp36 | Upload date | Hashes View |
Filename, size zopfli-0.1.7-cp36-cp36m-manylinux1_x86_64.whl (41.9 kB) | File type Wheel | Python version cp36 | Upload date | Hashes View |
Filename, size zopfli-0.1.7-cp36-cp36m-win32.whl (33.1 kB) | File type Wheel | Python version cp36 | Upload date | Hashes View |
Filename, size zopfli-0.1.7-cp36-cp36m-win_amd64.whl (39.1 kB) | File type Wheel | Python version cp36 | Upload date | Hashes View |
Filename, size zopfli-0.1.7-cp37-cp37m-macosx_10_6_intel.whl (70.7 kB) | File type Wheel | Python version cp37 | Upload date | Hashes View |
Filename, size zopfli-0.1.7-cp37-cp37m-manylinux1_i686.whl (36.0 kB) | File type Wheel | Python version cp37 | Upload date | Hashes View |
Filename, size zopfli-0.1.7-cp37-cp37m-manylinux1_x86_64.whl (41.9 kB) | File type Wheel | Python version cp37 | Upload date | Hashes View |
Filename, size zopfli-0.1.7-cp37-cp37m-win32.whl (33.2 kB) | File type Wheel | Python version cp37 | Upload date | Hashes View |
Filename, size zopfli-0.1.7-cp37-cp37m-win_amd64.whl (39.1 kB) | File type Wheel | Python version cp37 | Upload date | Hashes View |
Filename, size zopfli-0.1.7-cp38-cp38-macosx_10_9_x86_64.whl (38.9 kB) | File type Wheel | Python version cp38 | Upload date | Hashes View |
Filename, size zopfli-0.1.7-cp38-cp38-manylinux1_i686.whl (36.0 kB) | File type Wheel | Python version cp38 | Upload date | Hashes View |
Filename, size zopfli-0.1.7-cp38-cp38-manylinux1_x86_64.whl (41.9 kB) | File type Wheel | Python version cp38 | Upload date | Hashes View |
Filename, size zopfli-0.1.7-cp38-cp38-win32.whl (33.2 kB) | File type Wheel | Python version cp38 | Upload date | Hashes View |
Filename, size zopfli-0.1.7-cp38-cp38-win_amd64.whl (39.2 kB) | File type Wheel | Python version cp38 | Upload date | Hashes View |
Filename, size zopfli-0.1.7.zip (75.7 kB) | File type Source | Python version None | Upload date | Hashes View |
Close
Hashes for zopfli-0.1.7-cp27-cp27m-macosx_10_6_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9bb6e091da6ccf8bec9844df593daf3d3198a94cbeb8a97f6902c5e8e6891c28 |
|
MD5 | 3c0cea26c42d392af7c5196086ac2127 |
|
BLAKE2-256 | 8fbeceb644d5ab5e88b08a9290adbdcfbc74451f25055161137f318e548d4702 |
Close
Hashes for zopfli-0.1.7-cp27-cp27m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bb886265ff36a4ee0136a1ba8ecdbc5736f9b4155e8b379afa0574042dab730b |
|
MD5 | 910596f5d256de47507454cfc28ec14e |
|
BLAKE2-256 | a868749ffd9aa0157713f9ab5b74e44931a1587de040204f7f15e19728c495b5 |
Close
Hashes for zopfli-0.1.7-cp27-cp27m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c9b57dd98505deb5e2a4218627b94cf23518c5fb7029936e905a1bbad42ebe82 |
|
MD5 | b5f846ea4b12a0ccc901cb155524469b |
|
BLAKE2-256 | a53750513932b3e98f6f586e56d038d6292c57acee8cd2785f3299c428caa1b7 |
Close
Hashes for zopfli-0.1.7-cp27-cp27mu-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4753ee4821d7df5abe7f6acf9d9db3bb30a277bcb59750d44e86d6b5cb47a05c |
|
MD5 | 698abc91187ec882c90404a6186dc02d |
|
BLAKE2-256 | 1847b4140038033f4116a30df98028a5d5b3ccacaceda072badeb5b58ed53bfb |
Close
Hashes for zopfli-0.1.7-cp27-cp27mu-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d0e7ec0398738a741fd71ff53d5f08b86b9c082d711ba48c2f119cb6c9d1ec38 |
|
MD5 | 1c105b991c1cc227fda3758e3ff4846b |
|
BLAKE2-256 | 1093365a83e1869ec0270bb90c9213ec8b985294c45cdd0706b4e628a166ebbe |
Close
Hashes for zopfli-0.1.7-cp27-cp27m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a5cbefe59ffc0e4a4be80a8a45e12d91dd7be7fe4bb6c1e31e3dd3cc187eacc9 |
|
MD5 | 648c73491a51d5bf617efabac719bfcd |
|
BLAKE2-256 | 12b207c633502ed26c7e0260c09345632e7848f21617d99dc87c288ba48e46ed |
Close
Hashes for zopfli-0.1.7-cp27-cp27m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ba1130ee91383cea99727e52cb9be1c56f4bbabd9c74ae737db041c081e8c292 |
|
MD5 | 13e5ba3fc608d49dcb689de678fb032c |
|
BLAKE2-256 | 918447485d2e9b658b506c5b3c04ecbb9135b7dc61526f42f0e3b228d9b68b85 |
Close
Hashes for zopfli-0.1.7-cp35-cp35m-macosx_10_6_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b518cfede6bf3371726ac7c0df5568c66cb6b1ecad75cb622d2a762bb6d24df4 |
|
MD5 | 2d885320c8495b2362f75182764874a8 |
|
BLAKE2-256 | b380a58086086a2638bf5cfe414a33f89d2ab35ce5309852f4cd2f7d8f235272 |
Close
Hashes for zopfli-0.1.7-cp35-cp35m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 97d85bf0ebbb1d256716a76fcccb9b544dd9a16c0d690582aa7907dffc2a9960 |
|
MD5 | 16cea0ef28e9042620506baef6effa6d |
|
BLAKE2-256 | 7826f3483d644ba5dbe223bf10833b3c5f63e9bd17021e46d74a79c9ea1af8aa |
Close
Hashes for zopfli-0.1.7-cp35-cp35m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7c1f14f34b89cc750b20442f00b5d28acb5db2d38298e31c765f4a48c416d63b |
|
MD5 | a36eb14de515d22a45a994570b52a6bc |
|
BLAKE2-256 | 08e751fc537d1dcd339b99cac7f215c7b3ee8dcfa7cb1dc790cb57b9664837f2 |
Close
Hashes for zopfli-0.1.7-cp35-cp35m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0512baec1856fe6b2ea910fc0713e0c0415ec55f6a22af0e1a3c807e2df78f9f |
|
MD5 | 6abf45edc171bb50ac41f6817e5ac08b |
|
BLAKE2-256 | 66f58013d311c2b317f1effa82da690e0c65c3dbc65adfe3db5d941cb1e46887 |
Close
Hashes for zopfli-0.1.7-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5f8eece4acf2377dc7803688bdea11017fb6414b5e4b129ab80692a4a3f4b248 |
|
MD5 | e4f7930c0541282d37d11bebd912d1bd |
|
BLAKE2-256 | e547b587c1dd2e8699d3faf724e3a86968b2bea8d26973106f2a6703108ee6e5 |
Close
Hashes for zopfli-0.1.7-cp36-cp36m-macosx_10_6_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6be5101946c334b71c60d631f0725c5c7105f3cbbf359d108376660304e1d1bb |
|
MD5 | a02ebcf349bcde1cb0fa191d44b2e44a |
|
BLAKE2-256 | b642424187ef9b66988976bb6e3811ec8f1c4c9188447ea6f844dc38c5de18ac |
Close
Hashes for zopfli-0.1.7-cp36-cp36m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 578a3e38a0256dc3e0fb887d58203c1e26c387b77c0f3df2e011186737230534 |
|
MD5 | a5b5478d99f7d00a2ed4bac1a9249af7 |
|
BLAKE2-256 | ab9e6aad837b59700e4297b095711a4a0066903932168e70fe5e67eac6b844f0 |
Close
Hashes for zopfli-0.1.7-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5fd88046bcdd2b01e27e0525ac699d297e75a5fbdc89fd9d4ac7a3b91e5eb054 |
|
MD5 | 92728ff08e3e9bbefd2b636459de587f |
|
BLAKE2-256 | 34900a2d7459d1b17e54e44d0a40a9e3b13faec90e93415490e5443a63c56e88 |
Close
Hashes for zopfli-0.1.7-cp36-cp36m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f39b961186b18faa1155977706bfbfcf1644c47e5b7648de8e0645c53062ed90 |
|
MD5 | 5a94491ccb7eec09170ad557bcced858 |
|
BLAKE2-256 | 7d43d6bd1c290740508e9a334ded9273b58cdb1b7f88fb18b342d706cc5e14ea |
Close
Hashes for zopfli-0.1.7-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0504cd271f6e32b4b512615bd4ae1fabc787c72a90495376004f4023dcac0f3a |
|
MD5 | 1407841a68fbbe42c6b65aeaad3d3d1a |
|
BLAKE2-256 | 14eb308e4477715e8ec684e3038cee917eeabd7eb796352c01fd335f858087c2 |
Close
Hashes for zopfli-0.1.7-cp37-cp37m-macosx_10_6_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4837b1a8a1e7d04879d5cdd7742d9312d52466f10f1571d9beec6ecdcc329b97 |
|
MD5 | d282ed6e14ec1e26402871f44aeabbe0 |
|
BLAKE2-256 | ea219f22f9896f715c5c4293ef9bb4ed75896c60674b71d1a492a3fef11d6fdd |
Close
Hashes for zopfli-0.1.7-cp37-cp37m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8fb3e8fd5ef947c28721c7008be44f5db8777deec77a72601f895bf6a70aa172 |
|
MD5 | 18e19f47da4e767e3a02a27015ce7627 |
|
BLAKE2-256 | 9bb45b5ddcd3507e7268f1ef39c3a3815383cb6322dfaf45e6c688c1ac6de0ef |
Close
Hashes for zopfli-0.1.7-cp37-cp37m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 697a809fd66d5de8098e6e6bebfcc5a8c8ab5278272f70e9b78bc72334ec12ec |
|
MD5 | c5ca2cbc6977071d6b22cbdccbdef8e1 |
|
BLAKE2-256 | 4297c0e9dd7a29b5e2818b0cc98d785d10d94627bc0643606e35f22d4023c507 |
Close
Hashes for zopfli-0.1.7-cp37-cp37m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1dfdfbbfe9a980e3ae2d9150bb8429a026b8254c2c63c295046192d14dd971ae |
|
MD5 | 4d0abe4b43cbc592fc03e3fd9f72867a |
|
BLAKE2-256 | 8803e6b546e0d8979d8257322a5c7b7c611dad2f967548744f0fb05f1a673ad4 |
Close
Hashes for zopfli-0.1.7-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 05ad760a6d2b522d5e9518bbf9cc60896da26838181f02e52f7935c2ace12385 |
|
MD5 | f890349d0133cf270050e5704914517d |
|
BLAKE2-256 | 4e7b9af337c05dfc3ef87952bd5786e2b0e31559e4b0e2ff4c1f4830f53ab023 |
Close
Hashes for zopfli-0.1.7-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 03516ab62b858473c5e235d73cc01219a5ea5df0ca1da71933fd3cc0dbfff6c3 |
|
MD5 | 959a349a08b80dba620831dad25ddf94 |
|
BLAKE2-256 | 49c58bb1ba5dfc65c225297517e66d615197fbd654be868b6f5610842cc1e4d7 |
Close
Hashes for zopfli-0.1.7-cp38-cp38-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 52e705a763e41851773b8334fc8316cb483135802f12bbfdd69c0774b658b6e7 |
|
MD5 | 8140d8b9411e72e16cedc5c97a36df68 |
|
BLAKE2-256 | a19e0851a5de565e5a39a005203e97b91e52c7a77674b3b4992ace5d7762905c |
Close
Hashes for zopfli-0.1.7-cp38-cp38-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6801f879e0c717e9cfb6b405f2b8cce1d20d3d034b9e2a6900e92994161f81f8 |
|
MD5 | 2245b0a9a23a0c117355ea9359c6e90f |
|
BLAKE2-256 | e71013e65a9326d0502b5fe412327d3017e02acabcac9a98653a8f3deda70d72 |
Close
Hashes for zopfli-0.1.7-cp38-cp38-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0df32baa7b1b8c5ea547c455854d5ae8a8e45c10cad25ff5451f62e5cce48b60 |
|
MD5 | 4a61ed41b22dd7e698c57bfeb21b460c |
|
BLAKE2-256 | 482f7a0d5b22fc91fdd59b6c54bd00a15acb5258dda770953b43c2e358730a06 |
Close
Hashes for zopfli-0.1.7-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c2d9dd6e4e6f9b35cceb7dde17b9ae153c194e16a105c6ba93c272f2a0fef3ec |
|
MD5 | 8e7be30853a36e7e4ca21df7d7270b6e |
|
BLAKE2-256 | f67453488050f284c3db85943e0a0a729bbcabd2ffac5438c424a4f6493002aa |