fn crc32c_slice8(mut buf: &[u8]) -> u32 {
    let tab = &*TABLE;
    let tab8 = &*TABLE16;
    let mut bytes = [0u8; 4];
    let mut crc: u32 = !0;
    while buf.len() >= 8 {
        bytes.copy_from_slice(&buf[0..4]);
        crc ^= u32::from_le_bytes(bytes);
        crc = tab8[0][buf[7] as usize]
            ^ tab8[1][buf[6] as usize]
            ^ tab8[2][buf[5] as usize]
            ^ tab8[3][buf[4] as usize]
            ^ tab8[4][(crc >> 24) as u8 as usize]
            ^ tab8[5][(crc >> 16) as u8 as usize]
            ^ tab8[6][(crc >> 8) as u8 as usize]
            ^ tab8[7][(crc) as u8 as usize];
        buf = &buf[8..];
    }
    for &b in buf {
        crc = tab[((crc as u8) ^ b) as usize] ^ (crc >> 8);
    }
    !crc
}
/// Returns the CRC32 checksum of `buf` using the Castagnoli polynomial.
Returns the CRC32 checksum of `buf` using the Castagnoli polynomial.
Returns the CRC32 checksum of ` buf ` using the Castagnoli polynomial .
fn crc32c_slice8(mut buf: &[u8]) -> u32 {
    let tab = &*TABLE;
    let tab8 = &*TABLE16;
    let mut bytes = [0u8; 4];
    let mut crc: u32 = !0;
    while buf.len() >= 8 {
        bytes.copy_from_slice(&buf[0..4]);
        crc ^= u32::from_le_bytes(bytes);
        crc = tab8[0][buf[7] as usize]
            ^ tab8[1][buf[6] as usize]
            ^ tab8[2][buf[5] as usize]
            ^ tab8[3][buf[4] as usize]
            ^ tab8[4][(crc >> 24) as u8 as usize]
            ^ tab8[5][(crc >> 16) as u8 as usize]
            ^ tab8[6][(crc >> 8) as u8 as usize]
            ^ tab8[7][(crc) as u8 as usize];
        buf = &buf[8..];
    }
    for &b in buf {
        crc = tab[((crc as u8) ^ b) as usize] ^ (crc >> 8);
    }
    !crc
}
fn crc32c_slice8 ( mut buf : & [ u8 ] ) -> u32 { let tab = & * TABLE ; let tab8 = & * TABLE16 ; let mut bytes = [ 0u8 ; 4 ] ; let mut crc : u32 = ! 0 ; while buf . len ( ) >= 8 { bytes . copy_from_slice ( & buf [ 0 .. 4 ] ) ; crc ^= u32 :: from_le_bytes ( bytes ) ; crc = tab8 [ 0 ] [ buf [ 7 ] as usize ] ^ tab8 [ 1 ] [ buf [ 6 ] as usize ] ^ tab8 [ 2 ] [ buf [ 5 ] as usize ] ^ tab8 [ 3 ] [ buf [ 4 ] as usize ] ^ tab8 [ 4 ] [ ( crc >> 24 ) as u8 as usize ] ^ tab8 [ 5 ] [ ( crc >> 16 ) as u8 as usize ] ^ tab8 [ 6 ] [ ( crc >> 8 ) as u8 as usize ] ^ tab8 [ 7 ] [ ( crc ) as u8 as usize ] ; buf = & buf [ 8 .. ] ; } for & b in buf { crc = tab [ ( ( crc as u8 ) ^ b ) as usize ] ^ ( crc >> 8 ) ; } ! crc }
Returns the CRC32 checksum of `buf` using the Castagnoli polynomial.
Returns the CRC32 checksum of ` buf ` using the Castagnoli polynomial .
buf
&[u8]