{"categories":[{"label":"Text Processing","url":"https://skillfed.io/packages/category/text-processing/2"}],"enrichment":{"capability":"Wraps the C++ implementation of google-diff-match-patch to perform fast string and byte comparisons, returning diff operations or patches.","skillfed_tags":["text-comparison","performance-critical"],"use_cases":["Generate diffs between code versions or document revisions for version control or review systems.","Detect and highlight changes in text files for diff viewers or collaborative editing tools.","Produce patch files for applying changes to source code or configuration.","Compare large documents or byte streams where pure-Python diff is too slow.","Integrate fast text comparison into multi-threaded applications without GIL contention."],"what_it_does":"fast_diff_match_patch is a Python wrapper around a C++ implementation of Google's diff-match-patch library, designed to compute differences between text or byte strings much faster than the pure-Python port. It exposes a single `diff()` function that takes two strings or bytes and returns a sequence of operations (delete, keep, insert) with their lengths or content, optionally formatted as patches. The package releases the Global Interpreter Lock during diffing, allowing use in multi-threaded applications.\n\nThe library supports several tuning options: `timelimit` to cap computation time, `checklines` to optimize line-based text, `cleanup` to choose semantic or efficiency-focused post-processing, and `counts_only` to return operation lengths or full strings. It handles both Unicode strings and byte sequences, though Windows has limitations with characters outside the Basic Multilingual Plane.","worth_installing":"Yes, if you need fast string or byte diffs. The package is stable, permissively licensed, has no known vulnerabilities, and offers prebuilt wheels for common platforms. Maintenance is dormant but the code is mature; install friction is moderate due to compilation but mitigated by wheel availability. Not worth installing if you only diff small strings or can tolerate slower pure-Python performance."},"id":"fast-diff-match-patch","links":{"html":"https://skillfed.io/packages/fast-diff-match-patch","md":"https://skillfed.io/packages/fast-diff-match-patch.md","pypi":"https://pypi.org/project/fast-diff-match-patch/"},"maintenance":{"status":"dormant"},"meta":{"latest_release":"2024-04-23","license_spdx":null,"license_treatment":"permissive","name":"fast-diff-match-patch","python_support":"unspecified","summary":"Packages the C++ implementation of google-diff-match-patch for Python for fast byte and string diffs."},"popularity":{"monthly_downloads":494506,"position":6347,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"2.1.0"}
