Skip to main content

Travis Build Status Appveyor Build Status

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.

Release files for zopfli 0.1.4

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

Source distribution (sdist)

Source distribution for zopfli 0.1.4
File Size Uploaded
zopfli-0.1.4.zip 75.8 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for zopfli 0.1.4
File
zopfli-0.1.4-cp36-cp36m-win_amd64.whl CPython 3.6 CPython 3.6 pymalloc Windows x86-64 Details
zopfli-0.1.4-cp36-cp36m-win32.whl CPython 3.6 CPython 3.6 pymalloc Windows x86-32 Details
zopfli-0.1.4-cp36-cp36m-manylinux1_x86_64.whl CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.5+ x86-64 Details
zopfli-0.1.4-cp36-cp36m-manylinux1_i686.whl CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.5+ x86-32 Details
zopfli-0.1.4-cp36-cp36m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl CPython 3.6 CPython 3.6 pymalloc macOS 10.6+ Intel (x86-64, i386), macOS 10.10+ Intel (x86-64, i386), macOS 10.9+ Intel (x86-64, i386), macOS 10.9+ x86-64, macOS 10.10+ x86-64 Details
zopfli-0.1.4-cp35-cp35m-win_amd64.whl CPython 3.5 CPython 3.5 pymalloc Windows x86-64 Details
zopfli-0.1.4-cp35-cp35m-win32.whl CPython 3.5 CPython 3.5 pymalloc Windows x86-32 Details
zopfli-0.1.4-cp35-cp35m-manylinux1_x86_64.whl CPython 3.5 CPython 3.5 pymalloc Linux glibc 2.5+ x86-64 Details
zopfli-0.1.4-cp35-cp35m-manylinux1_i686.whl CPython 3.5 CPython 3.5 pymalloc Linux glibc 2.5+ x86-32 Details
zopfli-0.1.4-cp35-cp35m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl CPython 3.5 CPython 3.5 pymalloc macOS 10.10+ Intel (x86-64, i386), macOS 10.9+ Intel (x86-64, i386), macOS 10.9+ x86-64, macOS 10.6+ Intel (x86-64, i386), macOS 10.10+ x86-64 Details
zopfli-0.1.4-cp27-cp27mu-manylinux1_x86_64.whl CPython 2.7 CPython 2.7 pymalloc wide-unicode Linux glibc 2.5+ x86-64 Details
zopfli-0.1.4-cp27-cp27mu-manylinux1_i686.whl CPython 2.7 CPython 2.7 pymalloc wide-unicode Linux glibc 2.5+ x86-32 Details
zopfli-0.1.4-cp27-cp27m-win_amd64.whl CPython 2.7 CPython 2.7 pymalloc Windows x86-64 Details
zopfli-0.1.4-cp27-cp27m-win32.whl CPython 2.7 CPython 2.7 pymalloc Windows x86-32 Details
zopfli-0.1.4-cp27-cp27m-manylinux1_x86_64.whl CPython 2.7 CPython 2.7 pymalloc Linux glibc 2.5+ x86-64 Details
zopfli-0.1.4-cp27-cp27m-manylinux1_i686.whl CPython 2.7 CPython 2.7 pymalloc Linux glibc 2.5+ x86-32 Details
zopfli-0.1.4-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl CPython 2.7 CPython 2.7 pymalloc macOS 10.10+ x86-64, macOS 10.6+ Intel (x86-64, i386), macOS 10.10+ Intel (x86-64, i386), macOS 10.9+ Intel (x86-64, i386), macOS 10.9+ x86-64 Details

Total release size: 788.1 kB

Release files / zopfli-0.1.4.zip

Download URL zopfli-0.1.4.zip
Size 75.8 kB
Tags Source
SHA-256 checksum
How to use checksums
95cdbadb8732ef0881aa310079e324c22a800d59ddd44456a1cddb1d42744b62
BLAKE2b-256 checksum
How to use checksums
dedc3543f7b6ef2a45a84dce7661967bdf314e1d5cc816ff5bde597b24ab9a7c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / zopfli-0.1.4-cp36-cp36m-win_amd64.whl

Download URL zopfli-0.1.4-cp36-cp36m-win_amd64.whl
Size 39.1 kB
Tags CPython 3.6 CPython 3.6 pymalloc Windows x86-64
SHA-256 checksum
How to use checksums
810127a7307101a5137eb6fcecee11b82c23853b18625c533d1558f737aab164
BLAKE2b-256 checksum
How to use checksums
4f8d4992ee8aec76ef645d89e453fbbb26f53340fd73dfef281bb9b67481adf9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / zopfli-0.1.4-cp36-cp36m-win32.whl

Download URL zopfli-0.1.4-cp36-cp36m-win32.whl
Size 33.2 kB
Tags CPython 3.6 CPython 3.6 pymalloc Windows x86-32
SHA-256 checksum
How to use checksums
f5d7840833608f1be3a5f928dbcc0a5ff45ebd8040ea6177864f61a72b773423
BLAKE2b-256 checksum
How to use checksums
f75f0121e43110755e3f9da9b7909c2d64fc2fcf5af2d64e5361feab445325f7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / zopfli-0.1.4-cp36-cp36m-manylinux1_x86_64.whl

Download URL zopfli-0.1.4-cp36-cp36m-manylinux1_x86_64.whl
Size 41.9 kB
Tags CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
22e34ba3f3dfd35c5c086548ffb94548a18688ba8c0c4b7003e9efe0e666d8fc
BLAKE2b-256 checksum
How to use checksums
01ba13b522508b00ba518d920eedf1ac94869af1180d10bac98a315743b41d05
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / zopfli-0.1.4-cp36-cp36m-manylinux1_i686.whl

Download URL zopfli-0.1.4-cp36-cp36m-manylinux1_i686.whl
Size 36.0 kB
Tags CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.5+ x86-32
SHA-256 checksum
How to use checksums
b263867044a817f4b9f0aa41a445b7651426cc31d52dd417f539b73404bccb92
BLAKE2b-256 checksum
How to use checksums
f5857ac0eddbbdb243e03a3487b3306e491c365cefc1ebd2cb23f529d0ae174c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / zopfli-0.1.4-cp36-cp36m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl

Download URL zopfli-0.1.4-cp36-cp36m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
Size 64.6 kB
Tags CPython 3.6 CPython 3.6 pymalloc macOS 10.10+ Intel (x86-64, i386) macOS 10.10+ x86-64 macOS 10.6+ Intel (x86-64, i386) macOS 10.9+ Intel (x86-64, i386) macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
df7f84a01c0d8c8936e764e63fd0478aa526dc405ee2ad437e633b28cf824141
BLAKE2b-256 checksum
How to use checksums
f27bdc989509cf57c9c32cee2879a86376335bef413cddc17afe925911ed45f2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / zopfli-0.1.4-cp35-cp35m-win_amd64.whl

Download URL zopfli-0.1.4-cp35-cp35m-win_amd64.whl
Size 39.1 kB
Tags CPython 3.5 CPython 3.5 pymalloc Windows x86-64
SHA-256 checksum
How to use checksums
b6e09ea567d1a54c1445cb0913ea3dc31a7d0918569ce2ca4655cb4898fdcf28
BLAKE2b-256 checksum
How to use checksums
3af674ccff227c1a573c86f244a16ac3696b2b16e6c66c2c1ec0c7ab94834d82
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / zopfli-0.1.4-cp35-cp35m-win32.whl

Download URL zopfli-0.1.4-cp35-cp35m-win32.whl
Size 33.2 kB
Tags CPython 3.5 CPython 3.5 pymalloc Windows x86-32
SHA-256 checksum
How to use checksums
b86d1ea19e8f799d943b0fe615a8932703251295d7f73dc3ada18ccfffefbaa5
BLAKE2b-256 checksum
How to use checksums
a80f8bd9f703911aff45f14f5e4840178d11275787df982e98f4960bb133d5bf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / zopfli-0.1.4-cp35-cp35m-manylinux1_x86_64.whl

Download URL zopfli-0.1.4-cp35-cp35m-manylinux1_x86_64.whl
Size 41.9 kB
Tags CPython 3.5 CPython 3.5 pymalloc Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
d4b5c2faf767f07e4ee7345c0d984eb6773d321ad5b5ae0efa19c2b15a26bdd8
BLAKE2b-256 checksum
How to use checksums
a18f4562a7570503f9a5d15e5205c4be84ba7caeee8155075b25014dd8940a9a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / zopfli-0.1.4-cp35-cp35m-manylinux1_i686.whl

Download URL zopfli-0.1.4-cp35-cp35m-manylinux1_i686.whl
Size 36.0 kB
Tags CPython 3.5 CPython 3.5 pymalloc Linux glibc 2.5+ x86-32
SHA-256 checksum
How to use checksums
ea204478f5dd4b7c03ec8a25ac5512f5cd85b15e001724289d1676a52c4c1633
BLAKE2b-256 checksum
How to use checksums
f4bcbe5c0eb7f207bf4827b424e54f1800e6c85f3fc33309e0b01295469ff368
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / zopfli-0.1.4-cp35-cp35m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl

Download URL zopfli-0.1.4-cp35-cp35m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
Size 64.6 kB
Tags CPython 3.5 CPython 3.5 pymalloc macOS 10.10+ Intel (x86-64, i386) macOS 10.10+ x86-64 macOS 10.6+ Intel (x86-64, i386) macOS 10.9+ Intel (x86-64, i386) macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
78cd66b273654cecd1d4a1a4d7a4468424db46dcc11c840062bacc545e3cc239
BLAKE2b-256 checksum
How to use checksums
9b022534d61338bc5a8044267d7b667d497538936b3143809a9a7324be0671b8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / zopfli-0.1.4-cp27-cp27mu-manylinux1_x86_64.whl

Download URL zopfli-0.1.4-cp27-cp27mu-manylinux1_x86_64.whl
Size 41.8 kB
Tags CPython 2.7 CPython 2.7 pymalloc wide-unicode Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
06e08efaaf750a69b1a59c91b003d44812f3b3bbe040f12cf4295861ce5d51a8
BLAKE2b-256 checksum
How to use checksums
0798dbfed547f1fed2d50bc082cadfbd7fdbbde533b6616881152f6f4afc3c24
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / zopfli-0.1.4-cp27-cp27mu-manylinux1_i686.whl

Download URL zopfli-0.1.4-cp27-cp27mu-manylinux1_i686.whl
Size 35.9 kB
Tags CPython 2.7 CPython 2.7 pymalloc wide-unicode Linux glibc 2.5+ x86-32
SHA-256 checksum
How to use checksums
2351d6ca723841520f75ccfedffe79b8c72e28552d50f2530822125c5979bd87
BLAKE2b-256 checksum
How to use checksums
70e82b334816ee1c3d244591e242d2e8e9ae9c8388d3c6861ab4b3fd7f088b6b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / zopfli-0.1.4-cp27-cp27m-win_amd64.whl

Download URL zopfli-0.1.4-cp27-cp27m-win_amd64.whl
Size 33.9 kB
Tags CPython 2.7 CPython 2.7 pymalloc Windows x86-64
SHA-256 checksum
How to use checksums
c499fe9516e6c0d589e58f2ac2cf2862f26163e06340e89a06ffb7b4d611bbb3
BLAKE2b-256 checksum
How to use checksums
87eb9438efac1524fb55cc47e6a70ee3f1b723a6a014b9ada96e2240b8a85e4c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / zopfli-0.1.4-cp27-cp27m-win32.whl

Download URL zopfli-0.1.4-cp27-cp27m-win32.whl
Size 28.8 kB
Tags CPython 2.7 CPython 2.7 pymalloc Windows x86-32
SHA-256 checksum
How to use checksums
242ab7671b64ce98fba82d481586e7563119a8bc407be6b9fd3e2bca9bb66954
BLAKE2b-256 checksum
How to use checksums
78435f088a3c4f2037b6ee7a29b3553b12aa5a78d2bdab92053f6280fd186142
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / zopfli-0.1.4-cp27-cp27m-manylinux1_x86_64.whl

Download URL zopfli-0.1.4-cp27-cp27m-manylinux1_x86_64.whl
Size 41.8 kB
Tags CPython 2.7 CPython 2.7 pymalloc Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
7bd94b955de77a662f50c75129516344f9308ad03124012318b73a0bc698bd25
BLAKE2b-256 checksum
How to use checksums
46bf921ee4a932fbcab7549eee40d00147d1ee622459a866b7d35379e6853179
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / zopfli-0.1.4-cp27-cp27m-manylinux1_i686.whl

Download URL zopfli-0.1.4-cp27-cp27m-manylinux1_i686.whl
Size 35.9 kB
Tags CPython 2.7 CPython 2.7 pymalloc Linux glibc 2.5+ x86-32
SHA-256 checksum
How to use checksums
4c6df0390201455f8dd18e8849cf8d59080a4a3247794d8b5860468547afe314
BLAKE2b-256 checksum
How to use checksums
b4d95ff6465f3b53847fab7376d41bd04aa192eb5aa81b3729089a7d0ad18ac3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / zopfli-0.1.4-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl

Download URL zopfli-0.1.4-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
Size 64.5 kB
Tags CPython 2.7 CPython 2.7 pymalloc macOS 10.10+ Intel (x86-64, i386) macOS 10.10+ x86-64 macOS 10.6+ Intel (x86-64, i386) macOS 10.9+ Intel (x86-64, i386) macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
819cadefe6d59df3015ea926c7c8ffc28dcad8685ba529dfa7d702d6a2cb6560
BLAKE2b-256 checksum
How to use checksums
11edce35310a9bfd545322da7ae59a8413dfaff27105844998050b8d8538cbea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
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