Add XorExtentWriter
This class is built on top of BlockExtentWriter(block aligned writer)
and ExtentMap. It will look at the extent map, convert blocks in the
extent map to XOR type, and convert everythign else to COW_REPLACE.
Test: th
Bug: 177104308
Change-Id: I6f9df83ed09f1c5a6aae9f266412132b002acd29
diff --git a/common/utils.h b/common/utils.h
index 4e78097..9ed0c7b 100644
--- a/common/utils.h
+++ b/common/utils.h
@@ -36,6 +36,7 @@
#include <brillo/key_value_store.h>
#include <brillo/secure_blob.h>
+#include "android-base/mapped_file.h"
#include "update_engine/common/action.h"
#include "update_engine/common/action_processor.h"
#include "update_engine/common/constants.h"
@@ -357,6 +358,8 @@
ErrorCode IsTimestampNewer(const std::string& old_version,
const std::string& new_version);
+std::unique_ptr<android::base::MappedFile> GetReadonlyZeroBlock(size_t size);
+
} // namespace utils
// Utility class to close a file descriptor