imgdiff: cache bsdiff suffix array in zip mode.

In zip mode, if a chunk is not deflate or its filename can't be found
in source chunks, the entire source file is used as old data for bsdiff,
To avoid repeatedly construct the suffix array used by bsdiff, we cache
the suffix array of the entire source file.

Bug: 34281147
Test: =time -v imgdiff -z Chrome-ORF74B.apk Chrome-ORF76B.apk Chrome.imgdiff
Change-Id: Ifd957ccecf7226fcb44dbf28c58969a06ef74f4b
This commit is contained in:
Sen Jiang
2017-01-18 17:26:42 -08:00
parent 13d15af08f
commit 930edb6661
2 changed files with 20 additions and 16 deletions
+3 -3
View File
@@ -124,6 +124,8 @@ libimgdiff_cflags := \
libimgdiff_static_libraries := \
libbsdiff \
libdivsufsort \
libdivsufsort64 \
libbase \
libz
@@ -166,7 +168,5 @@ LOCAL_CFLAGS := -Werror
LOCAL_STATIC_LIBRARIES := \
libimgdiff \
$(libimgdiff_static_libraries) \
libbz \
libdivsufsort \
libdivsufsort64
libbz
include $(BUILD_HOST_EXECUTABLE)