3

Where can i find the histogram diff algorithm on internet. I want to compare two texts and find the differences, currently i am trying the patience diff algorithm,but that does not work that effective, i have heard like histogram diff algorithm is an improved version of patience diff

Alex Joy
  • 33
  • 2

2 Answers2

1

The git software implements both patience and histogram diff algorithms. See also: What's the difference between `git diff --patience` and `git diff --histogram`?

If you have git installed, the commands are:

git diff --histogram
git diff --patience

Your question has the javascript tag. I assume you are looking for a library, or a description of the algorithm so you can implement it yourself. The library used by git is libxdiff. Another diff library is xdelta.

Links:

Stef
  • 13,242
  • 2
  • 17
  • 28
-1

Even I have same requirement in my project I have used this java-diff-utils which implements

  1. Meyer's diff
  2. HistogramDiff algorithms