'Writes file chunk.'

def WriteFileChunk(self, chunk):

    if (not self._stream):
        raise ArchiveAlreadyClosedError('Attempting    to    write    to    a    ZIP    archive    that    was    already    closed.')
    self.cur_file_size += len(chunk)
    self.cur_crc = (zipfile.crc32(chunk, self.cur_crc) & 4294967295)
    if self.cur_cmpr:
        chunk = self.cur_cmpr.compress(chunk)
        self.cur_compress_size += len(chunk)
    self._stream.write(chunk)
    return self._stream.GetValueAndReset()
