'Used when the exact number of bytes to read is unimportant.
This procedure just returns whatever is chunk is conveniently returned
from the iterator instead. Useful to avoid unnecessary bookkeeping if
performance is an issue.'

def next(self):

    if self._leftover:
        output = self._leftover
        self._leftover = ''
    else:
        output = self._producer.next()
        self._unget_history = []
    self.position += len(output)
    return output
