Giter VIP home page Giter VIP logo

xferspdy's People

Contributors

monmohan 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

xferspdy's Issues

It doesn't work with large files (~40M in my case)

Thanks for the effort, but it looks that it doesn't work... At least not optimally. Here's my setup:

I have two binary files (DLLs), which have the exact same size (about 40M), and which differ very slightly. Here's the screenshot from BeyondCompare:

image

As you can see, the files differ only in very few bytes.

But when I've did the following (example from the documentation):

//Create fingerprint of a file
fingerprint := NewFingerprint("/path/foo_v1.binary", 1024)

//Say the file was updated
//Lets generate the diff
diff := NewDiff("/path/foo_v2.binary", *fingerprint)

I've found out that the resulting diff has more than 725,000 blocks (Block). Serialized in JSON the diff is about 9M. I've also tried with a smaller block size (64), and ended up with diff of 150M in JSON.

Sadly I cannot share the actual DLLs (company secret), but I believe that you can reproduce by using any DLL with a similar size, make a copy with few bytes changed here and there, and try.

goroutine stack exceeds 1000000000-byte limit

Hi,

First of all thank you for the great tool.
I've just tested it but got the error.
Possibly it's related to recursion in the code.

The command:

/home/bin/diff -fingerprint first_root.hdd.fingerprint -file root.hdd

The error:

runtime: goroutine stack exceeds 1000000000-byte limit
fatal error: stack overflow

runtime stack:
runtime.throw(0x51f188, 0xe)
	/usr/lib/golang/src/runtime/panic.go:566 +0x95
runtime.newstack()
	/usr/lib/golang/src/runtime/stack.go:1061 +0x416
runtime.morestack()
	/usr/lib/golang/src/runtime/asm_amd64.s:366 +0x7f

goroutine 1 [running]:
crypto/sha256.block(0xc4885304f0, 0xc46e2e01bf, 0x800, 0x841)
	/usr/lib/golang/src/crypto/sha256/sha256block_amd64.s:561 fp=0xc488530450 sp=0xc488530448
crypto/sha256.(*digest).Write(0xc4885304f0, 0xc46e2e01bf, 0x800, 0x841, 0x4ae844, 0xc4547bcc10, 0xc46e2ec760)
	/usr/lib/golang/src/crypto/sha256/sha256.go:119 +0x120 fp=0xc488530498 sp=0xc488530450
crypto/sha256.Sum256(0xc46e2e01bf, 0x800, 0x841, 0x0, 0x0, 0x0, 0x0)
	/usr/lib/golang/src/crypto/sha256/sha256.go:180 +0xca fp=0xc488530578 sp=0xc488530498
github.com/monmohan/xferspdy.processRolling(0x59d4e0, 0xc4547bcc10, 0xc457c05c00, 0x7d87be, 0x8c700000, 0x855eb48000000800, 0xc420018d20, 0xc455801120, 0x8, 0xc4a852fb10)
	/usr/src/github.com/monmohan/xferspdy/diff.go:92 +0x856 fp=0xc4885307d0 sp=0xc488530578```

diff over tcp

Hello,
You can use it on tcp connections.

Thank you

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.