Registry / serialization / python-lzf

python-lzf

JSON →
library0.2.6pypypi✓ verified 87d ago

Python C extension for the LZF compression algorithm, providing fast compression/decompression. Current version 0.2.6, last updated in 2013 (abandoned). Offers a simple API with compress and decompress functions. Best for small data or where LZF speed is needed.

pip install python-lzf
INSTALL
IMPORT
SIG · PYTHON-LZF
P
python-lzf
serializationpythonv0.2.6
Install
Import
Disk
Pass rate
0/ 10
Env Coverage0 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v? · pip install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
build_error
glibc
py 3.103.95 runs
build_error
Code
Verified usage

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

lzf
import lzf
Module provides compress/decompress functions directly.

Basic compress and decompress usage.

import lzf data = b'Hello, World! * 100' compressed = lzf.compress(data) decompressed = lzf.decompress(compressed) print('OK' if data == decompressed else 'FAIL')
Debug
Known issues
gotchaLibrary is abandoned; no updates since 2013. May break on newer Python versions (e.g., Python 3.12+).
fix
Consider alternatives like lz4, zstandard, or python-blosc.
affects: >=3.12
gotchaCompresses only bytes, not strings. Passing str will raise TypeError.
fix
Encode strings to bytes first: data.encode('utf-8').
affects: all
Errors
Common errors & fixes
ImportError: No module named lzf
Library not installed or Python cannot find it.
fix
Run pip install python-lzf, or install from source if not on PyPI.
ImportError: liblzf.so.1: cannot open shared object file
Missing liblzf system library.
fix
Install liblzf via system package manager (e.g., apt-get install liblzf-dev on Debian/Ubuntu).
Upgrade
Version history
0.2.6latest on PyPI · released Jun 13, 2024
Audit
Dependencies

No dependency data recorded yet.

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