Skip to content

gal-zemach/FileDiff

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

File Diff

Compares files using the Myers Algorithm

An application that prints the diff between two given files. Prints human-readable instructions for transforming file1 into file2. The app uses the Myers algorithm for computing the instructions.

Table of Contents


Prerequisites

  • .NET 9.

Build Instructions

  • For Windows (x64)
dotnet publish -r win-x64 -c Release --self-contained true
  • For macOS (ARM)
dotnet publish -r osx-arm64 -c Release --self-contained true

Usage

FileDiff <file1> <file2>

File Structure

FileDiff/
│
├─ Common/
│   └─ OffsetArray.cs   # An array that can be accessed using an offset index
│
├─ Diff/
│   └─ FileComparer.cs   # Returns grouped diff instructions with the desired output format
│   │
│   └─ Algorithm
│   │   └─ MyersComparer.cs   # Returns single-line diff instructions using the Myers algorithm
│   │
│   └─ Data
│       └─ Instruction.cs   # Base class for the instructions the app uses
│       └─ InsertInstruction.cs   # Instruction insterting new lines
│       └─ RemoveInstruction.cs   # Instruction for removing new lines
│
└─ Program.cs   # Application entry point

References

About

File Diff app. Uses the Myers Algorithm.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages