News for hackers. Stuff that matters.
Re:Efficient game updates by arjie on Tuesday February 21, 2017 @03:42AM (#13694237)
The rsync example confuses me a little bit. If you add a single bit to the front, then all the bytes are shifted into different blocks and nearly none will hash to match. But if you add a single bit, rsync still performs well. Can someone explain why that difference from the explanation?

The problem also applies to the binary delta. Adding a prefix will shift everything forward causing a diff in everything.

Bsdiff solves this with the suffix sorting. But what does rsync do? Or am I just wrong that rsync still works well? In either case, I think the offset problem makes for a more interesting motivating example for bsdiff.

Re:Efficient game updates by rbehrends on Tuesday February 21, 2017 @04:10AM (#13694342)
The rsync algorithm divides the file into fixed size blocks only on the sending side, then calculates checksums for all blocks. On the receiving side, it tries to match them at all offsets, not just multiples of the block size.

Thus, in your example, the first (and possibly the last) block won't be found, but all other blocks will be found, shifted by an offset of 1.

Re:Efficient game updates by arjie on Tuesday February 21, 2017 @04:18AM (#13694369)
Ah, seems obvious now that you say it. Thanks!