2 * COPYRIGHT (C) 1986 Gary S. Brown. You may use this program, or
3 * code or tables extracted from it, as desired without restriction.
11 #include <stdint.h> /* uint32_t */
12 #include <stdlib.h> /* size_t */
14 extern uint32_t crc32_tab[];
16 static __inline uint32_t
17 crc32(const void *buf, size_t size)
19 const uint8_t *p = buf;
24 crc = crc32_tab[(crc ^ *p++) & 0xFF] ^ (crc >> 8);
28 #endif /* !_CRC32_H_ */