From efa62d959cf8f225477ab85d8ff42d5150007cf8 Mon Sep 17 00:00:00 2001 From: Amin Hassani Date: Thu, 9 Nov 2017 13:46:56 -0800 Subject: update_engine: Adds BROTLI_BSDIFF operation Brotli compression creates on average 10%-20% smaller output than bzip2 in addition to having faster decompressor. With recent changes in bsdiff to compress the its patch with brotli, we can use it in the update_engine as a new operation BROTLI_BSDIFF. This operation will be turned on in minor version 4. However, this CL only adds support for it in the client. It will not generate BROTLI_BSDIFF operations yet. BUG=chromium:783437 TEST=unittests pass for both update_engine and update_payload; 'brillo_update_payload {generate|verify}' passes; 'scripts/paycheck.py payload.delta' passes; Change-Id: Ie791ba5431561c95de6fbc031a8196dbfd912288 Reviewed-on: https://chromium-review.googlesource.com/764791 Commit-Ready: Amin Hassani Tested-by: Amin Hassani Reviewed-by: Ben Chan --- scripts/update_payload/common.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'scripts/update_payload/common.py') diff --git a/scripts/update_payload/common.py b/scripts/update_payload/common.py index bab8a4f0..eaf06115 100644 --- a/scripts/update_payload/common.py +++ b/scripts/update_payload/common.py @@ -46,8 +46,9 @@ class OpType(object): DISCARD = _CLASS.DISCARD REPLACE_XZ = _CLASS.REPLACE_XZ PUFFDIFF = _CLASS.PUFFDIFF + BROTLI_BSDIFF = _CLASS.BROTLI_BSDIFF ALL = (REPLACE, REPLACE_BZ, MOVE, BSDIFF, SOURCE_COPY, SOURCE_BSDIFF, ZERO, - DISCARD, REPLACE_XZ, PUFFDIFF) + DISCARD, REPLACE_XZ, PUFFDIFF, BROTLI_BSDIFF) NAMES = { REPLACE: 'REPLACE', REPLACE_BZ: 'REPLACE_BZ', @@ -59,6 +60,7 @@ class OpType(object): DISCARD: 'DISCARD', REPLACE_XZ: 'REPLACE_XZ', PUFFDIFF: 'PUFFDIFF', + BROTLI_BSDIFF: 'BROTLI_BSDIFF', } def __init__(self): -- cgit v1.2.3