Re: Decompressing a string with zlib problems

From: Date: Fri, 28 Oct 2005 15:15:55 +0000
Subject: Re: Decompressing a string with zlib problems
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-224782@lists.php.net to get a copy of this message
On 10/28/05, Graham Anderson <grahama@siren.cc> wrote: > I am having problems decompressing a zlib'd string located in a file. > > In the file headers, the compression says that it is zlib. > But, when I 'gzinflate' the string, I get the error: gzinflate(): > data error in <b > Is the below NOT a zlib or some strange variant ? > > <?php > $hex="C0636D7664000003DE789C95533B4E [...] Is this thread any help? http://lists.apple.com/archives/QuickTime-java/2003/Sep/msg00038.html Looking at your binary data in a hex editor, you've got what looks like a cmvd header at the start. If the next four bytes are the length of the compressed data, then you've got probably got 990 bytes following that that you should be decompressing. -robin

« previous php.general (#224782) next »