You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
479 B
19 lines
479 B
#ifndef CRC32_H |
|
#define CRC32_H |
|
|
|
#include <stdint.h> |
|
#include <stddef.h> |
|
|
|
// Initialize CRC32 table (called automatically on first use) |
|
void crc32_init(void); |
|
|
|
// Calculate CRC32 checksum |
|
uint32_t crc32_calc(const uint8_t *data, size_t len); |
|
|
|
// Calculate CRC32 with initial value |
|
uint32_t crc32_calc_ex(const uint8_t *data, size_t len, uint32_t initial_crc); |
|
|
|
// Update CRC32 incrementally |
|
uint32_t crc32_update(uint32_t crc, const uint8_t *data, size_t len); |
|
|
|
#endif // CRC32_H
|