ilanschnell/bsdiff4 — pull request #5 by thygrrr (2014-10-02 20:09:17+00:00)
Title: Fix for patch_inplace when the resulting file is smaller than before

Depending on the patch data, the resulting file could be smaller than before.

Since it is opened in append mode, seeking to 0 and writing the patch data would leave the remainder of the file untouched if the patched data was shorter than the original data.

Added the necessary f.truncate() statement. Cheers!