pub fn take(&mut self, num: usize) -> &[u8] {
        let cur = self.idx;
        self.idx = self.idx + num;

        while self.buf.len() < self.idx {
            self.buffer_up();
        }

        &self.buf[cur .. self.idx]
    }
// TODO: This will grow forever: we should purge bytes already
// read after a while.
This will grow forever: we should purge bytes already
read after a while.
This will grow forever : we should purge bytes already read after a while .
pub fn take(&mut self, num: usize) -> &[u8] {
        let cur = self.idx;
        self.idx = self.idx + num;
        while self.buf.len() < self.idx {
            self.buffer_up();
        }
        &self.buf[cur .. self.idx]
    }
pub fn take ( & mut self , num : usize ) -> & [ u8 ] { let cur = self . idx ; self . idx = self . idx + num ; while self . buf . len ( ) < self . idx { self . buffer_up ( ) ; } & self . buf [ cur .. self . idx ] }
TODO: This will grow forever: we should purge bytes already
read after a while.
TODO : This will grow forever : we should purge bytes already read after a while .
&mut self
num
usize
&mut self
num
usize