Created
August 14, 2016 04:15
-
-
Save alanduan/5b59be7640892413cd3072fa294f388d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extern uint32_t crc32_table[]; | |
uint32_t | |
crc32(uint8_t *buf, size_t count, uint32_t crc) | |
{ | |
while (count--) | |
crc = crc32_table[(crc32 ^ *buf++) & 0xff] ^ crc32 >> 8; | |
return crc; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment