/** Read four bytes from a byte slice as a little-endian u32 (pretend the slice is zero-padded). */
Read four bytes from a byte slice as a little-endian u32 (pretend the slice is zero-padded).
Read four bytes from a byte slice as a little - endian u32 ( pretend the slice is zero - padded ) .
fn read4pad(arr: &[u8], ofs: usize) -> u32 {
    u32::from_le_bytes([
        *arr.get(ofs + 0).unwrap_or(&0),
        *arr.get(ofs + 1).unwrap_or(&0),
        *arr.get(ofs + 2).unwrap_or(&0),
        *arr.get(ofs + 3).unwrap_or(&0),
    ])
}
fn read4pad ( arr : & [ u8 ] , ofs : usize ) -> u32 { u32 :: from_le_bytes ( [ * arr . get ( ofs + 0 ) . unwrap_or ( & 0 ) , * arr . get ( ofs + 1 ) . unwrap_or ( & 0 ) , * arr . get ( ofs + 2 ) . unwrap_or ( & 0 ) , * arr . get ( ofs + 3 ) . unwrap_or ( & 0 ) , ] ) }
Read four bytes from a byte slice as a little-endian u32 (pretend the slice is zero-padded).
Read four bytes from a byte slice as a little - endian u32 ( pretend the slice is zero - padded ) .
arr
&[u8]
ofs
usize