Re: [PHP] zlib compatibility
On Tuesday 01 June 2004 14:09, Francis Mak wrote: 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=42297l n 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 Have you tried 'compressing' something using PHP and then 'uncompressing' it using the VB-zlib wrapper? just another question, what is the difference between gzuncompress and gzdeflate ?? gzuncompress() - gzcompress() gzinflate()- gzdeflate() There seems to be an error in the manual listing: gzuncompress -- Uncompress a deflated string -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* The first myth of management is that it exists. The second myth of management is that success equals skill. -- Robert Heller */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] zlib compatibility
Hi, 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=42297ln 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