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/lz4diff/lz4patch.h b/lz4diff/lz4patch.h
index ce49430..8b99c23 100644
--- a/lz4diff/lz4patch.h
+++ b/lz4diff/lz4patch.h
@@ -21,6 +21,11 @@
#include "lz4diff_format.h"
namespace chromeos_update_engine {
+
+bool Lz4Patch(std::string_view src_data,
+ std::string_view patch_data,
+ const SinkFunc& sink);
+
bool Lz4Patch(std::string_view src_data,
std::string_view patch_data,
Blob* output);