pub fn update_buffer(&mut self, bytes: &[u8]) {
        let coef_big;
        let coef_little;
        if cfg!(target_endian = "big") {
            coef_little = 0;
            coef_big = 1;
        } else {
            coef_little = 1;
            coef_big = 0;
        }

        for i in (0..BUFFER_SIZE - 1).step_by(2) {
            self.buffer[i] = bytes[i + coef_little];
            self.buffer[i + 1] = bytes[i + coef_big];
        }
    }
/// Copy an array of bytes to the buffer.
Copy an array of bytes to the buffer.
Copy an array of bytes to the buffer .
pub fn update_buffer(&mut self, bytes: &[u8]) {
        let coef_big;
        let coef_little;
        if cfg!(target_endian = "big") {
            coef_little = 0;
            coef_big = 1;
        } else {
            coef_little = 1;
            coef_big = 0;
        }
        for i in (0..BUFFER_SIZE - 1).step_by(2) {
            self.buffer[i] = bytes[i + coef_little];
            self.buffer[i + 1] = bytes[i + coef_big];
        }
    }
pub fn update_buffer ( & mut self , bytes : & [ u8 ] ) { let coef_big ; let coef_little ; if cfg ! ( target_endian " " ) { coef_little = 0 ; coef_big = 1 ; } else { coef_little = 1 ; coef_big = 0 ; } for i in ( 0 .. BUFFER_SIZE - 1 ) . step_by ( 2 ) { self . buffer [ i ] = bytes [ i + coef_little ] ; self . buffer [ i + 1 ] = bytes [ i + coef_big ] ; } }
Copy an array of bytes to the buffer.
Copy an array of bytes to the buffer .
&mut self
bytes
&[u8]