'Gets rid of already read data (since we can\'t rewind).'

def _shrinkBuffer(self):

    if (self._pos >= self._shrinkThreshold):
        self._buf = self._buf[self._pos:]
        self._avail -= self._pos
        self._pos = 0
        assert (self._avail >= 0)
