#include "puffin/src/include/puffin/puffdiff.h"
#include <inttypes.h>
#include <string>
#include <vector>
#include "base/containers/span.h"
#include "base/files/file.h"
#include "base/files/file_path.h"
#include "base/logging.h"
#include "base/numerics/byte_conversions.h"
#include "zucchini/buffer_view.h"
#include "zucchini/patch_writer.h"
#include "zucchini/zucchini.h"
#include "puffin/file_stream.h"
#include "puffin/memory_stream.h"
#include "puffin/src/include/puffin/brotli_util.h"
#include "puffin/src/include/puffin/common.h"
#include "puffin/src/include/puffin/puffer.h"
#include "puffin/src/include/puffin/puffpatch.h"
#include "puffin/src/include/puffin/utils.h"
#include "puffin/src/logging.h"
#include "puffin/src/puffin.pb.h"
#include "puffin/src/puffin_stream.h"
string;
vector;
namespace puffin {
namespace {
template <typename T>
void CopyVectorToRpf(
const T& from,
google::protobuf::RepeatedPtrField<metadata::BitExtent>* to,
size_t coef) { … }
bool CreatePatch(const Buffer& raw_patch,
const vector<BitExtent>& src_deflates,
const vector<BitExtent>& dst_deflates,
const vector<ByteExtent>& src_puffs,
const vector<ByteExtent>& dst_puffs,
uint64_t src_puff_size,
uint64_t dst_puff_size,
PatchAlgorithm patchAlgorithm,
Buffer* patch) { … }
}
bool PuffDiff(UniqueStreamPtr src,
UniqueStreamPtr dst,
const vector<BitExtent>& src_deflates,
const vector<BitExtent>& dst_deflates,
const vector<puffin::CompressorType>& compressors,
PatchAlgorithm patchAlgorithm,
const string& tmp_filepath,
Buffer* patch) { … }
bool PuffDiff(UniqueStreamPtr src,
UniqueStreamPtr dst,
const std::vector<BitExtent>& src_deflates,
const std::vector<BitExtent>& dst_deflates,
const std::vector<puffin::CompressorType>& compressors,
const std::string& tmp_filepath,
Buffer* patch) { … }
bool PuffDiff(const Buffer& src,
const Buffer& dst,
const vector<BitExtent>& src_deflates,
const vector<BitExtent>& dst_deflates,
const vector<puffin::CompressorType>& compressors,
const string& tmp_filepath,
Buffer* patch) { … }
bool PuffDiff(const Buffer& src,
const Buffer& dst,
const vector<BitExtent>& src_deflates,
const vector<BitExtent>& dst_deflates,
const string& tmp_filepath,
Buffer* patch) { … }
Status PuffDiff(const string& src_file_path,
const string& dest_file_path,
const string& output_patch_path) { … }
}