php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #22123 gzdecode() in zlib extension
Submitted: 2003-02-08 11:04 UTC Modified: 2006-10-09 09:40 UTC
Votes:9
Avg. Score:4.8 ± 0.6
Reproduced:9 of 9 (100.0%)
Same Version:1 (11.1%)
Same OS:1 (11.1%)
From: mario17 at web dot de Assigned:
Status: Closed Package: Feature/Change Request
PHP Version: 5CVS-2003-02-08 (dev) OS:
Private report: No CVE-ID: None
 [2003-02-08 11:04 UTC] mario17 at web dot de
Hi everybody,

The zlib extension allows to compress data in memory using
the gzencode() function for gzip-like output format.
There are other compression formats supported as well, and
currently there are two functions to reverse compression:

gzdeflate()   <-->   gzinflate()
gzcompress()  <-->   gzuncompress()
gzencode()    <-->   ???

So the reverse "gzdecode" is missing, However the gzip-format
is the most heavily used one. (the two decompression methods
didn't work for me with gzencoded data)
The only solution here is to write the gzip-data string to a
newly opened temporary file and reopen it using gzopen()...

But I think there should be a in-memory decompression of those
gzip-data streams as well (as using the file io ones is much
slower of course). I don't know if there is such a function in
the libz.so, but PHP should have one nevertheless.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-10-09 09:40 UTC] mike@php.net
Implemented for PHP-6.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 21:01:29 2024 UTC