'Flush the compression object.'

def _flush(self):

    if (self.compressobj is not None):
        compressed = self.compressobj.flush()
        self.file.write(compressed)
        self.compressobj = None
