# zlib problem

- Thread: https://externals.io/message/17464
- Original archive: https://news-web.php.net/php.internals/17464
- Started by Ron Korving on 2005-07-29T12:25:03+00:00
- Messages: 1
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #17464 — Ron Korving — 2005-07-29T12:25:03+00:00

URL: https://externals.io/message/17464#17464

Hi,

Will there be a `gzdecode()` function in the future? I really need it, and the
function provided by Aaron G. on
http://nl2.php.net/manual/en/function.gzencode.php#44470 doesn't always seem
to work ("data error" warning on a newly gzipped file). I tried to go
through the ext/zlib code, trying to figure out how everything works, so I
could create a function in php based on readgzfile (for strings), but I just
don't get how the wrapper works.

I also tried making my own wrapper, like this:
readgzfile("str://andsomegzippeddatahere");
But the gz-functions don't accept user-space wrappers.

So, my questions are:
- is it possible to make the zlib functions use my wrapper anyway?
- will there be a `gzdecode()` in the future?
- how could i mimic the behavior of `readgzfile()` to work with strings (in
php-code)?

Thanks,

Ron
