zlib compatibility

From: Date: Tue, 01 Jun 2004 06:09:51 +0000
Subject: zlib compatibility
Groups: php.general php.general 
Request: Send a blank email to php-general+get-187324@lists.php.net to get a copy of this message
Hi, This is a resend of my previous question, since nobody answer my question. Maybe I went to a wrong way of asking such question: "whenever you see it is related to VB, just ignored"... Anyways, anybody has experience working with zlib and PHP? is the text compressed in zlib compatible with PHP gzuncompress? THANK YOU. My previous post below: What I am trying to do: - in VB, compress a string - save it as a file - use php to open it, then gzuncompress it I am using a vb wrapper in: http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=42297&ln gWId=1 I am sure that the above program works, since it can uncompress the file. Acutally this program is only an interface using the zlib I used the above demo, compressed a string then saved it as a file. When I tried to use php to gzuncompress it, I got data error. What is the problem? aren't they both using the zlib? I also tried gzinflate, still the same 'gzinflate(): data error in...' below is the php code: $handle = fopen("/tmp/tmpCompress.txt", "r"); $contents = fread($handle, filesize("/tmp/tmpCompress.txt")); fclose($handle); echo(gzuncompress ($contents)); I also tried to use binary read in php(i.e. "rb"), but still got stucked in gzuncompress. just another question, what is the difference between gzuncompress and gzdeflate ?? Thank you very much!! Francis Mak -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#187324) next »