This commit is contained in:
2026-07-14 00:26:01 +02:00
commit a2f8c110c4
30 changed files with 3525 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
//
// Created by bruno on 13. 7. 2026.
//
#include "crc32.h"
uint32_t calcCRC32(
const uint8_t *data,
size_t len) {
uint32_t crc = 0xffffffff;
while (len--) {
crc ^= *data++;
for (int i = 0; i < 8; i++) {
if (crc & 1)
crc =
(crc >> 1)
^ 0xedb88320;
else
crc >>= 1;
}
}
return ~crc;
}