MCPcopy Create free account
hub / github.com/comaps/comaps / CalculateCrc

Function CalculateCrc

3party/bsdiff-courgette/bsdiff/bsdiff.h:114–119  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

112};
113
114inline uint32_t CalculateCrc(const uint8_t* buffer, size_t size) {
115 // Calculate Crc by calling CRC method in zlib
116 const auto size32 = base::checked_cast<uint32_t>(size);
117 const uint32_t crc = base::checked_cast<uint32_t>(crc32(0, buffer, size32));
118 return ~crc;
119}
120
121// Creates a binary patch.
122template <typename OldReader, typename NewReader, typename PatchSink>

Callers 2

CreateBinaryPatchFunction · 0.85
ApplyBinaryPatchFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected