Gzip in PHP

December 30th, 2006

Use gzencode if you want to interoperate with gnu’s gzip, Java and others. There is no gzdecode, but it’s easy to create. Just take something encoded with gzencode, chop of the first 10 characters and then use gzinflate.

function gzdecode($string) {
    $string = substr($string, 10);
    return gzinflate($string);
}

Sorry, comments are closed for this article.