summaryrefslogtreecommitdiff
path: root/patch_writer_factory.cc
diff options
context:
space:
mode:
authorAlex Deymo <deymo@google.com>2018-02-15 16:56:39 +0100
committerAlex Deymo <deymo@google.com>2018-02-15 17:37:56 +0100
commit19fc575d869148d6b33407b115f40bee9b22e244 (patch)
tree5ebd7b1f14c2c1b5cb5706e508a6d447e64c0163 /patch_writer_factory.cc
parent4fd22ea8b7093abd166f34e0385025b136be3acf (diff)
downloadbsdiff-19fc575d869148d6b33407b115f40bee9b22e244.tar.gz
Support compression in the Endsley format.
While compression is normally handled by a higher level in the Endsley format, this patch allows to optionally compress the patch here. This helps estimate the size of the compressed Endsley patch which is what ends up being transmitted. Bug: 71854816 Test: Added unittests, ran it from the command line Change-Id: I2bd068c62a7d6aa5b1c71c38dcfe45ef82b9c2f2
Diffstat (limited to 'patch_writer_factory.cc')
-rw-r--r--patch_writer_factory.cc11
1 files changed, 10 insertions, 1 deletions
diff --git a/patch_writer_factory.cc b/patch_writer_factory.cc
index 95bfe32..8c29bf2 100644
--- a/patch_writer_factory.cc
+++ b/patch_writer_factory.cc
@@ -24,8 +24,17 @@ std::unique_ptr<PatchWriterInterface> CreateBSDF2PatchWriter(
}
std::unique_ptr<PatchWriterInterface> CreateEndsleyPatchWriter(
+ std::vector<uint8_t>* patch,
+ CompressorType type,
+ int quality) {
+ return std::unique_ptr<PatchWriterInterface>(
+ new EndsleyPatchWriter(patch, type, quality));
+}
+
+std::unique_ptr<PatchWriterInterface> CreateEndsleyPatchWriter(
std::vector<uint8_t>* patch) {
- return std::unique_ptr<PatchWriterInterface>(new EndsleyPatchWriter(patch));
+ return std::unique_ptr<PatchWriterInterface>(
+ new EndsleyPatchWriter(patch, CompressorType::kNoCompression, 0));
}
} // namespace bsdiff