smartfile/python-librsync — pull request #5 by shawnh310 (2014-09-02 06:55:30+00:00)
Title: fix read_cb bug, the modified version should be correct using the latest...

import librsync
import os
from cStringIO import StringIO

src = 'FF'
print src
dst = 'FF123FF'
print dst
src_sig = librsync.signature(StringIO(src))
delta = librsync.delta(StringIO(dst), src_sig).read()
print delta
out = librsync.patch(StringIO(src), StringIO(delta))
print out.read()

The output from original code is:
FF
FF123FF
rs6AFF123E
FF123

Patched output is FF123 but should be FF123FF.

This pull request fixed this issue.