zif.gzipper
Don’t use this. It does not really play nice in a WSGI stack. To gzip output, put your WSGI stack behind a proxy that gzips, e.g., nginx or apache.
If you just want to amuse yourself, feel free to play with this. I could remove the package completely, but what the heck…
See ‘src/zif/gzipper/README.txt’ for more information.
Releases
0.2 (2007/04/13)
Small improvements to documentation files.
0.1 (2007/04/12)
Initial release.
Detailed Documentation
zif.gzipper
This is a wsgi middleware application intended for use with paste.deploy, zope.paste, and zope3.
It serves as a wsgi filter to gzip output from a zope3 application.
Dependencies
for zope3, zif.gzipper requires Sidnei da Silva’s zope.paste
zope.paste is available at http://svn.zope.org/zope.paste/trunk/
cd [path.to.zope3.src.directory]/zope svn co http://svn.zope.org/zope.paste/trunk/ paste
zope.paste is also available at the python cheese shop.
Instructions for zope.paste are at http://awkly.org/2006/01/25/zopepaste-wsgi-applications-in-zope-3-using-pastedeploy/
zope.paste requires paste.deploy. paste.deploy may be obtained from the cheese shop. Presuming you have setuptools installed,
sudo easy_install.py PasteDeploy
This (zif.gzipper) package can be unzipped and installed anywhere on the Python path.
Setup
Follow Sidnei’s instructions for setting up zope.paste. It involves putting the usual zope.paste-configure.zcml file in [zope3 instance]/etc/site-packages. There is also a parameter to change in [zope3 instance]/etc/zope.conf. The new twist is a paste.ini file in [zope3 instance]/etc
My paste.ini file looks like:
pipeline = gzipper jsmin main [app:main] paste.app_factory = zope.paste.application:zope_publisher_app_factory [filter:gzipper] paste.filter_factory=zif.gzipper.gzipper:filter_factory compress_level=6 exclude=localimages nocompress=jp gz zip png tempfile=1048576 [filter:jsmin] paste.filter_factory=zif.jsmin.jsmin:filter_factory compress_level=safe
Configuration
gzipper should be the first filter in the pipeline. Other filters will have a hard time reading compressed data output from this filter.
The paste.ini file above shows examples of the configuration options for gzipper.
compress_level is the level of compression for the gzip function. 6 is the default. 9 is max. 3 is often good enough. Higher numbers use more processor, but compress smaller.
exclude is a sequence of strings that appear in the a filename or path you wish to exclude from gzipping. If any of these strings appears in the path or filename, gzipper will not gzip the file.
nocompress is a sequence of strings that appear in content-types you wish to exclude from gzipping. If the string appears anywhere in the content-type, items with that content-type will not be gzipped. “jp” will exclude “image/jpg” and “image/jpeg”. “application” will exclude any content-type with the word “application” in it.
tempfile is the file size above which gzipper will send the gzipped data to a tempfile on disk. This may help memory usage. It may not. tempfile=0 means do not use temporary file. Default is 1 megabyte (1048576).
Download
Metadata
Release files for zif.gzipper 0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| zif.gzipper-0.2.tar.gz | 7.3 kB | Without provenance | Details for zif.gzipper-0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| zif.gzipper-0.2-py2.4.egg | Legacy Egg format | - | - | Details for zif.gzipper-0.2-py2.4.egg |
Total release size: 23.3 kB
Release files / zif.gzipper-0.2.tar.gz
| Download URL | zif.gzipper-0.2.tar.gz |
|---|---|
| Size | 7.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
28d1cbb2fa45edfe2793230daa47f9f2d8fcb8b277d2ebd1f938087d268ca394
|
|
BLAKE2b-256 checksum How to use checksums |
21d87390b0d95fea44ec98def9f1965813d8839a1340eab3e9cee6550fbf60ad
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / zif.gzipper-0.2-py2.4.egg
| Download URL | zif.gzipper-0.2-py2.4.egg |
|---|---|
| Size | 15.9 kB |
| Tags | Egg |
|
SHA-256 checksum How to use checksums |
2758336f9c31b14ad8c5800071d45c86de014b5732773f3b0faab2031e1a511b
|
|
BLAKE2b-256 checksum How to use checksums |
e617d0cffa985fce0c6041cf56c36e3976ac9c3de6ba2af4bab51322d7b83040
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for zif.gzipper 0.2
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.