pub fn zero_extend_u16(params: &[u16], lengths: &[u8]) -> u32 {
    assert_eq!(params.len(), lengths.len());

    let mut result: u32 = 0;
    let mut shift = 0;
    for (param, length) in params.iter().rev().zip(lengths.iter().rev()) {
        result += u32::from(*param) << shift;
        shift += length;
    }

    result
}
///
/// zero extend n parameters to n bit lengths
/// TODO: make generic
///
zero extend n parameters to n bit lengths
TODO: make generic
zero extend n parameters to n bit lengths TODO : make generic
pub fn zero_extend_u16(params: &[u16], lengths: &[u8]) -> u32 {
    assert_eq!(params.len(), lengths.len());
    let mut result: u32 = 0;
    let mut shift = 0;
    for (param, length) in params.iter().rev().zip(lengths.iter().rev()) {
        result += u32::from(*param) << shift;
        shift += length;
    }
    result
}
pub fn zero_extend_u16 ( params : & [ u16 ] , lengths : & [ u8 ] ) -> u32 { assert_eq ! ( params len ( ) lengths len ( ) ) ; let mut result : u32 = 0 ; let mut shift = 0 ; for ( param , length ) in params . iter ( ) . rev ( ) . zip ( lengths . iter ( ) . rev ( ) ) { result += u32 :: from ( * param ) << shift ; shift += length ; } result }
zero extend n parameters to n bit lengths
TODO: make generic
zero extend n parameters to n bit lengths TODO : make generic
params
&[u16]
lengths
&[u8]
params
&[u16]
lengths
&[u8]