Add an interface for bspatch reader
Add a wrapper class to separate the patch read from data stream
decompression. Therefore, bspatch will be able to process the patch
that is compressed with various tools.
Test: unittest pass
Change-Id: I5214e0451bde80366e8a70b960703afb2b2a7d97
diff --git a/Makefile b/Makefile
index c3ecc85..f32bba1 100644
--- a/Makefile
+++ b/Makefile
@@ -43,12 +43,15 @@
# "bspatch" program.
bspatch_src_files := \
bspatch.cc \
+ bz2_decompressor.cc \
buffer_file.cc \
extents.cc \
extents_file.cc \
file.cc \
memory_file.cc \
- sink_file.cc
+ patch_reader.cc \
+ sink_file.cc \
+ utils.cc
# Unit test files.
bsdiff_common_unittests := \
@@ -57,6 +60,7 @@
diff_encoder_unittest.cc \
extents_file_unittest.cc \
extents_unittest.cc \
+ patch_reader_unittest.cc \
patch_writer_unittest.cc \
split_patch_writer_unittest.cc \
suffix_array_index_unittest.cc \