1f1cdb2b6baa562d9858fb2324a85382b9ea963e |
|
20-Nov-2017 |
Tianjie Xu <xunchang@google.com> |
Add an argument parser in bsdiff Add a parser of format, type and quality in the bsdiff main function. This allow the bsdiff binary to choose between the BSDFF40|BSDF2 patch format and compress the patch with desired algorithms. Bug: 34220646 Test: unittest pass; generate brotli compressed patches with bsdiff binary Change-Id: Ia4f7941e4eca7e6047e2749315127d1cf4a988ee
/external/bsdiff/patch_writer.h
|
b4cba64184d6cc745749b325430d838ff0b42bd7 |
|
15-Nov-2017 |
Tianjie Xu <xunchang@google.com> |
Implement a new bsdiff format Add a new BSDF2 format that allows compression of ctrl/diff/extra streams with different algorithms. The compression algorithm supported for now is bz2 and brotli. This new format is similar to the legacy "BSDIFF40" format except for the magic headers. File format: 0 8 magic header 8 8 X 16 8 Y 24 8 new_file_size 32 X compressed control block 32+X Y compressed diff block 32+X+Y ??? compressed extra block The magic header for BSDF2 format: 0 5 BSDF2 5 1 compressed type for control stream 6 1 compressed type for diff stream 7 1 compressed type for extra stream Bug: 34220646 Test: unittest pass Change-Id: I6eb0867e88476dbc4a4b7be609783f8c8a0a41cd
/external/bsdiff/patch_writer.h
|
1c26e2ed9bf8ae5cd9f4c5437fcfe0b131b4a7da |
|
27-Oct-2017 |
Tianjie Xu <xunchang@google.com> |
Add the brotli compressor for bsdiff Add a new compressor interface; and the brotli compressor which is similar to the existing bz2 one. Also add a new CompressorType argument to PatchWriter's init function; this allows us to choose the right compressor based on the input option in the future. Bug: 34220646 Test: Run bsdiff/bspatch with brotli compressor/decompressor over a list of files from angler's system image. Make succeeds. Change-Id: Id9a3db2d7d051dcb751a1fc362f4c3b9226e878b
/external/bsdiff/patch_writer.h
|
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/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/patch_writer.h
|
538a75d13b8061deb99f33c5766542d286563aad |
|
27-Sep-2017 |
Alex Deymo <deymo@google.com> |
Make BsdiffPatchWriter into an Interface. Currently, all bsdiff() functions take a filename for the patch, which is called with a temporary file in all cases. To help expose an interface that allows to write bsdiff patches in different formats (for example, changing the compressor and header format) we expose the PatchWriterInterface class in the public interface so callers can use a different one or define their own to help experimenting with bsdiff enconding improvements. Bug: 34220646 Test: make bsdiff and update_engine; ran bsdiff_unittest Change-Id: Ie450b2790137665bc033cb36d037171090b18a4b
/external/bsdiff/patch_writer.h
|
a28e01937d4828d19d9ee332f244fe6c4fe0841b |
|
08-Sep-2017 |
Alex Deymo <deymo@google.com> |
Refactor bsdiff patch writing code to another file. bsdiff.cc had code to handle both the sub-streams compression and the patch format. This CL moves the patch file format logic to a new class in a separated file, and the bzip2 compression to another class. This allows to replace the core bsdiff logic separatedly from the patch format. There are no changes to the functionality of bsdiff and the generated patches. The code does a bit more of memcpy() since it doesn't write the control stream to disk as it goes. Bug: 34220646 Test: Ran bsdiff and compared results with previous version. Change-Id: Ibdc1482e98cbd370cbed677c326008e19a217ef8
/external/bsdiff/patch_writer.h
|