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

Top 8.2% on proxy.golang.org

proxy.golang.org : 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.

Registry - Source - Documentation - JSON
purl: pkg:golang/github.com/%21merovius/diff
License: Apache-2.0
Latest release: over 4 years ago
First release: over 5 years ago
Namespace: github.com/Merovius
Stars: 11 on GitHub
Forks: 1 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: 15 days ago

    Loading...
    Readme
    Loading...