#[inline]
pub(crate) fn le_u16(d: &[u8], o: usize) -> u16 {
let mut b = [0u8; 2];
if let Some(s) = d.get(o..o + 2) {
b.copy_from_slice(s);
}
u16::from_le_bytes(b)
}
#[inline]
pub(crate) fn le_u32(d: &[u8], o: usize) -> u32 {
let mut b = [0u8; 4];
if let Some(s) = d.get(o..o + 4) {
b.copy_from_slice(s);
}
u32::from_le_bytes(b)
}
#[inline]
pub(crate) fn le_u64(d: &[u8], o: usize) -> u64 {
let mut b = [0u8; 8];
if let Some(s) = d.get(o..o + 8) {
b.copy_from_slice(s);
}
u64::from_le_bytes(b)
}
#[inline]
pub(crate) fn le_arr16(d: &[u8], o: usize) -> [u8; 16] {
let mut b = [0u8; 16];
if let Some(s) = d.get(o..o + 16) {
b.copy_from_slice(s);
}
b
}