note 101643 added to function.gzuncompress

From: Date: Fri, 31 Dec 2010 21:36:20 +0000
Subject: note 101643 added to function.gzuncompress
Groups: php.notes 
Request: Send a blank email to php-notes+get-175381@lists.php.net to get a copy of this message
Hi, I got an alternative for those zipped strings that gzuncompress() cannot extract. It is a bit better than previous options as it do not create any temporary files, but it has to encode the string in base64, meaning it won't be as fast as a native equivalent (which is probably going to be gzdecode()) <?php if (!function_exists('gzdecode')) { function gzdecode($string) { // no support for 2nd argument return file_get_contents('compress.zlib://data:who/cares;base64,'. base64_encode($string)); } } ?> ---- Server IP: 219.94.145.73 Probable Submitter: 114.145.96.119 ---- Manual Page -- http://www.php.net/manual/en/function.gzuncompress.php Edit -- https://master.php.net/note/edit/101643 Del: integrated -- https://master.php.net/note/delete/101643/integrated Del: useless -- https://master.php.net/note/delete/101643/useless Del: bad code -- https://master.php.net/note/delete/101643/bad+code Del: spam -- https://master.php.net/note/delete/101643/spam Del: non-english -- https://master.php.net/note/delete/101643/non-english Del: in docs -- https://master.php.net/note/delete/101643/in+docs Del: other reasons-- https://master.php.net/note/delete/101643 Reject -- https://master.php.net/note/reject/101643 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#175381) next »