summaryrefslogtreecommitdiff
path: root/bsdiff.cc
diff options
context:
space:
mode:
authorTianjie Xu <xunchang@google.com>2017-10-26 17:19:41 -0700
committerTianjie Xu <xunchang@google.com>2017-10-31 11:37:45 -0700
commit1c26e2ed9bf8ae5cd9f4c5437fcfe0b131b4a7da (patch)
tree096fdd8ac7d759c69e0b00853deafa9781615876 /bsdiff.cc
parente0c9ef7e0f842aec42f5ef6aaaa958d7955f20cc (diff)
downloadbsdiff-1c26e2ed9bf8ae5cd9f4c5437fcfe0b131b4a7da.tar.gz
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
Diffstat (limited to 'bsdiff.cc')
-rw-r--r--bsdiff.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/bsdiff.cc b/bsdiff.cc
index 01cd721..e5d1e7c 100644
--- a/bsdiff.cc
+++ b/bsdiff.cc
@@ -49,7 +49,7 @@ namespace bsdiff {
int bsdiff(const uint8_t* old_buf, size_t oldsize, const uint8_t* new_buf,
size_t newsize, const char* patch_filename,
SuffixArrayIndexInterface** sai_cache) {
- BsdiffPatchWriter patch(patch_filename);
+ BsdiffPatchWriter patch(patch_filename, CompressorType::kBZ2);
return bsdiff(old_buf, oldsize, new_buf, newsize, &patch, sai_cache);
}