pub fn read_bytes(&mut self, size: usize) -> Vec<u8> {
        self.flush_bit();
        assert!(self.rpos + size <= self.data.len());
        let range = self.rpos..self.rpos + size;
        let mut res = Vec::<u8>::new();
        res.write(&self.data[range]).unwrap();
        self.rpos += size;
        res
    }
/// Read a defined amount of raw bytes. The program crash if not enough bytes are available
Read a defined amount of raw bytes. The program crash if not enough bytes are available
Read a defined amount of raw bytes . The program crash if not enough bytes are available
pub fn read_bytes(&mut self, size: usize) -> Vec<u8> {
        self.flush_bit();
        assert!(self.rpos + size <= self.data.len());
        let range = self.rpos..self.rpos + size;
        let mut res = Vec::<u8>::new();
        res.write(&self.data[range]).unwrap();
        self.rpos += size;
        res
    }
pub fn read_bytes ( & mut self , size : usize ) -> Vec < u8 > { self . flush_bit ( ) ; assert ! ( self rpos size self data len ( ) ) ; let range = self . rpos .. self . rpos + size ; let mut res = Vec :: < u8 > :: new ( ) ; res . write ( & self . data [ range ] ) . unwrap ( ) ; self . rpos += size ; res }
Read a defined amount of raw bytes.
Read a defined amount of raw bytes .
&mut self
size
usize