History log of /external/bsdiff/fake_patch_writer.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
4dadd8b4439358585be374226357b35aece52f17 26-Oct-2017 Alex Deymo <deymo@google.com> Pass the size of the new file to the PatchWriterInterface::Init()

Most patch formats include the size of the new file in the header.
To help streaming the patch to disk while generating it, this CL
passes the size of the new file to the patch writer on initialization.

To do this, we also move the Init() call to the patch writer to the
DiffEncoder, which makes more sense since the Close() call is also made
from the DiffEnconder.

Bug: None
Test: Updated tests to check for this value.
Change-Id: Idfaedbd492d68ab6e6cb2c1cb3883947f068c3aa
/external/bsdiff/fake_patch_writer.h
68c0e7f20623158c007735100b95f2ccbc468ad7 02-Oct-2017 Alex Deymo <deymo@google.com> Reduce PatchWriterInterface functionality.

The recently introduced PatchWriterInterface had both the patch file
format logic and the diff/extra streams selection from the control
entries. While this simplifies the bsdiff main algorithm and makes
invalid usages of the BsdiffPatchWriter evident, writing alternative
PatchWriterInterface classes required to replicate the diff/extra
stream selection logic.

This patch splits out the diff/extra stream generation and all the
checks around those to a new helper class DiffEncoder. The public
interface PatchWriterInterface now has two methods to accept the diff
and extra stream data, and does not compute them.

Bug: 34220646
Test: Added unittests. Ran bsdiff on some pairs of files obtaining the same result as before.
Change-Id: I5f303c06f1e10910eb00dcfda38c6811977a91cf
/external/bsdiff/fake_patch_writer.h
fb3b632fdebf18a93e137159c52bc90e4812318f 27-Sep-2017 Alex Deymo <deymo@google.com> Add unittest for the PatchWriter.

Split the unittest logic between bsdiff() function and the PatchWriter.
This patch now tests individually the PatchWriter logic that writes to
disk and the bsdiff() logic to create patches in the same very simple
cases.

We also update the Android.bp file to only pass -DBSDIFF_TARGET_UNITTEST
when building for the target.

Bug: 34220646
Test: ran unittests.

Change-Id: I9350157ee4a0b5a617f44bb187bd7652f6d6f017
/external/bsdiff/fake_patch_writer.h