-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathcrc32trim.h
106 lines (88 loc) · 1.81 KB
/
crc32trim.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
/* crc32trim.h
*
* Copyright (c) 2016-present Matt Cover
* All rights reserved.
*
* This source code is licensed under the zlib license found in the
* LICENSE file in the root directory of this source tree.
*/
#ifndef _CRC32TRIM_H_
#define _CRC32TRIM_H_
#ifdef __cplusplus
extern "C" {
#endif
extern unsigned long cksum_combine(
unsigned long crcA,
long lenA,
unsigned long crcB,
long lenB
);
extern unsigned long cksum_pop_len(
unsigned long crc,
long len
);
extern unsigned long cksum_push_len(
unsigned long crc,
long len
);
extern unsigned long cksum_trim_leading(
unsigned long crcAB,
long lenAB,
unsigned long crcA,
long lenA
);
extern unsigned long cksum_trim_trailing(
unsigned long crcAB,
long lenAB,
unsigned long crcB,
long lenB
);
extern unsigned long crc32_combine_nz(
unsigned long crcA,
unsigned long crcB,
long lenB
);
extern unsigned long crc32_trim_leading(
unsigned long crcAB,
unsigned long crcA,
long lenB
);
extern unsigned long crc32_trim_trailing(
unsigned long crcAB,
unsigned long crcB,
long lenB
);
extern unsigned long crc32c_combine(
unsigned long crcA,
unsigned long crcB,
long lenB
);
extern unsigned long crc32c_trim_leading(
unsigned long crcAB,
unsigned long crcA,
long lenB
);
extern unsigned long crc32c_trim_trailing(
unsigned long crcAB,
unsigned long crcB,
long lenB
);
extern unsigned long crc32posix_combine(
unsigned long crcA,
unsigned long crcB,
long lenB
);
extern unsigned long crc32posix_trim_leading(
unsigned long crcAB,
unsigned long crcA,
long lenB
);
extern unsigned long crc32posix_trim_trailing(
unsigned long crcAB,
unsigned long crcB,
long lenB
);
#ifdef __cplusplus
}
#endif
#endif // _CRC32TRIM_H_