Page 1 of 1

how to uncompress zip archive from string?

Posted: Mon Sep 04, 2006 3:21 am
by vitalik_dj
Some web service return me ansver in zip archive.
This zip archive is in string variable.
If i write this variable to file, I was able to unzip this file using functions from the ZZIPlib library (zip_open,zip_read, zip_entry_read).

But question is how to unzip contents of zip archive directly from string variable without writing additional files?
all functions, which i found, to unzip archive works only with files, not with string variable :(

can anybody help me with this?

Posted: Mon Sep 04, 2006 8:12 am
by feyd
gzinflate() may be of interest, but the data may not be in a format it understands, so there's also this, which while it is intended to work on files I don't see why it couldn't be adjusted to work on a string.