| 112 | }; |
| 113 | |
| 114 | inline 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. |
| 122 | template <typename OldReader, typename NewReader, typename PatchSink> |
no outgoing calls
no test coverage detected