#include "components/zucchini/patch_reader.h"
#include <type_traits>
#include <utility>
#include "base/numerics/safe_conversions.h"
#include "components/zucchini/algorithm.h"
#include "components/zucchini/crc32.h"
#include "components/zucchini/element_detection.h"
#include "components/zucchini/version_info.h"
namespace zucchini {
namespace patch {
bool ParseElementMatch(BufferSource* source, ElementMatch* element_match) { … }
bool ParseBuffer(BufferSource* source, BufferSource* buffer) { … }
}
EquivalenceSource::EquivalenceSource() = default;
EquivalenceSource::EquivalenceSource(const EquivalenceSource&) = default;
EquivalenceSource::~EquivalenceSource() = default;
bool EquivalenceSource::Initialize(BufferSource* source) { … }
std::optional<Equivalence> EquivalenceSource::GetNext() { … }
ExtraDataSource::ExtraDataSource() = default;
ExtraDataSource::ExtraDataSource(const ExtraDataSource&) = default;
ExtraDataSource::~ExtraDataSource() = default;
bool ExtraDataSource::Initialize(BufferSource* source) { … }
std::optional<ConstBufferView> ExtraDataSource::GetNext(offset_t size) { … }
RawDeltaSource::RawDeltaSource() = default;
RawDeltaSource::RawDeltaSource(const RawDeltaSource&) = default;
RawDeltaSource::~RawDeltaSource() = default;
bool RawDeltaSource::Initialize(BufferSource* source) { … }
std::optional<RawDeltaUnit> RawDeltaSource::GetNext() { … }
ReferenceDeltaSource::ReferenceDeltaSource() = default;
ReferenceDeltaSource::ReferenceDeltaSource(const ReferenceDeltaSource&) =
default;
ReferenceDeltaSource::~ReferenceDeltaSource() = default;
bool ReferenceDeltaSource::Initialize(BufferSource* source) { … }
std::optional<int32_t> ReferenceDeltaSource::GetNext() { … }
TargetSource::TargetSource() = default;
TargetSource::TargetSource(const TargetSource&) = default;
TargetSource::~TargetSource() = default;
bool TargetSource::Initialize(BufferSource* source) { … }
std::optional<offset_t> TargetSource::GetNext() { … }
PatchElementReader::PatchElementReader() = default;
PatchElementReader::PatchElementReader(PatchElementReader&&) = default;
PatchElementReader::~PatchElementReader() = default;
bool PatchElementReader::Initialize(BufferSource* source) { … }
bool PatchElementReader::ValidateEquivalencesAndExtraData() { … }
std::optional<EnsemblePatchReader> EnsemblePatchReader::Create(
ConstBufferView buffer) { … }
EnsemblePatchReader::EnsemblePatchReader() = default;
EnsemblePatchReader::EnsemblePatchReader(EnsemblePatchReader&&) = default;
EnsemblePatchReader::~EnsemblePatchReader() = default;
bool EnsemblePatchReader::Initialize(BufferSource* source) { … }
bool EnsemblePatchReader::CheckOldFile(ConstBufferView old_image) const { … }
bool EnsemblePatchReader::CheckNewFile(ConstBufferView new_image) const { … }
}