src/Zip.php
public function setCompression($level = 9, $type = Archive::COMPRESS_AUTO)
    {
        if ($level < -1 || $level > 9) {
            throw new ArchiveIllegalCompressionException('Compression level should be between -1 and 9');
        }
        $this->complevel = $level;
    }
public function setCompression($level = 9, $type = Archive::COMPRESS_AUTO)
    {
        if ($level < -1 || $level > 9) {
            throw new ArchiveIllegalCompressionException('Compression level should be between -1 and 9');
        }
        $this->complevel = $level;
    }
public function setCompression ( $ level = 9 , $ type = Archive :: COMPRESS_AUTO ) { if ( $ level < - 1 || $ level > 9 ) { throw new ArchiveIllegalCompressionException ( 'Compression level should be between -1 and 9' ) ; } $ this -> complevel = $ level ; }
Set the compression level.

Compression Type is ignored for ZIP

You can call this function before adding each file to set differen compression levels
for each file.

@param int $level Compression level (0 to 9)
@param int $type  Type of compression to use ignored for ZIP
@throws ArchiveIllegalCompressionException
Set the compression level .