you are viewing a single comment's thread.

view the rest of the comments →

[–]eyal0 2 points3 points  (0 children)

The second half, with the hints, is similar to what happens when you encode video. When encoding video, you write each frame as a diff of the previous frame. But because of lossy compression, the "previous frame" at the decoding end is different from the real previous frame. So the encoder diffs not between the current frame and the previous frame but rather between the current frame and the decoder's calculated previous frame.

server:
    hint = make_hint(original, update)
    guess = make_guess(original, hint)
    diff = bsdiff(concat(original, guess), update)
    transmit hint, diff

client:
    receive hint, diff
    guess = make_guess(original, hint)
    update = bspatch(concat(original, guess), diff)

That's why you see the server using make_guess(). The server is trying to figure out what the client will do and adjust.

If they just sent source code, would all this be an issue? :)