[PHP] uncompressing gz string

2003-10-24 Thread Decapode Azur
I don't understand why gzinflate and gzuncompress don't work? ?php $gz_content = file_get_contents('hello.txt.gz'); echo gzinflate($gz_content); // Warning: data error echo gzuncompress($gz_content); // Warning: data error ? but if I make it from bash the content is there : cat hello.txt.gz |

Re: [PHP] uncompressing gz string

2003-10-24 Thread Ray
i had a similar problem, it seems that a .gz file had 10 bytes of header that inflate and uncompress didn't like, or something wierd like that. but i can't find the code that i had in the end. http://www.php.net/manual/en/function.gzinflate.php but depending on how your actually using the