{"id":1657,"library":"pyppmd","title":"PPMd Compression Library","description":"pyppmd is a Python wrapper for the PPMd (Prediction by Partial Matching) compression algorithm, offering both compression and decompression capabilities. It is implemented as a C-extension for performance. The current version is 1.3.1, and it receives updates periodically, primarily for maintenance, bug fixes, and minor feature enhancements.","status":"active","version":"1.3.1","language":"python","source_language":"en","source_url":"https://github.com/miurahr/pyppmd","tags":["compression","decompression","ppmd","data-compression"],"install":[{"cmd":"pip install pyppmd","lang":"bash","label":"Install latest version"}],"dependencies":[],"imports":[{"wrong":"from pyppmd import PPMdEncoder","symbol":"Ppmd7Encoder","correct":"from pyppmd import Ppmd7Encoder"},{"symbol":"Ppmd7Decoder","correct":"from pyppmd import Ppmd7Decoder"},{"symbol":"compress","correct":"from pyppmd import compress"}],"quickstart":{"code":"import pyppmd\n\n# Prepare some data\noriginal_data = b\"This is a test string to be compressed multiple times. \" * 100\n\n# Initialize encoder and decoder\nencoder = pyppmd.PPMdEncoder()\ndecoder = pyppmd.PPMdDecoder()\n\n# Compress the data\ncompressed_data = encoder.compress(original_data)\nprint(f\"Original size: {len(original_data)} bytes\")\nprint(f\"Compressed size: {len(compressed_data)} bytes\")\n\n# Decompress the data\ndecompressed_data = decoder.decompress(compressed_data)\n\n# Verify decompression\nassert original_data == decompressed_data\nprint(\"Decompression successful and data matches original!\")","lang":"python","description":"This quickstart demonstrates the basic usage of pyppmd to compress and decompress a byte string. It initializes an `Encoder` and `Decoder`, processes data, and then verifies the integrity of the decompressed output."},"warnings":[{"fix":"Ensure you are on the latest version of `pyppmd`. Carefully test with your specific data and parameters. Avoid experimental or non-default `restore_method` or `endmark` options for `PPMd8Decoder` unless thoroughly validated.","message":"The PPMd8 Decoder, particularly in versions prior to 1.x, has known issues including incorrect output, wrong end-of-file (EOF) status detection, and potential deadlocks with certain parameter combinations. While improvements have been made, caution is advised.","severity":"gotcha","affected_versions":"<1.3.0, potentially current versions with specific settings"},{"fix":"Upgrade your Python environment to 3.10 or later before installing `pyppmd`.","message":"pyppmd requires Python 3.10 or newer. Attempting to install or use it on older Python versions will result in installation failures or runtime errors.","severity":"breaking","affected_versions":"All versions >=0.18.0"},{"fix":"Provide complete byte strings to `compress` and `decompress` methods. For streaming scenarios, consider buffering data or implementing higher-level stream processing on top of `pyppmd`'s block-wise operations.","message":"While pyppmd generally handles data streams, the `compress` and `decompress` methods are designed for single-shot operations with complete byte strings. Using them incrementally or with partial data without careful state management may lead to corruption or errors.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"search_vec":"'1.3.1':38 'algorithm':17 'bug':47 'c':30 'c-extens':29 'capabl':23 'compress':2,16,20,53,58 'current':35 'data':57 'data-compress':56 'decompress':22,54 'enhanc':52 'extens':31 'featur':51 'fix':48 'implement':26 'librari':3 'mainten':46 'match':15 'minor':50 'offer':18 'partial':14 'perform':33 'period':43 'ppmd':1,11,55 'predict':12 'primarili':44 'pyppmd':4 'python':7 'receiv':41 'updat':42 'version':36 'wrapper':8","created_at":"2026-04-09T03:57:32.819833+00:00","updated_at":"2026-04-16T19:40:18.009797+00:00","problems":null,"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"1.3.1","cli_name":"","cli_version":null,"type":"library","homepage":"https://pyppmd.readthedocs.io/","github":"https://github.com/miurahr/pyppmd","docs":"https://pyppmd.readthedocs.io/en/stable/","changelog":"https://pyppmd.readthedocs.io/en/latest/changelog.html","pypi":"https://pypi.org/project/pyppmd/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["serialization"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-30","last_verified":"2026-08-27","next_check":"2026-07-30","install_tag":null}}