public function unpack($from, $to)
    {
        if (($gzip = gzopen($from, 'rb')) === false) {
            throw new Exception('Unable to read compressed file.');
        }

        if (($target = fopen($to, 'w')) === false) {
            throw new Exception('Unable to open the target.');
        }

        while ($string = gzread($gzip, 4096)) {
            fwrite($target, $string, strlen($string));
        }

        gzclose($gzip);
        fclose($target);
    }
public function unpack($from, $to)
    {
        if (($gzip = gzopen($from, 'rb')) === false) {
            throw new Exception('Unable to read compressed file.');
        }

        if (($target = fopen($to, 'w')) === false) {
            throw new Exception('Unable to open the target.');
        }

        while ($string = gzread($gzip, 4096)) {
            fwrite($target, $string, strlen($string));
        }

        gzclose($gzip);
        fclose($target);
    }
public function unpack ( $ from , $ to ) { if ( ( $ gzip = gzopen ( $ from , 'rb' ) ) === false ) { throw new Exception ( 'Unable to read compressed file.' ) ; } if ( ( $ target = fopen ( $ to , 'w' ) ) === false ) { throw new Exception ( 'Unable to open the target.' ) ; } while ( $ string = gzread ( $ gzip , 4096 ) ) { fwrite ( $ target , $ string , strlen ( $ string ) ) ; } gzclose ( $ gzip ) ; fclose ( $ target ) ; }
Uncompresses a file.

@param  string $from The source
@param  string $to   The target
@throws Exception
Uncompresses a file .