| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
#ifndef CRC32_FOLD_H_ |
| 6 |
#define CRC32_FOLD_H_ |
| 7 |
|
| 8 |
#define CRC32_FOLD_BUFFER_SIZE (16 * 4) |
| 9 |
|
| 10 |
|
| 11 |
typedef struct crc32_fold_s { |
| 12 |
uint8_t fold[CRC32_FOLD_BUFFER_SIZE]; |
| 13 |
uint32_t value; |
| 14 |
} crc32_fold; |
| 15 |
|
| 16 |
Z_INTERNAL uint32_t crc32_fold_reset_c(crc32_fold *crc); |
| 17 |
Z_INTERNAL void crc32_fold_copy_c(crc32_fold *crc, uint8_t *dst, const uint8_t *src, uint64_t len); |
| 18 |
Z_INTERNAL void crc32_fold_c(crc32_fold *crc, const uint8_t *src, uint64_t len, uint32_t init_crc); |
| 19 |
Z_INTERNAL uint32_t crc32_fold_final_c(crc32_fold *crc); |
| 20 |
|
| 21 |
#endif |