{"id":23958,"library":"lcpdelta","title":"LCPDelta","description":"LCPDelta is a Python library for computing delta updates and patches, commonly used in content distribution and versioning systems. Version 2.1.27, requires Python >=3.9. Active development with regular releases.","status":"active","version":"2.1.27","language":"python","source_language":"en","source_url":"https://github.com/readdle/lcpdelta","tags":["delta","patch","binary-diff","update"],"install":[{"cmd":"pip install lcpdelta","lang":"bash","label":"PyPI install"}],"dependencies":[],"imports":[{"note":"Library is all lowercase despite capital letters in name.","wrong":"from LCPDelta import DeltaBuilder","symbol":"DeltaBuilder","correct":"from lcpdelta import DeltaBuilder"},{"note":"","wrong":"","symbol":"DeltaApplier","correct":"from lcpdelta import DeltaApplier"}],"quickstart":{"code":"import os\nfrom lcpdelta import DeltaBuilder, DeltaApplier\n\n# Build a delta between old and new files\nbuilder = DeltaBuilder()\ndelta = builder.build('old_file.bin', 'new_file.bin')\nwith open('delta.bin', 'wb') as f:\n    f.write(delta)\n\n# Apply delta to recreate new file\napplier = DeltaApplier()\nwith open('delta.bin', 'rb') as f:\n    delta_data = f.read()\napplier.apply('old_file.bin', delta_data, 'recreated_file.bin')","lang":"python","description":"Basic delta creation and application."},"warnings":[{"fix":"Use `import lcpdelta` instead of `import LCPDelta`.","message":"Library renamed from 'LCPDelta' to 'lcpdelta' in v2.0.0. All imports must use lowercase.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Read files in binary mode when passing to builder or applier.","message":"DeltaBuilder and DeltaApplier are the primary classes. The API expects bytes-like objects for file contents.","severity":"gotcha","affected_versions":"all"},{"fix":"Replace calls to `create_patch(old, new)` with `DeltaBuilder().build(old, new)`","message":"Function `create_patch` was deprecated in v2.1.0. Use `DeltaBuilder.build` instead.","severity":"deprecated","affected_versions":"2.1.0 - 2.1.27"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use `import lcpdelta` (lowercase).","cause":"Wrong import case; package is all lowercase.","error":"ModuleNotFoundError: No module named 'LCPDelta'"},{"fix":"Upgrade to latest: `pip install --upgrade lcpdelta`.","cause":"Outdated library version or incorrect import. Ensure version >=2.0.0.","error":"AttributeError: module 'lcpdelta' has no attribute 'DeltaBuilder'"},{"fix":"Open files in binary mode: `open('file', 'rb')`.","cause":"Passing strings instead of bytes to DeltaBuilder.build.","error":"TypeError: a bytes-like object is required, not 'str'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}