'Truncate the output buffer at offset I{where}, and remove any
compression table entries that pointed beyond the truncation
point.
@param where: the offset
@type where: int'

def _rollback(self, where):

    self.output.seek(where)
    self.output.truncate()
    keys_to_delete = []
    for (k, v) in self.compress.items():
        if (v >= where):
            keys_to_delete.append(k)
    for k in keys_to_delete:
        del self.compress[k]
