#dmp #diff #diff-match-patch

dmp

A high-performance library in that manipulates plain text

4 releases

new 0.1.3 Mar 26, 2023
0.1.2 Feb 7, 2023
0.1.1 Jan 28, 2022
0.1.0 Jan 27, 2022

#208 in Text processing

Download history 618/week @ 2022-12-05 669/week @ 2022-12-12 805/week @ 2022-12-19 758/week @ 2022-12-26 1010/week @ 2023-01-02 790/week @ 2023-01-09 764/week @ 2023-01-16 703/week @ 2023-01-23 602/week @ 2023-01-30 817/week @ 2023-02-06 903/week @ 2023-02-13 977/week @ 2023-02-20 1104/week @ 2023-02-27 1451/week @ 2023-03-06 1425/week @ 2023-03-13 1366/week @ 2023-03-20

5,575 downloads per month
Used in 8 crates (via surrealdb)

MIT license

120KB
2K SLoC

dmp

The Diff Match and Patch libraries offer robust algorithms to perform the operations required for synchronising plain text. This repository contains a Rust version of the original diff-match-patch library, using up-to-date crate packages.

docs.rs Crates.io

Features

  • Diffing and patching library for plain text
  • Retrieve differences between two blocks of text
  • Create a set of patches for converting a block of text into another
  • Apply a set of patches onto a block of text to convert it to another block of text
  • Uses best-effort to apply patch even when the underlying text doesn't fully match.

Original

This code is forked originally from diff_match_patch.rs, licensed under the MIT license.

Dependencies

~0.9–1.3MB
~37K SLoC