Debian Codegraph @

ext/zlib-ng/crc32_fold.h

raw symbols SCIP
1 /* crc32_fold.h -- crc32 folding interface
2 * Copyright (C) 2021 Nathan Moinvaziri
3 * For conditions of distribution and use, see copyright notice in zlib.h
4 */
5 #ifndef CRC32_FOLD_H_
6 #define CRC32_FOLD_H_
7
8 #define CRC32_FOLD_BUFFER_SIZE (16 * 4)
9 /* sizeof(__m128i) * (4 folds) */
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