Git Product home page Git Product logo

binarydist's People

Contributors

byxor avatar kr avatar nbraud avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

binarydist's Issues

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:

binarydist/diff.go

Lines 234 to 240 in 190e7de

for scan < len(nbuf) {
var oldscore int
scan += length
for scsc := scan; scan < len(nbuf); scan++ {
pos, length = search(I, obuf, nbuf[scan:], 0, len(obuf))
for ; scsc < scan+length; scsc++ {

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!

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

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.