'Write some data on the stream.'

def write(self, data):

    if (self.compressobj is None):
        self.file.write(data)
    else:
        compressed = self.compressobj.compress(data)
        self.file.write(compressed)
