Skip to content
/ dmp Public

An efficient plain text comparison and patching library written in Rust

License

Notifications You must be signed in to change notification settings

surrealdb/dmp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

d62a7f2 · May 19, 2023

History

21 Commits
May 18, 2023
May 18, 2023
Jan 23, 2022
Jan 23, 2022
Jan 23, 2022
Jan 23, 2022
May 19, 2023
May 19, 2023
Jan 22, 2022
May 18, 2023
Apr 8, 2022
Mar 26, 2023

Repository files navigation

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.

Fuzzing

A fuzzer is provided as a sanity-check:

RUST_BACKTRACE=1 cargo fuzz run fuzz

Original

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