Registry / devops / python-neo-lzf

python-neo-lzf

JSON →
library0.3.5pypypi✓ verified 86d ago

A fork of python-lzf that provides pre-built wheel files for the LZF compression algorithm. Version 0.3.5 is current, with infrequent releases.

pip install python-neo-lzf
INSTALL
IMPORT
SIG · PYTHON-NEO-LZF
P
python-neo-lzf
devopspythonv0.3.5
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

lzf
import lzf
The module name is 'lzf', not 'python_neo_lzf'.
compress
from lzf import compress
Direct import of the compress function.
decompress
from lzf import decompress
Direct import of the decompress function.

Compress and decompress bytes using LZF.

import lzf data = b'Hello, World!' * 1000 compressed = lzf.compress(data) decompressed = lzf.decompress(compressed) assert data == decompressed print('LZF roundtrip successful')
Debug
Known issues
breakingThe 'lzf' module is a shared namespace: if python-lzf (original) is also installed, conflicts may occur. Ensure only one version is installed.
fix
Uninstall any other lzf packages and install only python-neo-lzf.
affects: all
gotchaInput must be bytes; strings will raise TypeError.
fix
Always encode strings to bytes before compression: lzf.compress('text'.encode('utf-8')).
affects: all
deprecatedThe package requires Python >=3.7. No official deprecation, but older Python versions are unsupported.
fix
Upgrade to Python 3.7 or later.
affects: 0.3.5
Errors
Common errors & fixes
TypeError: a bytes-like object is required, not 'str'
Input to compress/decompress is a string instead of bytes.
fix
lzf.compress(b'value') or encode your string: lzf.compress('value'.encode()).
ImportError: cannot import name 'compress' from 'lzf'
The package is not installed or the module name is incorrect. Sometimes python-lzf (original) has different API.
fix
Install python-neo-lzf via pip. Ensure no other lzf module is in the path.
Upgrade
Version history
0.3.5latest on PyPI · released Dec 25, 2025
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources
python-neo-lzf — pip install python-neo-lzf · libregistry