Skip to main content

Uncompress DEFLATE streams in pure Python

Project description

stream-inflate CircleCI Test Coverage

Uncompress DEFLATE streams in pure Python.

Installation

pip install stream-inflate

Usage

from stream_inflate import stream_inflate
import httpx

def compressed_chunks():
    # Iterable that yields the bytes of a DEFLATE-compressed stream
    with httpx.stream('GET', 'https://www.example.com/my.txt') as r:
        yield from r.iter_raw(chunk_size=65536)

for uncompressed_chunk in stream_inflate(compressed_chunks()):
    print(uncompressed_chunk)

Project details


Download files

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

Source Distribution

stream-inflate-0.0.3.tar.gz (4.4 kB view hashes)

Uploaded Source

Built Distribution

stream_inflate-0.0.3-py3-none-any.whl (4.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page