zlib-state
Low-level interface to the zlib library that enables capturing the decoding state
Decision gist · record as of 2026-08-14
Yes, if you need to checkpoint gzip decompression progress or require faster iteration over compressed streams. The permissive MIT license and active maintenance make it low-risk. Not necessary if you only need standard gzip reading or cannot work within the block-boundary constraint.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.9 or later; state capture only works at deflate block boundaries, not arbitrary file positions.
- Medium install friction due to compiled wheels; prebuilt binaries available for Python 3.9–3.14 on Linux and Windows.
- Active maintenance with recent release.
License · maintenance · safety
permissive license (permissive) — MIT license (permissive); no restrictions on commercial or private use.
last release 2026-04-14 (122 days) · last repo commit 2026-04-14 · 2 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 221,482 downloads/mo, #9,276 on PyPI
Alternatives
Verify before relying
import zlib_state
# Capture state at block boundary
decomp = zlib_state.Decompressor(32 + 15)
with open('file.gz', 'rb') as f:
while not decomp.eof():
if decomp.needs_input() > 0:
decomp.feed_input(f.read())
decomp.read()
if decomp.block_boundary():
state = decomp.get_state()
pos = decomp.total_in()
break- Whether performance advantage over standard gzip holds across different file sizes and compression levels.
- Compatibility with all gzip variants and edge cases (e.g., concatenated gzip streams).
- Memory overhead of storing state objects for large files.
What it is and what it does
zlib-state wraps the zlib library to expose decompression state at deflate block boundaries, allowing you to pause and resume gzip decompression from a known position. It provides two main interfaces: Decompressor for fine-grained control over the decompression stream, and GzipStateFile for a file-like reader that tracks state after each block. The package trades some simplicity for the ability to checkpoint progress mid-file, which is useful when processing large compressed files where you need to pause, save position, and resume later.
The library is a thin binding over zlib's internal state machine and requires careful use—decompression can only resume at block boundaries, not arbitrary byte positions. It has no runtime dependencies and is distributed as precompiled wheels for modern Python versions on Linux and Windows, making installation straightforward on supported platforms.
Use it for
- Pause and resume decompression of large gzip files across application restarts or crashes.
- Implement checkpointing in data pipelines that process compressed logs or archives incrementally.
- Build fault-tolerant streaming decompressors that can recover from interruption at known block boundaries.
- Optimize gzip iteration performance when standard library decompression is a bottleneck.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need to checkpoint gzip decompression progress or require faster iteration over compressed streams.
The permissive MIT license and active maintenance make it low-risk. Not necessary if you only need standard gzip reading or cannot work within the block-boundary constraint.
Install
zlib-state on PyPI
Before you install
Medium install friction due to compiled wheels; prebuilt binaries available for Python 3.9–3.14 on Linux and Windows. Active maintenance with recent release.
Requires Python 3.9 or later; state capture only works at deflate block boundaries, not arbitrary file positions.
License in practice
MIT license (permissive); no restrictions on commercial or private use.
Quickstart
import zlib_state
# Capture state at block boundary
decomp = zlib_state.Decompressor(32 + 15)
with open('file.gz', 'rb') as f:
while not decomp.eof():
if decomp.needs_input() > 0:
decomp.feed_input(f.read())
decomp.read()
if decomp.block_boundary():
state = decomp.get_state()
pos = decomp.total_in()
break
Verify before relying
- Whether performance advantage over standard gzip holds across different file sizes and compression levels.
- Compatibility with all gzip variants and edge cases (e.g., concatenated gzip streams).
- Memory overhead of storing state objects for large files.
Package facts
| License | permissive license permissive |
| Python support | Supports the current Python release >=3.9 |
| Install friction | Medium. Platform-specific wheel |
| Runtime dependencies | None |
| Maintenance | Actively maintained 122 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 221,482 / month, #9,276 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | License :: OSI Approved :: MIT License |
Evidence: zlib_state-0.1.12-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; zlib_state-0.1.12-cp310-cp310-win_amd64.whl; zlib_state-0.1.12-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; zlib_state-0.1.12-cp311-cp311-win_amd64.whl; zlib_state-0.1.12-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; zlib_state-0.1.12-cp312-cp312-win_amd64.whl; zlib_state-0.1.12-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; zlib_state-0.1.12-cp313-cp313-win_amd64.whl; zlib_state-0.1.12-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; zlib_state-0.1.12-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; zlib_state-0.1.12-cp314-cp314-win_amd64.whl; zlib_state-0.1.12-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; zlib_state-0.1.12-cp39-cp39-win_amd64.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “gzip decompression state capture”
- zlib-stateProvides low-level access to zlib decompression with the ability to…
- deflateThin Python wrapper around libdeflate for fast gzip, DEFLATE, and…
- mgzipmgzip provides a drop-in replacement for Python's standard gzip…
Give your agent the search over MCP, or paste the wish link into any chat.
More Software Development packages
Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.
Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.
Install it if you are building CLIs in Python.
Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.
See also zlib-ng · deflate · zopfli · zipfile-deflate64 · python-neo-lzf · pgzip · gzip-stream · py7zr · pyppmd · indexed-gzip