fn reverse_bits(builder: Builder, stk_size: &mut i64) -> Builder {
        let num_elems = 1;

        // following are 7 byte vectors required for reverse calculation
        let mask1_suffix = Vec::from([0x00u8, 0x00, 0xff, 0xff, 0xff]);
        let mask2_suffix = Vec::from([0x00, 0xffu8, 0xffu8, 0xffu8, 0x00u8, 0x00u8]);
        let mask3_suffix = Vec::from([0x00, 0x00, 0xffu8, 0x00u8, 0x00u8, 0x00u8, 0x00u8]);

        // Swap first two bytes
        let zero_byte_mask =
            vec![vec![0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0xffu8,]; num_elems];
        let zero_byte_mask: Vec<u8> = zero_byte_mask.into_iter().flatten().collect();
        // let zero_byte_mask = [&zero_byte_mask, &mask1_suffix[..]].concat();

        let builder = swap_bits(
            builder,
            &zero_byte_mask,
            &mask1_suffix,
            &mask2_suffix,
            &mask3_suffix,
        );

        *stk_size += 0;
        // Now there is a single string with three
        // Swap pairs of two bytes
        // let even_byte_mask2 =
        //     vec![vec![0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xffu8]; num_elems];
        // let even_byte_mask2: Vec<u8> = even_byte_mask2.into_iter().flatten().collect();
        // let even_byte_mask2 = [&three_byte_ones[..7], &even_byte_mask2].concat();

        // let odd_byte_mask2 = vec![vec![0xff, 0xff, 0x00, 0x00, 0xff, 0xffu8, 0x00, 0x00]; num_elems];
        // let odd_byte_mask2: Vec<u8> = odd_byte_mask2.into_iter().flatten().collect();
        // let odd_byte_mask2 = [&seven_byte_ones[..7], &odd_byte_mask2].concat();

        // let builder = swap_bits(builder, &even_byte_mask2, &odd_byte_mask2, 2);

        *stk_size += 0;

        builder
    }
// Assumes a pre-pended slice 0xff*7 + a + b where a and b need to be reversed
Assumes a pre-pended slice 0xff*7 + a + b where a and b need to be reversed
Assumes a pre - pended slice 0xff * 7 + a + b where a and b need to be reversed
fn reverse_bits(builder: Builder, stk_size: &mut i64) -> Builder {
        let num_elems = 1;
        // following are 7 byte vectors required for reverse calculation
        let mask1_suffix = Vec::from([0x00u8, 0x00, 0xff, 0xff, 0xff]);
        let mask2_suffix = Vec::from([0x00, 0xffu8, 0xffu8, 0xffu8, 0x00u8, 0x00u8]);
        let mask3_suffix = Vec::from([0x00, 0x00, 0xffu8, 0x00u8, 0x00u8, 0x00u8, 0x00u8]);
        // Swap first two bytes
        let zero_byte_mask =
            vec![vec![0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0xffu8,]; num_elems];
        let zero_byte_mask: Vec<u8> = zero_byte_mask.into_iter().flatten().collect();
        // let zero_byte_mask = [&zero_byte_mask, &mask1_suffix[..]].concat();
        let builder = swap_bits(
            builder,
            &zero_byte_mask,
            &mask1_suffix,
            &mask2_suffix,
            &mask3_suffix,
        );
        *stk_size += 0;
        // Now there is a single string with three
        // Swap pairs of two bytes
        // let even_byte_mask2 =
        //     vec![vec![0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xffu8]; num_elems];
        // let even_byte_mask2: Vec<u8> = even_byte_mask2.into_iter().flatten().collect();
        // let even_byte_mask2 = [&three_byte_ones[..7], &even_byte_mask2].concat();
        // let odd_byte_mask2 = vec![vec![0xff, 0xff, 0x00, 0x00, 0xff, 0xffu8, 0x00, 0x00]; num_elems];
        // let odd_byte_mask2: Vec<u8> = odd_byte_mask2.into_iter().flatten().collect();
        // let odd_byte_mask2 = [&seven_byte_ones[..7], &odd_byte_mask2].concat();
        // let builder = swap_bits(builder, &even_byte_mask2, &odd_byte_mask2, 2);
        *stk_size += 0;
        builder
    }
fn reverse_bits ( builder : Builder , stk_size : & mut i64 ) -> Builder { let num_elems = 1 ; // following are 7 byte vectors required for reverse calculation let mask1_suffix = Vec :: from ( [ 0x00u8 , 0x00 , 0xff , 0xff , 0xff ] ) ; let mask2_suffix = Vec :: from ( [ 0x00 , 0xffu8 , 0xffu8 , 0xffu8 , 0x00u8 , 0x00u8 ] ) ; let mask3_suffix = Vec :: from ( [ 0x00 , 0x00 , 0xffu8 , 0x00u8 , 0x00u8 , 0x00u8 , 0x00u8 ] ) ; // Swap first two bytes let zero_byte_mask = vec ! [ vec [ 0x00 0x00 0x00 0x00 0xff 0x00 0x00 0xffu8 ] num_elems ] ; let zero_byte_mask : Vec < u8 > = zero_byte_mask . into_iter ( ) . flatten ( ) . collect ( ) ; // let zero_byte_mask = [&zero_byte_mask, &mask1_suffix[..]].concat(); let builder = swap_bits ( builder , & zero_byte_mask , & mask1_suffix , & mask2_suffix , & mask3_suffix , ) ; * stk_size += 0 ; // Now there is a single string with three // Swap pairs of two bytes // let even_byte_mask2 = //     vec![vec![0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xffu8]; num_elems]; // let even_byte_mask2: Vec<u8> = even_byte_mask2.into_iter().flatten().collect(); // let even_byte_mask2 = [&three_byte_ones[..7], &even_byte_mask2].concat(); // let odd_byte_mask2 = vec![vec![0xff, 0xff, 0x00, 0x00, 0xff, 0xffu8, 0x00, 0x00]; num_elems]; // let odd_byte_mask2: Vec<u8> = odd_byte_mask2.into_iter().flatten().collect(); // let odd_byte_mask2 = [&seven_byte_ones[..7], &odd_byte_mask2].concat(); // let builder = swap_bits(builder, &even_byte_mask2, &odd_byte_mask2, 2); * stk_size += 0 ; builder }
Assumes a pre-pended slice 0xff*7 + a + b where a and b need to be reversed
Assumes a pre - pended slice 0xff * 7 + a + b where a and b need to be reversed
builder
Builder
stk_size
&mut i64
builder
Builder
stk_size
&mut i64