crc-any 3.0.0

This crate computes CRC values from a bit width, a polynomial, a reflection setting, an initial value, and a final XOR value. It also provides many built-in CRC functions for common CRC variants.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/// This enum hold lookup table for static know or dynamic created table
pub(crate) enum LookUpTable<T: 'static> {
    Static(&'static [T]),
    Dynamic([T; 256]),
}

impl<T> core::ops::Deref for LookUpTable<T> {
    type Target = [T];

    fn deref(&self) -> &[T] {
        match *self {
            LookUpTable::Static(s) => s,
            LookUpTable::Dynamic(ref d) => d,
        }
    }
}