ID: 7033
Updated by: jimw
Reported By: [EMAIL PROTECTED]
Old-Status: Analyzed
Status: Closed
Bug Type: Documentation problem
Assigned To: 
Comments:

doesn't do gzip compression (does deflate), updated docs.

Previous Comments:
---------------------------------------------------------------------------

[2000-10-11 09:37:04] [EMAIL PROTECTED]
See also #6481

---------------------------------------------------------------------------

[2000-10-11 09:35:20] [EMAIL PROTECTED]
Yes, gzcompress and gzopen&friends are different function. The latter does not put 
gzip headers (whatever they are) to the output. You should use gzopen, etc. if you 
want to be gzip-compatible. That's how it is in zlib library. 

Since this about the third time people ask this, I move this to doc's problem. 

---------------------------------------------------------------------------

[2000-10-05 04:24:02] [EMAIL PROTECTED]
$gzip = gzcompress($h->inhalt);
header("Content-Encoding: gzip");
print($gzip);
$fp = fopen("/tmp/file.gz","w");
fputs($fp,$gzip);
fclose($fp);

does not work, the browser does not display anything, 
and gzip -d /tmp/file.gz tells me that the file is not
a valid gzip file.

If I do:
     $fp = gzopen ("/tmp/file.gz", "w");
     gzputs($fp,$h->inhalt);
     gzclose($fp);
and then gzip -d again, everything works.

The file generated by gzcompress is about 20 Bytes shorter
than the one from gzopen, so I suspect there is probably 
some problem with NULL-Termination...

TIA,
   Michael


---------------------------------------------------------------------------


Full Bug description available at: http://bugs.php.net/?id=7033


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to