Diff Java

Alternatives To Diff Java
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
8 days ago43September 18, 2022123mitRust
a structural diff that understands syntax 🟥🟩
1910 days ago21May 07, 202127apache-2.0Swift
💻 A fast and flexible O(n) difference algorithm framework for Swift collection.
Textdistance3,11614299 months ago25June 29, 20229mitPython
Compute distance between sequences. 30+ algorithms, pure python implementation, common interface, optional external libs usage.
263 years ago12October 22, 201818mitSwift
Swift Diff
205 years ago7September 30, 20178mitSwift
The fastest Diff and patch library in Swift. Includes UICollectionView/UITableView utils.
Nanomorph701225652 years ago33February 18, 202117mitJavaScript
🚅 - Hyper fast diffing algorithm for real DOM nodes
2 years ago4June 08, 202113apache-2.0Swift
💾 A library for backporting UITableView/UICollectionViewDiffableDataSource.
3 months ago22August 25, 202211epl-1.0Clojure
A library to diff and patch Clojure/ClojureScript data structures
Vim Diff Enhanced332
3 years agoVim script
Better Diff options for Vim
Diff Lcs263214,363323a year ago16December 23, 20215otherRuby
Generate difference sets between Ruby sequences.
Alternatives To Diff Java
Select To Compare

Alternative Project Comparisons

GNU Diff for Java

The Diff for java is originally developed by Stuart D. Gathman (http://www.bmsi.com/java/) Here is a forked project to improve original work to be more robust and easy to use.

Original document

I have translated the GNU Diff algorithm to a Java class. The Diff class computes the differences between two Object arrays as a list of changes. This is very general purpose. Any of the options to GNU diff can be efficiently implemented as variations on how Object.equals() is implemented and how the change list is printed. DiffPrint now sports a setOutput() method. The DiffPrint.Base class and derivatives should really be renamed out of the empty package.

Unified and context printing now combine nearby changes.

Many people have asked me to change the license to LGPL. My port is based on GNU Diff, which is GPL. Until someone convinces me otherwise, I don't believe that I have the right to change the license. I have corresponded with the copyright holders of GNU Diff, and they are unwilling to change the license. Their position is that the GPL helps force companies to GPL more code in order to use existing GPL code.

The GPL restrictions do not apply to purely dynamically loaded code (otherwise, you would be unable to run GNU diff on a proprietary OS). When I get some time, I (or anyone who beats me to it) will create a plugin API so that applications can compile against an LGPL interface, and load the GPL implementation at runtime. This will also make comparing the performance of diff algorithms very convenient. While all Java classes are dynamically loaded at runtime, directly referenced classes are also used at compile time, and thus might be considered in violation of the GPL.


  • Diff.java The Diff algorithm v1.15
  • DiffTest.java Test for bugs submitted by users.
  • DiffPrint.java A base class for printing the change list in 'ed' style to test the algorithm. Could form the basis for a complete Java implementation of all the GNU diff comparison and output options.


Publish the revised interface that simplifies doing things with elements that are the same (as opposed to the usual requirement of dealing with just those that are different).

Popular Algorithms Projects
Popular Diff Projects
Popular Computer Science Categories

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.