summaryrefslogtreecommitdiff
path: root/bsdiff_arguments.h
AgeCommit message (Collapse)Author
2018-03-13Allow bsdiff to accept multiple compressorsTianjie Xu
We modified the patch writer to have the capability to produce the smallest patch if multiple compressors are given. This type is supported for bsdf2 format only. Example usage: bsdiff --format=bsdf2 --type=bz2:brotli <src_file> <tgt_file> <patch_file> Test: diff & patch an apk file Change-Id: Icd4322f21975b82c5ee09f8feb9321f52c9813a4
2018-03-02Rename the variable 'quality' to 'brotli_quality'Tianjie Xu
Right now the quality is only used in the brotli compressor. And it would be ambiguous if we add another compressor in the future; since the compressors may have different interpretion on the quality value. Test: unit tests pass; run bsdiff Change-Id: I23af06a135b2b47df5209171f7db0773ac02a326
2018-02-13Remove "using" from header files.Alex Deymo
Per style guide, we should not have global using clausules in header files since they polute the namespace for everybody including the header. Bug: None Test: It still builds. Change-Id: Id34b18fbed9e71e3c502e4a91c4d242e553b6f88
2018-02-12Allow to set the minimum required match length.Alex Deymo
The minimum required match length plays an important role in the current algorithm. This algorithm requires that the current match has at least 8 mismatches over a region where we find a new match, therefore imposing a minimum match length of at least 8 bytes. This patch allows to increase this minium value to avoid using small matches that only match a very small region. A larger value can improve the patch size, depending on the data, but a too large value will cause the algorithm to miss matches that were otherwise benefical. Bug: 73107113 Test: Added unittests. Ran it with different minlen values. Change-Id: Iac594fc1cd7ecd5cfdc676bdb6ebe7c626de6dcd
2018-01-18Add an argument parser in bsdiffTianjie Xu
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