If I try to write to a compressed CSV file, then I get an exception using the file wrapper compress.zlib://
I think it has to do with the seekable file mode used here:
$this->filePointer = $this->globalFunctionsHelper->fopen($this->outputFilePath, 'wb+');
Simply removing the + from the file mode seems to solve the problem but I'm not sure if box/spout needs it somewhere for something.
B.t.w. this is the exception and errors I get when I open a file with a compress.zlib wrapper using the latest v2 release:
PHP Warning: fopen(compress.zlib://art.csv.gz): failed to open stream: operation failed in lib/box/spout/src/Spout/Common/Helper/GlobalFunctionsHelper.php on line 25
PHP Fatal error: Uncaught Box\Spout\Common\Exception\IOException: File pointer has not be opened in lib/box/spout/src/Spout/Writer/AbstractWriter.php:175