PHP 4.0 Bug #6481 Updated: Gzcompress

From: Date: Tue, 23 Jan 2001 02:32:15 +0000
Subject: PHP 4.0 Bug #6481 Updated: Gzcompress
Groups: php.dev 
Request: Send a blank email to php-dev+get-44779@lists.php.net to get a copy of this message
ID: 6481 Updated by: jimw Reported By: wico@cnh.nl Old-Status: Analyzed Status: Closed Bug Type: Documentation problem Assigned To: Comments: now makes clear it does deflate compression. (examples would probably work with Content-Encoding: deflate specified for browsers that support deflate in addition to gzip.) Previous Comments: --------------------------------------------------------------------------- [2000-10-11 09:36:54] stas@php.net See also #7033 --------------------------------------------------------------------------- [2000-09-26 23:56:52] wico@cnh.nl I realy think this should be in the manual (where you can find it easly), but also should have a fix/workaround (i opened it again because i realy think this should be fixed, and that stuff about the crc doesn't look verry right to me either) Greetz, tnx, Wico this did i got from Tyler Akins (thx for your effort and support) Remember when I told you why gzcompress() doesn't work as it should if you want to output compressed data? [ I wrote ] > I was checking out http://bugs.php.net/bugs.php?id=6481 and > found out > why you are right. :-) Anyway, I wrote a lengthy note on the PHP page explaining how to get it to work properly for outputting compressed data to the client. You might want to check it out. http://www.php.net/manual/function.gzcompress.php Basically, it doesn't output the gzip header, it doesn't output a proper CRC, and it certainly doesn't add the size field. For more information on gzip-style files, check out http://swrinde.nde.swri.edu.pub/png/documents/zlib/rfc-gzip.html Hope this helps. Actually this information would probably be really nice to put in the bug report. -- Tyler Akins tyler@boas.anthro.mnsu.edu --------------------------------------------------------------------------- [2000-09-23 22:21:29] stas@php.net I guess you should use gzopen("php://stdout","w") instead, because gzcompress doesn't have all gzip file headers too. In other words, gzcompress and gzopen/gzwrite are different functions, and in zlib too. --------------------------------------------------------------------------- [2000-09-20 16:11:52] wico@cnh.nl Move to the rigth bug section P.S. can someone please take a look a this bug, my programm depends on it Greetz, Wico --------------------------------------------------------------------------- [2000-09-20 16:08:40] wico@cnh.nl Subject: gzcompress() broken To: wico@cnh.nl I was checking out http://bugs.php.net/bugs.php?id=6481 and found out why you are right. :-) The rest of the functions in the zlib section all use gzip compression. gzcompress() and gzuncompress() do not -- they use a deflate style compression, if I remember right. To fix it, you need to edit the zlib files in PHP to call the correct zlib function. It would be nice if you added this information for me (I have no desire to make a PHP bug reporting account) and if you moved it to the zlib section instead of a general question. -- Tyler Akins tyler@boas.anthro.mnsu.edu --------------------------------------------------------------------------- The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online. Full Bug description available at: http://bugs.php.net/?id=6481

« previous php.dev (#44779) next »