'Returns buffered bytes without advancing the position.'

def peek(self, n=1):

    if (n > (len(self._readbuffer) - self._offset)):
        chunk = self.read(n)
        self._offset -= len(chunk)
    return self._readbuffer[self._offset:(self._offset + 512)]
