pub fn read_u32v_le(dst: &mut [u32], input: &[u8]) {
    assert!(dst.len() * 4 == input.len());
    unsafe {
        let mut x: *mut u32 = dst.get_unchecked_mut(0);
        let mut y: *const u8 = input.get_unchecked(0);
        for _ in 0..dst.len() {
            let mut tmp: u32 = mem::uninitialized();
            ptr::copy_nonoverlapping(y, &mut tmp as *mut _ as *mut u8, 4);
            *x = u32::from_le(tmp);
            x = x.offset(1);
            y = y.offset(4);
        }
    }
}
/// Read a vector of bytes into a vector of u32s. The values are read in
/// little-endian format.
Read a vector of bytes into a vector of u32s. The values are read in
little-endian format.
Read a vector of bytes into a vector of u32s . The values are read in little - endian format .
pub fn read_u32v_le(dst: &mut [u32], input: &[u8]) {
    assert!(dst.len() * 4 == input.len());
    unsafe {
        let mut x: *mut u32 = dst.get_unchecked_mut(0);
        let mut y: *const u8 = input.get_unchecked(0);
        for _ in 0..dst.len() {
            let mut tmp: u32 = mem::uninitialized();
            ptr::copy_nonoverlapping(y, &mut tmp as *mut _ as *mut u8, 4);
            *x = u32::from_le(tmp);
            x = x.offset(1);
            y = y.offset(4);
        }
    }
}
pub fn read_u32v_le ( dst : & mut [ u32 ] , input : & [ u8 ] ) { assert ! ( dst len ( ) 4 input len ( ) ) ; unsafe { let mut x : * mut u32 = dst . get_unchecked_mut ( 0 ) ; let mut y : * const u8 = input . get_unchecked ( 0 ) ; for _ in 0 .. dst . len ( ) { let mut tmp : u32 = mem :: uninitialized ( ) ; ptr :: copy_nonoverlapping ( y , & mut tmp as * mut _ as * mut u8 , 4 ) ; * x = u32 :: from_le ( tmp ) ; x = x . offset ( 1 ) ; y = y . offset ( 4 ) ; } } }
Read a vector of bytes into a vector of u32s.
Read a vector of bytes into a vector of u32s .
dst
&mut [u32]
input
&[u8]
dst
&mut [u32]
input
&[u8]