mitsuhiko / Similar
Licence: apache-2.0
A high level diffing library for rust based on diffs
Stars: ✭ 386
Programming Languages
rust
11053 projects
Projects that are alternatives of or similar to Similar
Apkdiffpatch
a C++ library and command-line tools for Zip(Jar,Apk) file Diff & Patch; create minimal delta/differential; support Jar sign(apk v1 sign) & apk v2,v3 sign .
Stars: ✭ 121 (-68.65%)
Mutual labels: patch, diff
Editscript
A library designed to diff and patch Clojure data structures
Stars: ✭ 281 (-27.2%)
Mutual labels: patch, diff
deltaq
Fast and portable delta encoding for .NET in 100% safe, managed code.
Stars: ✭ 26 (-93.26%)
Mutual labels: diff, patch
Git Follow
Follow lifetime changes of a pathspec in Git.
Stars: ✭ 25 (-93.52%)
Mutual labels: patch, diff
diffy
Tools for finding and manipulating differences between files
Stars: ✭ 47 (-87.82%)
Mutual labels: diff, patch
Diff Match Patch
Diff Match Patch is a high-performance library in multiple languages that manipulates plain text.
Stars: ✭ 4,910 (+1172.02%)
Mutual labels: patch, diff
duff
Pure OCaml implementation of libXdiff (Rabin's fingerprint)
Stars: ✭ 20 (-94.82%)
Mutual labels: diff, patch
dipa
dipa makes it easy to efficiently delta encode large Rust data structures.
Stars: ✭ 243 (-37.05%)
Mutual labels: diff, patch
Gsync
gSync is an rsync based library for sending delta updates of files to a remote server.
Stars: ✭ 344 (-10.88%)
Mutual labels: patch, diff
tmux-eaw-fix
tmux 2.6 以降において East Asian Ambiguous Character を全角文字の幅で表示する
Stars: ✭ 16 (-95.85%)
Mutual labels: diff, patch
Patch Package
Fix broken node modules instantly 🏃🏽♀️💨
Stars: ✭ 6,062 (+1470.47%)
Mutual labels: patch, diff
Python Patch
Library to parse and apply unified diffs
Stars: ✭ 65 (-83.16%)
Mutual labels: patch, diff
Hdiffpatch
a C\C++ library and command-line tools for Diff & Patch between binary files or directories(folder); cross-platform; run fast; create small delta/differential; support large files and limit memory requires when diff & patch.
Stars: ✭ 459 (+18.91%)
Mutual labels: patch, diff
Ex audit
Ecto auditing library that transparently tracks changes and can revert them.
Stars: ✭ 214 (-44.56%)
Mutual labels: patch, diff
intellij-diff-plugin
Syntax highlighting for .diff files and .patch files in IntelliJ IDEs
Stars: ✭ 17 (-95.6%)
Mutual labels: diff, patch
go-gitdiff
Go library for parsing and applying patches created by Git
Stars: ✭ 41 (-89.38%)
Mutual labels: diff, patch
Multidiff
Binary data diffing for multiple objects or streams of data
Stars: ✭ 282 (-26.94%)
Mutual labels: diff
Similar: A Diffing Library
Similar is a dependency free crate for Rust that implements different diffing algorithms and high level interfaces for it. It is based on the pijul implementation of the Patience algorithm and inherits some ideas from there. It also incorporates the Myer's diff algorithm which was largely written by Brandon Williams. This library was built for the insta snapshot testing library.
use similar::{ChangeTag, TextDiff};
fn main() {
let diff = TextDiff::from_lines(
"Hello World\nThis is the second line.\nThis is the third.",
"Hallo Welt\nThis is the second line.\nThis is life.\nMoar and more",
);
for change in diff.iter_all_changes() {
let sign = match change.tag() {
ChangeTag::Delete => "-",
ChangeTag::Insert => "+",
ChangeTag::Equal => " ",
};
print!("{}{}", sign, change);
}
}
Screenshot
What's in the box?
- Myer's diff
- Patience diff
- Hunt–McIlroy / Hunt–Szymanski LCS diff
- Diffing on arbitrary comparable sequences
- Line, word, character and grapheme level diffing
- Text and Byte diffing
- Unified diff generation
Related Projects
- insta snapshot testing library
- similar-asserts assertion library
License and Links
- Documentation
- Issue Tracker
- Examples
- License: Apache-2.0
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].