Support streaming for lz4 recompress
This reduces peak memory usage of update_engine from
~700MB to ~400MB. As we no longer need to cache the entire patched
blocks in memory, data are written to disk as they come.
Test: th
Change-Id: I7b353dbaee4ee63e984ec2014476e3d27387e0fc
diff --git a/common/utils.h b/common/utils.h
index 874d0af..201e47e 100644
--- a/common/utils.h
+++ b/common/utils.h
@@ -411,8 +411,8 @@
// integer.
// Return kPayloadTimestampError if both are integers but |new_version| <
// |old_version|.
-ErrorCode IsTimestampNewer(const std::string& old_version,
- const std::string& new_version);
+ErrorCode IsTimestampNewer(const std::string_view old_version,
+ const std::string_view new_version);
std::unique_ptr<android::base::MappedFile> GetReadonlyZeroBlock(size_t size);