MatthiasMullie\Minify\Minify::gzip PHP Method

gzip() public method

Minify & gzip the data & (optionally) saves it to a file.
public gzip ( string[optional] $path = null, int[optional] $level = 9 ) : string
$path string[optional]
$level int[optional]
return string The minified & gzipped data
    public function gzip($path = null, $level = 9)
    {
        $content = $this->execute($path);
        $content = gzencode($content, $level, FORCE_GZIP);
        // save to path
        if ($path !== null) {
            $this->save($content, $path);
        }
        return $content;
    }