{"id":24346,"library":"pyliblzfse","title":"pyliblzfse","description":"pyliblzfse provides Python bindings for the LZFSE reference implementation, offering compression and decompression using Apple's LZFSE algorithm. Version 0.4.1 is the latest release. The library is in maintenance mode with sparse updates.","status":"maintenance","version":"0.4.1","language":"python","source_language":"en","source_url":"https://github.com/ydkhatri/pyliblzfse","tags":["compression","lzfse","apple","bindings"],"install":[{"cmd":"pip install pyliblzfse","lang":"bash","label":"Install via pip"}],"dependencies":[],"imports":[{"note":"The module is named pyliblzfse, not liblzfse.","wrong":"from liblzfse import compress","symbol":"compress","correct":"from pyliblzfse import compress"},{"note":null,"wrong":null,"symbol":"decompress","correct":"from pyliblzfse import decompress"}],"quickstart":{"code":"from pyliblzfse import compress, decompress\n\noriginal = b\"Hello, world!\" * 1000\ncompressed = compress(original)\ndecompressed = decompress(compressed)\nassert original == decompressed\nprint(\"LZFSE compression works!\")","lang":"python","description":"Compress and decompress bytes using LZFSE. Both compress and decompress expect bytes input and return bytes."},"warnings":[{"fix":"Always encode strings to bytes before calling compress, e.g., b'text' or 'text'.encode()","message":"compress() and decompress() expect bytes, not strings. Passing str will raise TypeError.","severity":"gotcha","affected_versions":"all"},{"fix":"Consider alternatives like pyLZFSE or using ctypes bindings for newer Python.","message":"Library updates are infrequent; may not support newer Python versions. Last release 2018.","severity":"deprecated","affected_versions":">=0.4.0"},{"fix":"Do not assume compression ratio for small inputs; use with large data or benchmark.","message":"Compression output may be larger than input for small data. LZFSE is optimized for larger blocks.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Install with 'pip install pyliblzfse' and ensure virtual environment is activated.","cause":"Package not installed or installed in wrong environment.","error":"ImportError: No module named 'pyliblzfse'"},{"fix":"Convert string to bytes: compress(data.encode())","cause":"Passing a string to compress() instead of bytes.","error":"TypeError: a bytes-like object is required, not 'str'"},{"fix":"Ensure the data was compressed with compress() from this library, or verify input.","cause":"Decompressing data that is not LZFSE compressed.","error":"ValueError: data is not valid LZFSE compressed data"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}