Skip to main content

A python module for gzipping data using generators

Project description

Python generators are cool. The compress() function returns a python generator with the gzipped data.


Install via pip:

$ pip install gengzip


input = ['123', '45']
# compress() returns a python generator object
# compresslevel defaults to 6
for compressed in gengzip.compress(input, compresslevel=6):
    print compressed

gzip data and write to file:

input = ['123', '45']
with open('output.gz', 'w') as f:
    for compressed in gengzip.compress(input):



Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for gengzip, version 0.2.3
Filename, size File type Python version Upload date Hashes
Filename, size gengzip-0.2.3.tar.gz (1.8 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page