If I correctly understand you question, You want to decode gzip stream, so code posted in thread that You linked (my last post, last code snippet ) do the trick.
Personally, as stated at that thread http://www.qtcentre.org/threads/30031, I don't really know why qUncompress don't do the job. From inflate.c in qt It should decompress gzip.
Try to use debug on qUncompress and trace zlib stream to see where the error is (I tried doing so, but failed to pinpoint where the error is ).
AFAIK the "problem" is in inflateInit() and inflateInit2(). First one is used to initialize zlib stream, secound one can handle also gzip/zip. In my last snippet code in thread that was posted I used inflateInit2 and it works ( also fix while loop because it's incorrect). Or mess around with windowBits size, I use -8 and, if I remember correctly, one of this value didn't work (-15 or -8) for my gzip stream. If I understand correctly (I can be wrong on this one), windowBits is actually a header size for gzip/zip stream, and that amount of bytes are ignored by inflate, so depending on the original compressed stream that can vary.
Look here for more inormation: http://www.zlib.net/manual.html for
ZEXTERN int ZEXPORT inflateInit OF((z_streamp strm));
ZEXTERN int ZEXPORT inflateInit OF((z_streamp strm));
To copy to clipboard, switch view to plain text mode
and
ZEXTERN int ZEXPORT inflateInit2 OF((z_streamp strm, int windowBits));
ZEXTERN int ZEXPORT inflateInit2 OF((z_streamp strm, int windowBits));
To copy to clipboard, switch view to plain text mode
Best luck
EDIT: I saw also, browsing qt src, that they use zlib for one of the *network classes (can't remember name thought) and not qUncomrpess, so probably it can't handle gzip after all (I dunno why).
Bookmarks