25 virtual void apply(std::span<uint8_t> dst)
const = 0;
37 static inline size_t globalAllocSize = 0;
47 void apply(std::span<uint8_t> dst)
const override;
49 [[nodiscard]]
const uint8_t*
getData();
52 [[nodiscard]]
bool compressed()
const {
return compressedSize != 0; }
55 size_t compressedSize = 0;
63 std::span<const uint8_t> data);
64 void apply(std::span<uint8_t> dst)
const override;
68 const std::shared_ptr<DeltaBlockCopy> prev;
69 const std::vector<uint8_t> delta;
76 [[nodiscard]] std::shared_ptr<DeltaBlock>
createNew(
77 const void*
id, std::span<const uint8_t> data);
79 const void*
id, std::span<const uint8_t> data);
84 Info(
const void* id_,
size_t size_)
85 :
id(id_), size(size_) {}
89 std::weak_ptr<DeltaBlockCopy> ref;
90 std::weak_ptr<DeltaBlock> last;
94 std::vector<Info> infos;
const uint8_t * getData()
void apply(std::span< uint8_t > dst) const override
void compress(size_t size)
void apply(std::span< uint8_t > dst) const override
size_t getDeltaSize() const
virtual void apply(std::span< uint8_t > dst) const =0
virtual ~DeltaBlock()=default
std::shared_ptr< DeltaBlock > createNew(const void *id, std::span< const uint8_t > data)
std::shared_ptr< DeltaBlock > createNullDiff(const void *id, std::span< const uint8_t > data)
This class manages the lifetime of a block of memory.
This class represents the result of a sha1 calculation (a 160-bit value).
This file implemented 3 utility functions: