skillfed

gzip-stream

Compress stream by GZIP on the fly.

gzip-stream v1.2.0 790.4K downloads/30d#5,051 on PyPI32
Permissive license DORMANT released

What it is and what it does

gzip-stream is a minimal library that lets you compress or decompress data on-the-fly by wrapping existing streams. Instead of reading an entire file into memory, it processes data in chunks—useful when uploading large files over the network or reading compressed data from remote sources. The main class, GZIPCompressedStream, inherits from io.RawIOBase so it acts like a standard Python stream; you pass it another stream and a compression level, then use it anywhere a file-like object is expected. The library also provides AsyncGZIPDecompressedStream for async contexts, letting you decompress while reading from sources like S3 without blocking.

The package has no external runtime dependencies and is written for Python 3.5 and later. It is classified as Production/Stable but has been dormant since late 2021, with the last commit in October 2024. The codebase is small and focused, making it suitable for simple streaming compression tasks, but the lack of recent maintenance means you should verify compatibility with your Python version and use case before relying on it for critical workflows.

Use it for:

  • Upload large files to cloud storage (S3, etc.) with on-the-fly GZIP compression to reduce bandwidth.
  • Stream GZIP-compressed data from remote sources and decompress asynchronously without buffering the entire file.
  • Wrap file uploads in a compression layer to reduce payload size in bandwidth-constrained environments.
  • Process compressed log files or archives by decompressing chunks as they are read from disk or network.
  • Integrate compression into custom I/O pipelines where standard file compression is too memory-intensive.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Wraps streams to compress data on-the-fly using GZIP, and decompresses GZIP or zlib streams asynchronously without loading entire files into memory.

Yes, if you need lightweight on-the-fly GZIP compression for streaming I/O and can accept dormant maintenance. The library has no dependencies, a permissive license, and solves a specific problem well. However, verify Python version compatibility with your target environment and test async decompression thoroughly before using it in production, given the 1710-day gap since the last release.

Install

gzip-stream on PyPI

pip

pip install gzip-stream

uv

uv add gzip-stream

poetry

poetry add gzip-stream

Installing gzip-stream

Before you install

High install friction: the package is dormant (last release 2021-12-08, 1710 days ago) with no runtime dependencies. The repository is not archived but shows minimal recent activity, which may signal maintenance risk despite stable classifier status.

License in practice

Public Domain (CC0 1.0 Universal) means you can use, modify, and distribute this code with no restrictions or attribution requirements—one of the most permissive license treatments available.

Quickstart

from gzip_stream import GZIPCompressedStream

with open('file.txt') as f:
    compressed = GZIPCompressedStream(f, compression_level=7)
    # Pass compressed stream to upload or other I/O operation

Requires Python ~=3.5 (3.5 or later in the 3.x series). The package inherits from io.RawIOBase and is designed for streaming I/O contexts.

Verify before relying

  • Whether async decompression (AsyncGZIPDecompressedStream) is production-ready or experimental given the long dormancy.
  • Performance characteristics and memory overhead compared to alternatives for very large files.
  • Compatibility with Python versions beyond 3.9 (classifiers list 3.5–3.9; current support unclear).

Package facts

License not declared (permissive)
Python support supports the current Python release (~=3.5)
Install friction high — source build required
Runtime dependencies none
Maintenance dormant — 1,710 days since the last release
Last repo commit
First released
Downloads 790,386/month — #5,051 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: gzip-stream-1.2.0.tar.gz

Keywords: gzip, compression

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: CC0 1.0 Universal (CC0 1.0) Public Domain DedicationOperating System :: MacOS :: MacOS XOperating System :: POSIXProgramming Language :: PythonProgramming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Software Development :: Libraries

Tags

gzip compression streamon-the-fly compressionstreaming gzipasync decompressionmemory-efficient compressionchunked gzip encodingstream wrapper compression
streaming-iocompression

More Libraries packages