/// Calculates the crc-32 for rocket league replays. Not all CRC algorithms are the same. The crc
/// algorithm can be generated with the following parameters (pycrc):
///
/// - `Width` = 32
/// - `Poly` = 0x04c11db7
/// - `XorIn` = 0x10340dfe
/// - `ReflectIn` = False
/// - `XorOut` = 0xffffffff
/// - `ReflectOut` = False
///
/// It may be tempting to optimize this function to use slice by techniques, but I have not be able
/// to achieve this. pycrc disables slice by for non-reflected algorithms, and I couldn't get the
/// reversed model from reveng to pass the tests. I've wasted too much time trying to optimize this
/// function. I thought it would be worthwhile as when one is only interested in parsing a replay's
/// header and checking the crc, the crc computation is 100x more intensive than the header
/// parsing.
///
/// I've even tried to lookup the slice by 8 tables of `CRCTablesSB8` and
/// `CRCTablesSB8_DEPRECATED` from the unreal engine to glean any information on derivation or
/// usage. They can be found in the `AHRUnrealEngine` Github repo. I've copied them and the usage
/// in `MemCrc_DEPRECATED` faithfully, but no luck. This has been a teachable moment
Calculates the crc-32 for rocket league replays. Not all CRC algorithms are the same. The crc
algorithm can be generated with the following parameters (pycrc).



It may be tempting to optimize this function to use slice by techniques, but I have not be able
to achieve this. pycrc disables slice by for non-reflected algorithms, and I couldn't get the
reversed model from reveng to pass the tests. I've wasted too much time trying to optimize this
function. I thought it would be worthwhile as when one is only interested in parsing a replay's
header and checking the crc, the crc computation is 100x more intensive than the header
parsing.

I've even tried to lookup the slice by 8 tables of `CRCTablesSB8` and
`CRCTablesSB8_DEPRECATED` from the unreal engine to glean any information on derivation or
usage. They can be found in the `AHRUnrealEngine` Github repo. I've copied them and the usage
in `MemCrc_DEPRECATED` faithfully, but no luck. This has been a teachable moment
Calculates the crc - 32 for rocket league replays . Not all CRC algorithms are the same . The crc algorithm can be generated with the following parameters ( pycrc ) . It may be tempting to optimize this function to use slice by techniques but I have not be able to achieve this . pycrc disables slice by for non - reflected algorithms and I couldn ' t get the reversed model from reveng to pass the tests . I ' ve wasted too much time trying to optimize this function . I thought it would be worthwhile as when one is only interested in parsing a replay ' s header and checking the crc the crc computation is 100x more intensive than the header parsing . I ' ve even tried to lookup the slice by 8 tables of ` CRCTablesSB8 ` and ` CRCTablesSB8_DEPRECATED ` from the unreal engine to glean any information on derivation or usage . They can be found in the ` AHRUnrealEngine ` Github repo . I ' ve copied them and the usage in ` MemCrc_DEPRECATED ` faithfully but no luck . This has been a teachable moment
pub fn calc_crc(data: &[u8]) -> u32 {
    !data.iter().fold(!0xefcb_f201, |acc, &x| {
        (acc << 8) ^ (TABLE[((u32::from(x)) ^ (acc >> 24)) as usize])
    })
}
pub fn calc_crc ( data : & [ u8 ] ) -> u32 { ! data . iter ( ) . fold ( ! 0xefcb_f201 , | acc , & x | { ( acc << 8 ) ^ ( TABLE [ ( ( u32 :: from ( x ) ) ^ ( acc >> 24 ) ) as usize ] ) } ) }
Calculates the crc-32 for rocket league replays.
Calculates the crc - 32 for rocket league replays .
data
&[u8]