Skip to main content
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

Download files

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

Source Distribution

gengzip-0.2.3.tar.gz (1.8 kB view details)

Uploaded Source

File details

Details for the file gengzip-0.2.3.tar.gz.

File metadata

  • Download URL: gengzip-0.2.3.tar.gz
  • Upload date:
  • Size: 1.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for gengzip-0.2.3.tar.gz
Algorithm Hash digest
SHA256 2c08f14381524d06f00d07ae9823cbecfb28d0eb277b8cf4e3176d4ba5dc574d
MD5 c0a2eaaa0010fb85eb41aa81b941bba7
BLAKE2b-256 c400c1425b67dc7ce5f1d297a63648a9553af33eb0ae761c553323d7470b1987

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.2.3 This release

1 file

0.2.2

1 file

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