python-neo-lzf
A fork of python-lzf with pre-built wheel files.
What it is and what it does
python-neo-lzf is a Python binding to the liblzf C compression library, offering two core functions: compress() to shrink bytes and decompress() to expand them. It is designed as a low-level tool for applications that need fast compression and decompression of small data blocks, with no runtime dependencies beyond Python itself.
The package is a fork that bundles pre-built wheels for Python 3.7–3.14 across multiple platforms (macOS, Linux variants, Windows), eliminating the need to compile C extensions at install time. Both compress() and decompress() can return None under specific conditions—compress() when data cannot fit within a size limit, and decompress() when the result does not match the expected size—so callers must handle these cases.
Use it for:
- Compress small network packets or message payloads where speed matters more than maximum compression ratio.
- Decompress liblzf-compressed data streams in applications that need to interoperate with C/C++ systems using liblzf.
- Cache compression in memory-constrained environments where fast encode/decode of small blocks is critical.
- Embedded data serialization where a lightweight, low-level compression binding is preferred over heavier libraries.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides fast compression and decompression of small data blocks using liblzf, a C library, through Python bindings with compress() and decompress() functions.
Yes, if you need fast compression for small data blocks and are comfortable with a low-level API that requires explicit size handling. The pre-built wheels and broad Python version support reduce friction. However, the aging maintenance status (232 days since last release, only 2 stars) and lack of active development signal suggest this is stable but not actively evolving—suitable for stable use cases, not for projects expecting ongoing feature work.
Install
python-neo-lzf on PyPI
pip
pip install python-neo-lzfuv
uv add python-neo-lzfpoetry
poetry add python-neo-lzfInstalling python-neo-lzf
Before you install
Medium install friction due to compiled C extensions; however, pre-built wheels are available for Python 3.7–3.14 across macOS, Linux (including musllinux), and Windows architectures. Last release was 232 days ago; maintenance status is aging.
License in practice
BSD-3-Clause is permissive and places minimal restrictions on use, modification, and distribution in both commercial and open-source contexts.
Quickstart
import python_neo_lzf
data = b'hello world'
compressed = python_neo_lzf.compress(data)
if compressed:
decompressed = python_neo_lzf.decompress(compressed, len(data))
print(decompressed)
compress() may return None if data cannot be compressed to fit within the default or specified max_length; decompress() requires knowing the expected uncompressed size in advance.
Verify before relying
- Whether the package is actively maintained beyond the aging status signal (last commit 2025-12-25, but only 2 repository stars).
- Performance benchmarks comparing this fork to the original python-lzf or other compression libraries.
- Specific use cases where the optional max_length constraint in compress() provides practical value.
Package facts
| License | BSD-3-Clause (permissive) |
| Python support | supports the current Python release (>=3.7) |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | none |
| Maintenance | aging — 232 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 83,064/month — #14,103 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: python_neo_lzf-0.3.5-cp310-cp310-macosx_10_9_universal2.whl; python_neo_lzf-0.3.5-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl; python_neo_lzf-0.3.5-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; python_neo_lzf-0.3.5-cp310-cp310-musllinux_1_2_aarch64.whl; python_neo_lzf-0.3.5-cp310-cp310-musllinux_1_2_x86_64.whl; python_neo_lzf-0.3.5-cp310-cp310-win32.whl; python_neo_lzf-0.3.5-cp310-cp310-win_amd64.whl; python_neo_lzf-0.3.5-cp311-cp311-macosx_10_9_universal2.whl; python_neo_lzf-0.3.5-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl; python_neo_lzf-0.3.5-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; python_neo_lzf-0.3.5-cp311-cp311-musllinux_1_2_aarch64.whl; python_neo_lzf-0.3.5-cp311-cp311-musllinux_1_2_x86_64.whl; python_neo_lzf-0.3.5-cp311-cp311-win32.whl; python_neo_lzf-0.3.5-cp311-cp311-win_amd64.whl; python_neo_lzf-0.3.5-cp312-cp312-macosx_10_13_universal2.whl; python_neo_lzf-0.3.5-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl; python_neo_lzf-0.3.5-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; python_neo_lzf-0.3.5-cp312-cp312-musllinux_1_2_aarch64.whl; python_neo_lzf-0.3.5-cp312-cp312-musllinux_1_2_x86_64.whl; python_neo_lzf-0.3.5-cp312-cp312-win32.whl
Tags
More Compression packages
Provides Python bindings to the Brotli…
permissive · top 1,000 on PyPI
backports.zstdProvides Zstandard compression support for…
permissive · top 1,000 on PyPI
zopfliZopfli is a Python binding for Google's Zopfli…
permissive · top 1,000 on PyPI
python-snappyPython binding for Google's Snappy compression…
permissive · top 5,000 on PyPI
pyzipperpyzipper replaces Python's standard zipfile…
permissive · top 5,000 on PyPI
pyzstdProvides Python bindings to the Zstandard…
permissive · top 5,000 on PyPI
lzallrightlzallright provides Python bindings to compress…
permissive · top 15,000 on PyPI
lzstringCompresses and decompresses text using the…
permissive · top 15,000 on PyPI
ncompressProvides LZW compression and decompression…
permissive · top 15,000 on PyPI
pcodecPcodec compresses and decompresses numerical…
unclear · top 15,000 on PyPI
python-lzfProvides Python bindings to the liblzf…
permissive · top 15,000 on PyPI
unlzw3Decompresses .Z files (Unix compress format)…
permissive · top 15,000 on PyPI
lilcomLossily compresses floating-point NumPy arrays…
permissive · top 15,000 on PyPI
compressed-rtfCompresses and decompresses Rich Text Format…
permissive · top 5,000 on PyPI
apple-compressPython bindings for Apple's libcompression…
unclear · top 15,000 on PyPI
lzfsePython bindings for the LZFSE reference…
permissive · top 5,000 on PyPI