def METHOD_NAME(self):
    self.last_flush = time.time()
    data, size, = "".join(self.block), self.block_size
    self.block, self.block_size = [], 0
    if size == 0:
        # nothing to do
        return
    # check if we need to truncate the file
    # 'size' refers to uncompressed data, so the file be truncated at max_size -+ max_block_size
    # there is no way know compressed size without collapsing the zlib state
    if (self.file.tell() + size) > self.file_max_size:
        if self.file_truncate_pos is not None:
            # tell it to cleanup
            self.zstream.flush(zlib.Z_FINISH)
            self.file.seek(self.file_truncate_pos, 0)
            self.file.truncate()
            self.zstream = self.file_truncate_state.copy()
            self.write_block("\n\n--- file was cut at this point ---\n\n")
    # write it
    self.write_block(data)
    # check if we can save the ptr into truncate_position
    if self.file_truncate_pos is None:
        if self.file.tell() >= self.file_min_size:
            self.file_truncate_pos = self.file.tell()
            self.file_truncate_state = self.zstream.copy()