{"id":7584,"library":"pylzss","title":"pylzss - LZSS Compression Library","description":"pylzss is a Python library designed for decoding and encoding data compressed with the LZSS algorithm. It provides efficient handling of LZSS-compressed streams, often found in embedded systems or older file formats. The current version is 0.3.8, with recent releases focusing on bug fixes, build system improvements, and wider platform support.","status":"active","version":"0.3.8","language":"en","source_language":"en","source_url":"https://github.com/m1stadev/pylzss","tags":["compression","lzss","data-compression","binary-data"],"install":[{"cmd":"pip install pylzss","lang":"bash","label":"Install pylzss"}],"dependencies":[],"imports":[{"symbol":"LzssDecoder","correct":"from pylzss import LzssDecoder"},{"symbol":"LzssEncoder","correct":"from pylzss import LzssEncoder"}],"quickstart":{"code":"from pylzss import LzssEncoder, LzssDecoder\n\n# Example data\noriginal_data = b\"A Python library for decoding/encoding LZSS-compressed data. \" * 5\n\n# Encode the data\nencoder = LzssEncoder()\nencoded_data = encoder.encode(original_data)\n\nprint(f\"Original size: {len(original_data)} bytes\")\nprint(f\"Encoded size: {len(encoded_data)} bytes\")\n\n# Decode the data\ndecoder = LzssDecoder()\ndecoded_data = decoder.decode(encoded_data)\n\nprint(f\"Decoded size: {len(decoding_data)} bytes\")\nassert original_data == decoded_data\nprint(\"Encoding and decoding successful!\")\n","lang":"python","description":"This quickstart demonstrates how to use `pylzss` to compress and decompress a byte string. It initializes an `LzssEncoder` to compress the `original_data` and then uses an `LzssDecoder` to reconstruct it, verifying that the decoded data matches the original."},"warnings":[{"fix":"Always use `pylzss` version 0.3.6 or newer. If you have 0.3.5 installed, upgrade immediately with `pip install --upgrade pylzss`.","message":"Version 0.3.5 was pulled from PyPI due to critical issues. Attempting to install or use it will lead to unexpected behavior or installation failures.","severity":"breaking","affected_versions":"0.3.5"},{"fix":"Do not attempt to use or install `pylzss==0.3.3`. Use `pylzss==0.3.4` or any newer version.","message":"Version 0.3.3 was incorrectly versioned and never properly released to PyPI. It should be avoided as it may cause installation problems or contain critical bugs.","severity":"breaking","affected_versions":"0.3.3"},{"fix":"Ensure you are using `pylzss` version 0.3.1 or newer. Upgrade with `pip install --upgrade pylzss` if you are on an older version and Python 3.10+.","message":"Versions of `pylzss` older than 0.3.1 can raise a `SystemError` when used with Python 3.10 or newer due to API changes in Python's C extension handling.","severity":"gotcha","affected_versions":"<0.3.1"}],"env_vars":null,"last_verified":"2026-04-16T00:00:00.000Z","next_check":"2026-07-15T00:00:00.000Z","problems":[{"fix":"Install the library using pip: `pip install pylzss`","cause":"The pylzss library is not installed in your current Python environment.","error":"ModuleNotFoundError: No module named 'pylzss'"},{"fix":"Upgrade pylzss to version 0.3.1 or higher: `pip install --upgrade pylzss`","cause":"You are using an older version of pylzss (prior to 0.3.1) with Python 3.10 or a newer Python version, which introduced breaking changes for C extensions.","error":"SystemError: PY_SSIZE_T_CLEAN should be defined for functions that use 's#' formats"},{"fix":"Install a newer, stable version of pylzss, such as 0.3.6 or later: `pip install pylzss>=0.3.6`","cause":"Version 0.3.5 of pylzss was removed from PyPI due to severe issues, making it unavailable for installation.","error":"ERROR: Could not find a version that satisfies the requirement pylzss==0.3.5"}]}