lilcom
Lossy-compression utility for sequence data in NumPy
Decision gist · record as of 2026-08-14
Yes, if you need lossy compression of NumPy arrays in machine learning contexts and can accept the accuracy trade-offs. The package is stable, has no known vulnerabilities, and carries a permissive MIT license. Install friction is moderate due to C++ compilation, but prebuilt wheels are available for modern Python versions. The aging maintenance status is not a blocker for stable use, but expect no active feature development.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires a C++ compiler (e.g., g++ or clang) to build from source; prebuilt wheels available for Python 3.10–3.14 on macOS, Linux, and Windows.
- Medium install friction due to C++ compilation requirement.
- Package is aging (211 days since last release) but repository remains active with recent commits; maintenance status suggests limited ongoing development.
License · maintenance · safety
MIT (permissive) — MIT license permits free use, modification, and distribution with minimal restrictions, making it suitable for both open-source and commercial projects.
last release 2026-01-15 (211 days) · last repo commit 2026-01-20 · 38 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 706,753 downloads/mo, #5,270 on PyPI
Alternatives
Verify before relying
import numpy as np
import lilcom
a = np.random.randn(300, 500)
a_compressed = lilcom.compress(a)
a_decompressed = lilcom.decompress(a_compressed)- Typical compression ratio or file size reduction achieved in practice across different array types and sizes.
- Performance characteristics (compression/decompression speed) relative to alternative compression methods.
- Whether the tick_power parameter and resulting accuracy trade-offs are well-documented for different use cases.
What it is and what it does
lilcom is a lossy compression utility that encodes NumPy floating-point arrays into compact byte strings, trading accuracy for storage efficiency. It uses a regression-based algorithm that models each element relative to its neighbors, then quantizes and compresses the residuals. The core implementation is in C++, and the compression ratio is controlled by a tick_power parameter that sets the quantization step size; the default tick_power of -8 yields a maximum error of 1/512 per element. It is intended for machine learning workflows where storing large volumes of training data or model weights benefits from reduced disk footprint and memory usage.
The package requires numpy as its only runtime dependency and supports Python 3.6 and later. Installation via pip uses prebuilt wheels for modern Python versions (3.10–3.14) on common platforms, but building from source requires a C++ compiler. The repository is maintained but aging, with no recent feature development; it remains suitable for stable, production use in contexts where the compression trade-offs are acceptable.
Use it for
- Store large training datasets on disk with reduced footprint while maintaining acceptable numerical precision for model training.
- Compress neural network model weights for efficient distribution and deployment in bandwidth-constrained environments.
- Archive historical experimental results and intermediate model checkpoints with controlled accuracy loss.
- Reduce memory usage when loading large arrays into RAM during batch processing or inference pipelines.
- Serialize floating-point data for transmission over networks where bandwidth is a bottleneck.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need lossy compression of NumPy arrays in machine learning contexts and can accept the accuracy trade-offs.
The package is stable, has no known vulnerabilities, and carries a permissive MIT license. Install friction is moderate due to C++ compilation, but prebuilt wheels are available for modern Python versions. The aging maintenance status is not a blocker for stable use, but expect no active feature development.
Install
lilcom on PyPI
Before you install
Medium install friction due to C++ compilation requirement. Package is aging (211 days since last release) but repository remains active with recent commits; maintenance status suggests limited ongoing development.
Requires a C++ compiler (e.g., g++ or clang) to build from source; prebuilt wheels available for Python 3.10–3.14 on macOS, Linux, and Windows.
License in practice
MIT license permits free use, modification, and distribution with minimal restrictions, making it suitable for both open-source and commercial projects.
Quickstart
import numpy as np
import lilcom
a = np.random.randn(300, 500)
a_compressed = lilcom.compress(a)
a_decompressed = lilcom.decompress(a_compressed)
Verify before relying
- Typical compression ratio or file size reduction achieved in practice across different array types and sizes.
- Performance characteristics (compression/decompression speed) relative to alternative compression methods.
- Whether the tick_power parameter and resulting accuracy trade-offs are well-documented for different use cases.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.6 |
| Install friction | Medium. Platform-specific wheel |
| Runtime dependencies | 1 packagenumpy |
| Maintenance | Aging 211 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 706,753 / month, #5,270 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3Topic :: System :: Archiving :: Compression |
Evidence: lilcom-1.8.2-cp310-cp310-macosx_10_9_universal2.whl; lilcom-1.8.2-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl; lilcom-1.8.2-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl; lilcom-1.8.2-cp310-cp310-win_amd64.whl; lilcom-1.8.2-cp311-cp311-macosx_10_9_universal2.whl; lilcom-1.8.2-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl; lilcom-1.8.2-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl; lilcom-1.8.2-cp311-cp311-win_amd64.whl; lilcom-1.8.2-cp312-cp312-macosx_10_13_universal2.whl; lilcom-1.8.2-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl; lilcom-1.8.2-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl; lilcom-1.8.2-cp312-cp312-win_amd64.whl; lilcom-1.8.2-cp313-cp313-macosx_10_13_universal2.whl; lilcom-1.8.2-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl; lilcom-1.8.2-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl; lilcom-1.8.2-cp313-cp313-win_amd64.whl; lilcom-1.8.2-cp314-cp314-macosx_10_15_universal2.whl; lilcom-1.8.2-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.whl; lilcom-1.8.2-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl; lilcom-1.8.2-cp314-cp314-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 › “numpy array compression”
- lilcomLossily compresses floating-point NumPy arrays into byte strings with…
- pcodecPcodec compresses and decompresses numerical sequences using a…
- pylercpylerc encodes and decodes raster image data using the LERC (Limited…
Give your agent the search over MCP, or paste the wish link into any chat.
More Compression packages
Provides Python bindings to the Brotli compression library, enabling lossless compression and decompression using a modern LZ77 variant with Huffman coding and context modeling.
Install it if you need Brotli compression in Python; the API is straightforward and the library is battle-tested.
Provides Zstandard compression support for Python versions before 3.14, backporting the standard library's zstd module along with zstd-enabled tarfile and zipfile modules.
Zopfli is a Python binding for Google's Zopfli compression library, providing higher-density compression for zlib and gzip formats than standard algorithms, with tunable iteration and block-splitting parameters.
Python binding for Google's Snappy compression library, providing fast compression and decompression of data via the cramjam backend.
However, dormant maintenance (715 days since last release) means security or compatibility issues may not be addressed quickly.
pyzipper replaces Python's standard zipfile module to read and write AES-encrypted zip archives, using the WinZip AES encryption specification.
Provides Python bindings to the Zstandard (zstd) compression library with an API similar to bz2, lzma, and zlib modules.
See also ml-dtypes · python-neo-lzf · pcodec · pylibjpeg-openjpeg · pylerc · pylibjpeg-libjpeg · descript-audio-codec · lzstring · encodec · tifffile