Go implementation of the bspatch algorithm

Overview
Issues
  • Undoing patches

    Undoing patches

    Hi,

    I am looking to use bsdiff to keep a record of the changes I make to a file. As I see it, I keep the original file and then I can keep patching all the diffs to that file to get to the current state of that file. However I have been wondering if I can go the other way around and if I have the current state of the file, can I "strip" off patches and get back to the original state of the file? I don't know if that reads sensically at all! If I have a file, let's call them v0.x for example, V0.1 V0.2 V0.3

    Then bsdiff will give me the diffs between each version. If I then have v0.1 I can patch it twice to get to v0.3. However if I have v0.3 is there a way I can patch it to get back to v0.2 and therefrom 0.1? I have the diff between v0.2 and v0.3 but I guess that's not the same as having the diff of v0.3 and v0.2 is it? I had wondered if there was a nifty XOR of the diff or something that could be done to go backwards??

    I would appreciate any help you can give. Thanks

    Alex

    opened by amlwwalker 2
  • Please tag release

    Please tag release

    I'm currently packaging your library in Debian, as a dependency of several other packages.

    You currently do not tag any releases, and this makes it harder for downstream packagers. (Also, referring to specific commits is awkward)

    opened by nbraud 2
  • allow precomputation of suffix array

    allow precomputation of suffix array

    Separating the calculation of suffix arrays from the diffing algorithm will allow users to compute patches from a file to multiple target files without the need to recalculate the original file's suffix array each time.

    Diff function signature has not been altered, but rather 2 new functions; ComputeSuf and DiffWithSuf; were added for this purpose.

    opened by th133 0
  • Passing channel to cancel a diff

    Passing channel to cancel a diff

    Hello! This is a cool bit of work. I am looking to cancel a diff (on large files where the diff takes time), I want to pass a channel into the function that gets checked for a message (on a switch case) and if a value comes off the channel, it cancels the diff and stops in its tracks and cleans up.

    My questions.

    Where best to put the channel? I am thinking to fork your work.

    There is the line of code: https://github.com/kr/binarydist/blob/190e7de772656c6127fa8e55c6258ed1b7eabcee/diff.go#L234-L240

    I.e the

    for scan < len(nbuf) { 
    

    line of code.

    If I pass a channel into this function, and then inside the for loop, do a switch case can I stop the diff safely and destroy whatever diffing has already occured and pass back a success message? Its just because on larger files diffing can take some time and I'd like to be able to stop it...

    Thanks!

    opened by amlwwalker 1
String-matching in Golang using the Knuth–Morris–Pratt algorithm (KMP)

gokmp String-matching in Golang using the Knuth–Morris–Pratt algorithm (KMP). Disclaimer This library was written as part of my Master's Thesis and sh

Patrick-Ranjit D. Madsen 38 Dec 16, 2021
RFC 4566 SDP implementation in go

SDP Package sdp implements SDP: Session Description Protocol [RFC4566]. Complies to gortc principles as core package. Examples See examples folder. Al

null 114 Jun 7, 2022
Templating system for HTML and other text documents - go implementation

FAQ What is Kasia.go? Kasia.go is a Go implementation of the Kasia templating system. Kasia is primarily designed for HTML, but you can use it for any

Michał Derkacz 74 Mar 15, 2022
A golang implementation of Norvig's segmenter

A Go language implementation of the Norvig segmenter, given in this pdf. Licensed WTFPL; please use this code in any way you would like. func MakeWord

Bill Mill 14 Sep 14, 2020
A diff3 text merge implementation in Go

Diff3 A diff3 text merge implementation in Go based on the awesome paper below. "A Formal Investigation of Diff3" by Sanjeev Khanna, Keshav Kunal, and

Keenan Nemetz 19 Apr 4, 2022
Fastest levenshtein implementation in Go.

fast-levenshtein ?? Fastest levenshtein implementation in Go. Measure the difference between two strings. note: this implementation is currently not t

null 113 May 21, 2022
Go (golang) implementation of http://www.hashids.org

go-hashids Go (golang) v1 implementation of http://www.hashids.org under MIT License (same as the original implementations) Original implementations b

Rémi Gillig 1.1k Jun 28, 2022
Eunomia is a distributed application framework that support Gossip protocol, QuorumNWR algorithm, PBFT algorithm, PoW algorithm, and ZAB protocol and so on.

Introduction Eunomia is a distributed application framework that facilitates developers to quickly develop distributed applications and supports distr

Cong 2 Sep 28, 2021
Go-enum-algorithm - Implement an enumeration algorithm in GO

go-enum-algorithm implement an enumeration algorithm in GO run the code go run m

Leon 1 Feb 15, 2022
Go implementation of the A* search algorithm

go-astar A* pathfinding implementation for Go The A* pathfinding algorithm is a pathfinding algorithm noted for its performance and accuracy and is co

Michael Alexander 502 Jun 12, 2022
A native Go clean room implementation of the Porter Stemming algorithm.

Go Porter Stemmer A native Go clean room implementation of the Porter Stemming Algorithm. This algorithm is of interest to people doing Machine Learni

Charles Iliya Krempeaux 179 Oct 15, 2021
Golang implementation of the Paice/Husk Stemming Algorithm

##Golang Implementation of the Paice/Husk stemming algorithm This project was created for the QUT course INB344. Details on the algorithm can be found

Aaron Groves 28 Jan 23, 2022
Golang implementation of the Paice/Husk Stemming Algorithm

##Golang Implementation of the Paice/Husk stemming algorithm This project was created for the QUT course INB344. Details on the algorithm can be found

Aaron Groves 28 Jan 23, 2022
Fast (linear time) implementation of the Gaussian Blur algorithm in Go.

Song2 Fast (linear time) implementation of the Gaussian Blur algorithm in Go.

Masaya Watanabe 49 Apr 24, 2022
A Go implementation of the 64-bit xxHash algorithm (XXH64)

xxhash xxhash is a Go implementation of the 64-bit xxHash algorithm, XXH64. This is a high-quality hashing algorithm that is much faster than anything

Caleb Spare 1.2k Jun 17, 2022
Golang implementation of Sliding Window Algorithm for distributed rate limiting.

slidingwindow Golang implementation of Sliding Window Algorithm for distributed rate limiting. Installation $ go get -u github.com/RussellLuo/slidingw

Luo Peng 312 Jun 17, 2022
Implementation of Boyer-Moore fast string search algorithm in Go

boyermoore Implementation of Boyer-Moore fast string search algorithm in Go

sarp dağ demirel 49 Jun 7, 2022
k-means clustering algorithm implementation written in Go

kmeans k-means clustering algorithm implementation written in Go What It Does k-means clustering partitions a multi-dimensional data set into k cluste

Christian Muehlhaeuser 376 Jun 14, 2022
A Go implementation of the core algorithm in paper

Boolean Expression Indexer Go library A Go implementation of the core algorithm in paper <Indexing Boolean Expression>, which already supports the fol

wangyi 48 May 22, 2022
Go implementation of the JWZ email threading algorithm

The JWZ Threading algorithm written in Go This is an open source Go implementation of the widely known JWZ message threading algorithm originally writ

GatherStars 21 Jun 7, 2022
A faster RWLock primitive in Go, 2-3 times faster than RWMutex. A Go implementation of concurrency control algorithm in paper

Go Left Right Concurrency A Go implementation of the left-right concurrency control algorithm in paper <Left-Right - A Concurrency Control Technique w

wangyi 40 Apr 4, 2022
Go implementation of Donald Knuth's Algorithm 7.2.2.1C for exact cover with colors.

go-dlx Go implementation of Donald Knuth's Algorithm 7.2.2.1C for exact cover with colors. This code is based on the Algorithm C described in http://w

Soojin Nam 2 Dec 4, 2021
A naive implementation of Raft consensus algorithm.

This implementation is used to learn/understand the Raft consensus algorithm. The code implements the behaviors shown in Figure 2 of the Raft paper wi

Martin 0 Dec 3, 2021
Golang implementation of the Optimal Reciprocal Collision Avoidance (ORCA) algorithm

go-orca Golang implementation of the Optimal Reciprocal Collision Avoidance (ORCA) algorithm Disclaimer This project is under active development and i

DownFlux 36 Jun 11, 2022
An implementation of the consensus algorithm Map Reduce.

An implementation of the consensus algorithm Map Reduce. Framework written by Professor Matthew. Implemented by Makara Teu.

Makara Teu 1 May 3, 2022
This is my implementation of Raft consensus algorithm that I did for own learning.

This is my implementation of Raft consensus algorithm that I did for own learning. Please follow the link to learn more about raft consensus algorithm https://raft.github.io. And Soon, I will be developing same algorithm in Java as well

Umar Tahir 1 Jan 12, 2022
Implementation of RFC-6238 (Time-Based One-Time Password Algorithm) in Go.

TOTP TOTP (RFC-6238) implementation in Go with no external dependencies. INSTALL You can do little copying the totp.go file or add this package as Go

Sarjono Mukti Aji 1 Jan 18, 2022
Ratelimit - This package provides a Golang implementation of the leaky-bucket rate limit algorithm

Go rate limiter This package provides a Golang implementation of the leaky-bucke

gofaquan 1 Feb 16, 2022
Implementation of the Feynman algorithm to solve any problem!

Feynman Algorithm Allegedly coined in jest by Murray Gell-Mann to describe Richard Feynman's incredible problem solving ability, this simple algorithm

Jack 1 Mar 16, 2022