Use SuffixArrayIndexInterface opaque type instead of the underlying data pointer.

bsdiff interface is changing such that it hides the suffix array
pointer from the public interface. This allows to use a different
suffix array data size depending on the input size, running much faster
in the normal case.

Bug: 34220646
Test: `make checkbuild`; Ran an incremental update generation on a non-A/B device.
Change-Id: I78e766da56cf28bc7774b8c8e58527bc11d919fb
This commit is contained in:
Alex Deymo
2017-10-10 17:56:17 +02:00
parent 7a3fc2de8e
commit fa188268e4
3 changed files with 11 additions and 8 deletions
@@ -24,7 +24,7 @@
#include <string>
#include <vector>
#include <bsdiff.h>
#include <bsdiff/bsdiff.h>
#include <ziparchive/zip_archive.h>
#include <zlib.h>
@@ -98,7 +98,8 @@ class ImageChunk {
* repeatedly, pass nullptr if not needed.
*/
static bool MakePatch(const ImageChunk& tgt, const ImageChunk& src,
std::vector<uint8_t>* patch_data, saidx_t** bsdiff_cache);
std::vector<uint8_t>* patch_data,
bsdiff::SuffixArrayIndexInterface** bsdiff_cache);
private:
const uint8_t* GetRawData() const;