pub fn push_bytes(&mut self, bytes: &Vec<u8>, seq_length: usize) {
        assert!(
            seq_length <= bytes.len() * 8 / WIDTH,
            "Number of elements to push exceeds array length"
        );

        for i in 0..seq_length {
            let byte_index = (i * WIDTH) / 8;
            let byte_slot = (i * WIDTH) % 8;

            let v = bytes[byte_index];
            let bits = (v >> byte_slot) & (MASK as u8);

            self.push(bits);
        }
    }
/// Push 0-4 encoded bases from a byte array.
///
/// # Arguments
/// `bytes`: byte array to read values from
/// `seq_length`: how many values to read from the byte array. Note that this
/// is number of values not number of elements of the byte array.
Push 0-4 encoded bases from a byte array.
Push 0 - 4 encoded bases from a byte array .
pub fn push_bytes(&mut self, bytes: &Vec<u8>, seq_length: usize) {
        assert!(
            seq_length <= bytes.len() * 8 / WIDTH,
            "Number of elements to push exceeds array length"
        );
        for i in 0..seq_length {
            let byte_index = (i * WIDTH) / 8;
            let byte_slot = (i * WIDTH) % 8;
            let v = bytes[byte_index];
            let bits = (v >> byte_slot) & (MASK as u8);
            self.push(bits);
        }
    }
pub fn push_bytes ( & mut self , bytes : & Vec < u8 > , seq_length : usize ) { assert ! ( seq_length bytes len ( ) 8 WIDTH " " ) ; for i in 0 .. seq_length { let byte_index = ( i * WIDTH ) / 8 ; let byte_slot = ( i * WIDTH ) % 8 ; let v = bytes [ byte_index ] ; let bits = ( v >> byte_slot ) & ( MASK as u8 ) ; self . push ( bits ) ; } }
Push 0-4 encoded bases from a byte array.
Push 0 - 4 encoded bases from a byte array .
&mut self
bytes
&Vec<u8>
seq_length
usize
&mut self
bytes
&Vec<u8>
seq_length
usize