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
//! ACE CRC implementation
//!
//! ACE uses a standard CRC-32 (polynomial 0xEDB88320, reflected),
//! but with inverted output. The CRC-16 is the lower 16 bits of this CRC-32.
/// CRC-32 lookup table (standard polynomial 0xEDB88320, reflected)
const CRC32_TABLE: = ;
/// Calculate ACE CRC-32 checksum
///
/// ACE CRC-32 uses standard CRC-32 polynomial (0xEDB88320, reflected)
/// with init=0xFFFFFFFF but NO final XOR (unlike standard CRC-32)
/// Calculate ACE CRC-16 checksum
///
/// ACE CRC-16 is the lower 16 bits of the ACE CRC-32