skillfed

python-neo-lzf

A fork of python-lzf with pre-built wheel files.

python-neo-lzf v0.3.5 83.1K downloads/30d#14,103 on PyPI2
Permissive license BSD-3-Clause AGING released

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-lzf

uv

uv add python-neo-lzf

poetry

poetry add python-neo-lzf

Installing 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

Development Status :: 5 - Production/StableIntended Audience :: DevelopersNatural Language :: EnglishOperating System :: OS IndependentProgramming Language :: CProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: System :: Archiving :: Compression

Tags

lzf compression pythonfast data compression libraryliblzf bindingscompress decompress byteslow-level compression bindingsmall block compressionlzf python wrapper
compressionc-bindingslow-level

More Compression packages