I am trying to decompress an http receive buffer that is content-encoded using 
gzip and am having some problems.  Here is the info I have so far; you take a 
look and let me know where i might be going wrong?

1) I am assuming I should be using zlib
2) I statically linked the palmos patched 1.1.4 zlib library and added zlib.h 
and zconf.h to my PODS program (i'm not using syszlib.h because it appears that 
syszlib.h is only good for the shared library setup because it requires a 
refnum,etc.)
3) I setup a function similar to the zlib example on the zlib homepage that 
uses inflate.
4) inflateinit works well, but when i call inflate i get an error on the 2nd 
byte with a message "unknown compression method"
5) Is this because the inflate function uses the zlib inflate algorithm, as 
opposed to the gzip algorithm?
6) I would try using the gz functions, but they only work with files and I have 
a memory buffer.  The latest version of zlib says you can call inflateinit2 and 
use the gzip algorithm with a buffer instead of the zlib algorithm, but I 
haven't been able to compile/link the latest version without compile/link 
errors.
7) My questions are:
     A) How do I use the zlib 1.1.4 library to decompress a http memory buffer 
with gzip content-encoding?
     B) Does anything above look incorrect?
     C) I read through RFC 1952 (gzip spec) and my memory buffer appears to 
have the correct header (at least the first few hex values are correct) so I'm 
assuming that isn't the problem.

Thanks for any help you can provide,
Troy
-- 
For information on using the PalmSource Developer Forums, or to unsubscribe, 
please see http://www.palmos.com/dev/support/forums/

Reply via email to