update_engine: Use the bsdiff library instead of its executable
Currently we use bsdiff binary to generate BSDIFF and SOURCE_BSDIFF
operations. This involves writing both the source and destination
extents into disk and letting bsdiff read them again into memory. Now
that we actually can use the bsdiff library itself, why not use the
provided bsdiff library functions that can directly read source and
destination data from the memory that we already have. This CL will
reduce the patch generating time and memory footprint.
BUG=none
TEST=cros_workon_make --board=amd64-generic --test update_engine; \
brillo_update_payload generate --payload=payload.delta \
--target_image=veyron-minnie-R62-9804.0.0.bin --source_image=veyron_minnie-R61-9765.13.0.bin
Change-Id: Ib115eb5186c133d56dab91f73a2bde3176f5732d
Reviewed-on: https://chromium-review.googlesource.com/602887
Commit-Ready: Amin Hassani <ahassani@chromium.org>
Tested-by: Amin Hassani <ahassani@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>
4 files changed