Age | Commit message (Collapse) | Author |
|
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
|
|
The logger supports LOG & PLOG. It also adds a std::endl at the end of
the stream so that we don't need to add it manually at the callsite.
Test: run bsdiff and check the logs.
Change-Id: Ice94902a501532ceaeb480c3576e752e435cab70
|
|
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
|
|
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
|