OXYGENHUB
# e8e6e0cac26a oxygen / vendor / crc-fast / src / consts.rs
3.0 KiB · Rust · last changed Strata: the cloud stores send through ureq, so every release target links 1 month ago source blame history raw
1
// Copyright 2025 Don MacAskill. Licensed under MIT or Apache-2.0.
2
3
#![allow(dead_code)]
4
5
// Constants for common values with semantic meaning
6
pub(crate) const CRC_CHUNK_SIZE: usize = 16;
7
pub(crate) const CRC_HALF_CHUNK_SIZE: usize = 8;
8
pub(crate) const CRC_LARGE_CHUNK_THRESHOLD: usize = 256;
9
10
pub const NAME_CRC16_ARC: &str = "CRC-16/ARC";
11
pub const NAME_CRC16_CDMA2000: &str = "CRC-16/CDMA2000";
12
pub const NAME_CRC16_CMS: &str = "CRC-16/CMS";
13
pub const NAME_CRC16_DDS_110: &str = "CRC-16/DDS-110";
14
pub const NAME_CRC16_DECT_R: &str = "CRC-16/DECT-R";
15
pub const NAME_CRC16_DECT_X: &str = "CRC-16/DECT-X";
16
pub const NAME_CRC16_DNP: &str = "CRC-16/DNP";
17
pub const NAME_CRC16_EN_13757: &str = "CRC-16/EN-13757";
18
pub const NAME_CRC16_GENIBUS: &str = "CRC-16/GENIBUS";
19
pub const NAME_CRC16_GSM: &str = "CRC-16/GSM";
20
pub const NAME_CRC16_IBM_3740: &str = "CRC-16/IBM-3740";
21
pub const NAME_CRC16_IBM_SDLC: &str = "CRC-16/IBM-SDLC";
22
pub const NAME_CRC16_ISO_IEC_14443_3_A: &str = "CRC-16/ISO-IEC-14443-3-A";
23
pub const NAME_CRC16_KERMIT: &str = "CRC-16/KERMIT";
24
pub const NAME_CRC16_LJ1200: &str = "CRC-16/LJ1200";
25
pub const NAME_CRC16_M17: &str = "CRC-16/M17";
26
pub const NAME_CRC16_MAXIM_DOW: &str = "CRC-16/MAXIM-DOW";
27
pub const NAME_CRC16_MCRF4XX: &str = "CRC-16/MCRF4XX";
28
pub const NAME_CRC16_MODBUS: &str = "CRC-16/MODBUS";
29
pub const NAME_CRC16_NRSC_5: &str = "CRC-16/NRSC-5";
30
pub const NAME_CRC16_OPENSAFETY_A: &str = "CRC-16/OPENSAFETY-A";
31
pub const NAME_CRC16_OPENSAFETY_B: &str = "CRC-16/OPENSAFETY-B";
32
pub const NAME_CRC16_PROFIBUS: &str = "CRC-16/PROFIBUS";
33
pub const NAME_CRC16_RIELLO: &str = "CRC-16/RIELLO";
34
pub const NAME_CRC16_SPI_FUJITSU: &str = "CRC-16/SPI-FUJITSU";
35
pub const NAME_CRC16_T10_DIF: &str = "CRC-16/T10-DIF";
36
pub const NAME_CRC16_TELEDISK: &str = "CRC-16/TELEDISK";
37
pub const NAME_CRC16_TMS37157: &str = "CRC-16/TMS37157";
38
pub const NAME_CRC16_UMTS: &str = "CRC-16/UMTS";
39
pub const NAME_CRC16_USB: &str = "CRC-16/USB";
40
pub const NAME_CRC16_X25: &str = "CRC-16/X-25";
41
pub const NAME_CRC16_XMODEM: &str = "CRC-16/XMODEM";
42
43
pub const NAME_CRC32_AIXM: &str = "CRC-32/AIXM";
44
pub const NAME_CRC32_AUTOSAR: &str = "CRC-32/AUTOSAR";
45
pub const NAME_CRC32_BASE91_D: &str = "CRC-32/BASE91-D";
46
pub const NAME_CRC32_BZIP2: &str = "CRC-32/BZIP2";
47
pub const NAME_CRC32_CD_ROM_EDC: &str = "CRC-32/CD-ROM-EDC";
48
pub const NAME_CRC32_CKSUM: &str = "CRC-32/CKSUM";
49
pub const NAME_CRC32_ISCSI: &str = "CRC-32/ISCSI";
50
pub const NAME_CRC32_ISO_HDLC: &str = "CRC-32/ISO-HDLC";
51
pub const NAME_CRC32_JAMCRC: &str = "CRC-32/JAMCRC";
52
pub const NAME_CRC32_MEF: &str = "CRC-32/MEF";
53
pub const NAME_CRC32_MPEG_2: &str = "CRC-32/MPEG-2";
54
pub const NAME_CRC32_XFER: &str = "CRC-32/XFER";
55
56
pub const NAME_CRC64_ECMA_182: &str = "CRC-64/ECMA-182";
57
pub const NAME_CRC64_GO_ISO: &str = "CRC-64/GO-ISO";
58
pub const NAME_CRC64_MS: &str = "CRC-64/MS";
59
pub const NAME_CRC64_NVME: &str = "CRC-64/NVME";
60
pub const NAME_CRC64_REDIS: &str = "CRC-64/REDIS";
61
pub const NAME_CRC64_WE: &str = "CRC-64/WE";
62
pub const NAME_CRC64_XZ: &str = "CRC-64/XZ";