An open API service providing package, version and dependency metadata of many open source software ecosystems and registries.

github.com/Merovius/diff

Package diff calculates the differences between two sequences. It implements the algorithm from "An Algorithm for Differential File Comparison" by Hunt and McIlroy: https://www.cs.dartmouth.edu/~doug/diff.pdf For flexibility, the algorithm itself operates on a sequence of integers. This allows you to compare arbitrary sequences, as long as you can map their elements to a uint64. To generate a diff for text, the inputs need to be split and hashed. Splitting should be done to reduce algorithmic complexity (which is O(m•n•log(m)) in the worst case). It also creates diffs that are better suited for human consumption. Hashing means that collisions are possible, but they should be rare enough in practice to not matter. If they do happen, the resulting diff might be subpoptimal.

Ecosystem
proxy.golang.org
Latest Release
v1.0.1
over 5 years ago
Versions
2
Links
Registry proxy.golang.org
Source Repository
Docs Documentation
JSON API View JSON
CodeMeta codemeta.json
Package Details
PURL pkg:golang/github.com/%21merovius/diff
spec
License Apache-2.0
Namespace github.com/Merovius
First Release about 6 years ago
Last Synced 19 days ago
Repository
Stars 11 on GitHub
Forks 1 on GitHub
Rankings on proxy.golang.org
Overall Top 8.2%