Registry / serialization / lz4tools

lz4tools

JSON →
library1.3.1.2pypypi✓ verified 80d ago

Python bindings and tools for LZ4 compression, providing LZ4Frame compression/decompression utilities. Current version 1.3.1.2, released 2019-10-30. Last uploaded 2020-10-20. Low release cadence, effectively in maintenance mode.

pip install lz4tools
INSTALL
IMPORT
SIG · LZ4TOOLS
L
lz4tools
serializationpythonv1.3.1.2
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.

Lz4File
from lz4tools import Lz4File
from lz4tools import LZ4Frame
open
from lz4tools import open
compressFileDefault
from lz4tools import compressFileDefault

Basic compression and decompression using package-level functions and the LZ4Frame class. Ensure you have the data as bytes.

from lz4tools import compress, decompress, LZ4Frame # Compress bytes data = b"Hello, LZ4!" compressed = compress(data) print(f"Compressed: {compressed}") # Decompress decompressed = decompress(compressed) print(f"Decompressed: {decompressed}") # Using LZ4Frame context frame = LZ4Frame() packed = frame.compress(data) unpacked = frame.decompress(packed) print(f"Frame roundtrip: {unpacked}")
Debug
Known issues
breakingThe package lz4tools is NOT the same as lz4 (python-lz4). Importing from lz4.frame will use a different library with incompatible format.
fix
Use 'from lz4tools import LZ4Frame' instead of 'from lz4.frame import LZ4Frame'.
affects: all
deprecatedLibrary has not been updated since 2019. There is no active development. Consider using 'lz4' (python-lz4) for better performance and maintenance.
fix
For new projects, prefer 'pip install lz4' and use 'from lz4.frame import LZ4Frame'.
affects: >=1.3.0
gotchaThe 'compress' and 'decompress' functions work only with bytes, not strings. Passing a str will raise TypeError.
fix
Encode strings to bytes before compression: data.encode('utf-8').
affects: all
Upgrade
Version history
1.3.1.2latest on PyPI · released Jan 19, 2016
Audit
Dependencies

No dependency data recorded yet.

Agent activity
3 hits · last 30 days
node
2
Meta
1
Resources
lz4tools — pip install lz4tools · libregistry