compress-pickle
Standard pickle, wrapped with standard compression libraries
What it is and what it does
compress_pickle is a thin wrapper around Python's standard pickle module that automatically routes serialized data through one of several compression libraries before writing to disk or file-like objects. It exposes the same four core functions as pickle—dump, load, dumps, loads—but adds a compression parameter to select gzip, bz2, lzma, zipfile, or lz4 (optional). The package requires Python >= 3.6 and has no runtime dependencies for the standard compression protocols; lz4 support is available as an optional install.
The package is straightforward in scope: it solves the common problem of reducing pickle file size without requiring custom serialization logic. It works with any picklable Python object and integrates directly into existing pickle workflows by replacing the import and function calls. However, the project has been abandoned since early 2022, meaning no bug fixes, security patches, or compatibility updates will be released.
Use it for:
- Reduce storage footprint when saving large trained machine learning models or data structures to disk.
- Compress Python object snapshots in data pipelines or caching layers where space efficiency matters.
- Archive pickled Python objects in long-term storage or backups with minimal code changes.
- Serialize and compress intermediate results in scientific computing workflows without custom serialization.
- Store pickled state in resource-constrained environments where disk space is limited.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Wraps Python's standard pickle serialization with transparent compression using gzip, bz2, lzma, zipfile, or optionally lz4, reducing storage size for pickled objects.
Yes, if you need straightforward pickle compression and are comfortable with an abandoned package. The code is simple, has no runtime dependencies for standard compression, and zero known vulnerabilities. Install only if your use case is stable and you do not expect future Python or compression library changes to break it. For new projects requiring ongoing maintenance, consider your risk tolerance.
Install
compress-pickle on PyPI
pip
pip install compress-pickleuv
uv add compress-picklepoetry
poetry add compress-pickleInstalling compress-pickle
Before you install
Low friction install with no runtime dependencies. However, the package is abandoned—last release was 2021-09-21 and last commit 2022-02-16—so expect no maintenance or security updates going forward.
License in practice
MIT license permits commercial and private use with minimal restrictions, making it safe to adopt from a licensing standpoint.
Quickstart
pip install compress_pickle
import compress_pickle
compress_pickle.dump(obj, path, compression='gzip')
obj = compress_pickle.load(path, compression='gzip')
Requires Python >= 3.6. Optional lz4 support requires separate install: pip install compress_pickle[lz4]
Verify before relying
- Whether lz4 optional extra is actively maintained or if its dependency has known issues.
- Compatibility with pickle protocol versions beyond those tested in 2021.
- Performance characteristics compared to alternatives with compression.
Package facts
| License | not declared (permissive) |
| Python support | supports the current Python release (>=3.6) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | abandoned — 1,788 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 378,811/month — #7,116 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: compress_pickle-2.1.0-py3-none-any.whl
Tags
More Utilities packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
charset-normalizerDetects and normalizes text encoding from…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
PygmentsPygments is a syntax highlighter that colorizes…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
xopenxopen provides a drop-in replacement for…
permissive · top 5,000 on PyPI
bz2fileProvides a drop-in replacement for Python's…
permissive · top 15,000 on PyPI
hickleHickle serializes Python objects to HDF5 files…
unclear · top 15,000 on PyPI
lz4Python bindings for the LZ4 compression…
permissive · top 1,000 on PyPI
cloudpickleCloudpickle extends Python's standard pickle…
permissive · top 1,000 on PyPI
deflateThin Python wrapper around libdeflate for fast…
permissive · top 15,000 on PyPI
zipfile-zstdExtends Python's standard zipfile module to…
permissive · top 5,000 on PyPI
pybcjpybcj provides Python bindings to a BCJ…
copyleft · top 5,000 on PyPI
zodbpickleProvides a ZODB-compatible pickle interface…
unclear · top 15,000 on PyPI
ficklingFickling is a decompiler, static analyzer, and…
copyleft · top 5,000 on PyPI