Skip to main content

A python module for gzipping data using generators

Project description

https://travis-ci.org/leetreveil/gengzip.png

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

Installation

Install via pip:

$ pip install gengzip

Usage

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):
        f.write(compressed)

Licence

MIT

Project details


Release history Release notifications

This version
History Node

0.2.3

History Node

0.2.2

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
gengzip-0.2.3.tar.gz (1.8 kB) Copy SHA256 hash SHA256 Source None Mar 3, 2014

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page