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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
//! # CRC-128
//!
//! ## Processing using no lookup table, single byte per step
//!
//!
//! ```
//! use crcxx::crc128::{*, catalog::CRC_82_DARC};
//!
//! const CRC: Crc<NoLookupTable> = Crc::<NoLookupTable>::new(&CRC_82_DARC);
//!
//! fn main() {
//! // singlepart data.
//! let crc = CRC.compute(b"123456789");
//! assert_eq!(crc, 0x9EA8_3F62_5023_801F_D612);
//!
//! // Multipart data.
//! let mut multipart = CRC.compute_multipart();
//! multipart.update(b"1234");
//! multipart.update(b"5678");
//! multipart.update(b"9");
//!
//! let crc = multipart.value();
//! assert_eq!(crc, 0x9EA8_3F62_5023_801F_D612);
//! }
//! ```
//! ## Processing using a lookup table with 32 entries, single byte per step
//!
//! ```
//! use crcxx::crc128::{*, catalog::CRC_82_DARC};
//!
//! const CRC: Crc<LookupTable32> = Crc::<LookupTable32>::new(&CRC_82_DARC);
//!
//! fn main() {
//! // singlepart data.
//! let crc = CRC.compute(b"123456789");
//! assert_eq!(crc, 0x9EA8_3F62_5023_801F_D612);
//!
//! // Multipart data.
//! let mut multipart = CRC.compute_multipart();
//! multipart.update(b"1234");
//! multipart.update(b"5678");
//! multipart.update(b"9");
//!
//! let crc = multipart.value();
//! assert_eq!(crc, 0x9EA8_3F62_5023_801F_D612);
//! }
//! ```
//! ## Processing using a lookup table with 256 entries, single byte per step
//!
//! ```
//! use crcxx::crc128::{*, catalog::CRC_82_DARC};
//!
//! const CRC: Crc<LookupTable256> = Crc::<LookupTable256>::new(&CRC_82_DARC);
//!
//! fn main() {
//! // singlepart data.
//! let crc = CRC.compute(b"123456789");
//! assert_eq!(crc, 0x9EA8_3F62_5023_801F_D612);
//!
//! // Multipart data.
//! let mut multipart = CRC.compute_multipart();
//! multipart.update(b"1234");
//! multipart.update(b"5678");
//! multipart.update(b"9");
//!
//! let crc = multipart.value();
//! assert_eq!(crc, 0x9EA8_3F62_5023_801F_D612);
//! }
//! ```
//! ## Processing using a lookup table with 256 x SLICES entries, multiple bytes per step
//!
//! ```
//! use crcxx::crc128::{*, catalog::CRC_82_DARC};
//!
//! const SLICES: usize = 16;
//! const CRC: Crc<LookupTable256xN<SLICES>> =
//! Crc::<LookupTable256xN<SLICES>>::new(&CRC_82_DARC);
//!
//! fn main() {
//! // singlepart data.
//! let crc = CRC.compute(b"123456789");
//! assert_eq!(crc, 0x9EA8_3F62_5023_801F_D612);
//!
//! // Multipart data.
//! let mut multipart = CRC.compute_multipart();
//! multipart.update(b"1234");
//! multipart.update(b"5678");
//! multipart.update(b"9");
//!
//! let crc = multipart.value();
//! assert_eq!(crc, 0x9EA8_3F62_5023_801F_D612);
//! }
//! ```
use crate*;
use crate::;
type Register = u128;
pub type NoLookupTable = ;
pub type LookupTable32 = ;
pub type LookupTable256 = ;
pub type LookupTable256xN<const S: usize> = ;
imp_crc_initialize!;
imp_crc_finalize!;
imp_crc_no_lut!;
imp_crc_lut_32!;
imp_crc_lut_256!;
imp_crc_lut_256x_n!;
imp_crc_lut_256x_n!;