private function write($data, $flushMode)
    {
        assert($this->file !== null);

        $compressedChunk = deflate_add($this->deflateContext, $data, $flushMode);
        fwrite($this->file, $compressedChunk);
    }