awesome-repositories.com
Blog
MCP
awesome-repositories.com

Discover the best open-source repositories with AI-powered search.

ExploreCurated searchesOpen-source alternativesSelf-hosted softwareBlogSitemap
ProjectMCP serverAboutHow we rankPress
LegalPrivacyTerms
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
sebastianbergmann avatar

sebastianbergmann/diff

0
View on GitHub↗
7,663 stars·87 forks·PHP·BSD-3-Clause·15 views

Diff

This is a sequence comparison library and text difference engine that implements the Myers diff algorithm to identify additions and deletions between two sequences of text or arrays. It functions as a tool for calculating the shortest edit script to determine exactly which elements were modified between two versions of a file.

The project provides a unified diff generator to produce standard textual representations of changes for human review, as well as a unified diff parser that converts these strings into structured objects for programmatic analysis.

The engine treats text inputs as arrays of lines or characters to allow generic comparison of any sequence. It utilizes graph search and linear space refinement to identify matching and differing segments.

Features

  • Diff Algorithms - Provides a full implementation of the Myers diff algorithm for computing optimal edit scripts.
  • Diff Graph Search - Finds the shortest edit script by calculating the optimal path through a graph of possible edits.
  • Diff Data Parsers - Converts unified diff strings into structured object graphs for programmatic analysis.
  • Text Difference Computation - Identifies added, removed, or changed segments by calculating differences between text strings or arrays.
  • Sequence Comparison Algorithms - Implements sequence comparison algorithms to identify the minimal set of additions and deletions.
  • Difference Calculations - Calculates the set of additions and removals between two sequences of strings.
  • Stateful Diff Parsing - Converts raw unified diff text into structured objects by tracking metadata for headers and hunks.
  • Unified Diff Generators - Creates a standard textual representation of changes between two pieces of text for human review.
  • Unified Diff Generation - Groups modified lines into contiguous hunks to produce a standard textual representation of changes.
  • Linear Space Refinement - Reduces memory consumption during the search for optimal edits by splitting the comparison range.
  • Document Diff Generators - Produces structured and visual representations of differences between two text sequences.
  • Version Control - Calculates the shortest edit script between two versions of a file to support version tracking.
  • Generic Sequence Comparison - Implements an array-based approach to allow generic comparison of any sequence of elements.

Star history

Star history chart for sebastianbergmann/diffStar history chart for sebastianbergmann/diff

How this analysis was created: This summary and feature list were written by an AI model that read the project's README and public documentation pages. Each feature links to the documentation it came from; stars, license and language come straight from the GitHub API. The model does not read the source code, and the analysis is refreshed when the project is re-analysed. Learn more on our About page.

AI search

Explore more awesome repositories

Describe what you need in plain English — the AI ranks thousands of curated open-source projects by relevance.

Start searching with AI

Open-source alternatives to Diff

Similar open-source projects, ranked by how many features they share with Diff.
  • java-diff-utils/java-diff-utilsjava-diff-utils avatar

    java-diff-utils/java-diff-utils

    1,536View on GitHub↗

    Java Diff Utils is a library for computing text differences, generating unified diffs, parsing patches, and applying changes to data in Java applications. It functions as a utility for comparing text sequences, calculating additions and deletions, and generating structured difference comparisons, while also acting as a patch generation library for creating, parsing, and applying standard unified patches to synchronize and update text content. The library calculates the shortest edit script between two sequences using dynamic programming to identify optimal additions, deletions, and modificati

    Javacomputing-diffsdiffdiff-algorithm
    View on GitHub↗1,536
  • kpdecker/jsdiffkpdecker avatar

    kpdecker/jsdiff

    9,063View on GitHub↗

    jsdiff is a JavaScript text diffing library and comparison engine used to compute differences between strings or arrays. It identifies additions and removals between blocks of text and provides a system for generating and applying formatted Unix-style patches. The toolkit functions as a customizable token differ, allowing for the comparison of arbitrary token sequences using user-defined equality and tokenization rules. This enables the creation of specialized comparison tools for non-standard text or data formats. Comparison capabilities are available at the character, word, and line levels

    JavaScript
    View on GitHub↗9,063
  • google/diff-match-patchgoogle avatar

    google/diff-match-patch

    8,065View on GitHub↗

    This is a text diffing and patching library used for computing differences between text blocks, calculating edit distances, and applying patches to synchronize document versions. It includes a fuzzy text matching engine to locate strings by balancing accuracy with location, and a Levenshtein distance calculator to measure the number of character insertions, deletions, and substitutions between two strings. The library features a semantic diff optimizer that refines raw text differences to align with human-readable word and phrase boundaries. It provides utilities for generating and parsing se

    Pythondiffdifferencematch
    View on GitHub↗8,065
  • rtfpessoa/diff2htmlrtfpessoa avatar

    rtfpessoa/diff2html

    3,321View on GitHub↗

    diff2html is a Git diff visualization library that transforms unified diff text into structured HTML. It serves as a renderer for visualizing code changes in web browsers, providing components to inject stylized diff visualizations and collapsible file lists directly into web page elements. The library enables both side-by-side and line-by-line code comparisons. It includes a syntax highlighting diff viewer that applies language-specific color coding to source code based on file extensions or manual mappings. To maintain alignment during reviews, the project implements synchronized scrolling

    TypeScriptcolorizeddiffdiff2html
    View on GitHub↗3,321
See all 16 alternatives to Diff→

Frequently asked questions

What does sebastianbergmann/diff do?

This is a sequence comparison library and text difference engine that implements the Myers diff algorithm to identify additions and deletions between two sequences of text or arrays. It functions as a tool for calculating the shortest edit script to determine exactly which elements were modified between two versions of a file.

What are the main features of sebastianbergmann/diff?

The main features of sebastianbergmann/diff are: Diff Algorithms, Diff Graph Search, Diff Data Parsers, Text Difference Computation, Sequence Comparison Algorithms, Difference Calculations, Stateful Diff Parsing, Unified Diff Generators.

What are some open-source alternatives to sebastianbergmann/diff?

Open-source alternatives to sebastianbergmann/diff include: java-diff-utils/java-diff-utils — Java Diff Utils is a library for computing text differences, generating unified diffs, parsing patches, and applying… kpdecker/jsdiff — jsdiff is a JavaScript text diffing library and comparison engine used to compute differences between strings or… google/diff-match-patch — This is a text diffing and patching library used for computing differences between text blocks, calculating edit… rtfpessoa/diff2html — diff2html is a Git diff visualization library that transforms unified diff text into structured HTML. It serves as a… fakerr/git-recall — Git-recall is a terminal-based application designed to visualize, navigate, and audit local repository commit history… guofei9987/scikit-opt — scikit-opt is a Python optimization library and numerical framework designed to solve complex global optimization…