Click here to Skip to main content
15,881,588 members
Please Sign up or sign in to vote.
2.00/5 (2 votes)
See more:
Hi all,

I have problems when trying to apply a "deflate" decompression. I want
it to work on content which I received via HTTP with the response header
field "Content-Encoding: deflate".

I have tried the solution suggested by Heikki Pora using
CEZCompressor::DecompressL() but this leaves with KZlibErrData. Also, I
have seen that my received data does not suit the specification for a
Zlib data stream according to RFC 1950. See below a complete hex view of
my data.

Questions:
I would expect the data received via the HTTP to be like the ZLib
specification. Is this not the case?
Am I mixing HTTP's deflate with ZLib?
Does anyone have an example of how to decompress data from a "Deflated"
HTTP response?

Thanks for any hints
and Best Regards,

C++
8<-----------------------------------------

00000000h: 65 92 B1 4E C3 30 10 86 7D 72 25 96 B2 33 9A A5 ;
e’±NÃ0.†}r%–²3š¥
00000010h: 5B 92 AA 08 36 84 DA 40 85 10 A0 22 A8 2A B1 50 ;
[’ª.6„Ú@…. "¨*±P
00000020h: C7 71 1A AB 49 5C 1C 97 B4 30 30 F0 34 2C 88 07 ;
Çq.«I\.—´00ð4,ˆ.
00000030h: 62 60 83 C7 C0 A9 D3 4A 0D 83 15 E9 BF CF F7 DF ;
b`ƒÇÀ©ÓJ.ƒ.é¿Ï÷ß
00000040h: FD 31 34 1A 4D D2 EB F9 E4 9D 74 DA ED 43 F4 9A ;
ý14.MÒëùä�tÚíCôš
00000050h: 7C DE 63 9F B2 98 3B BE CC B4 92 09 DA C5 29 5D ;
|ÞcŸ²˜;¾Ì´’.ÚÅ)]
00000060h: 38 74 C2 8F DB 68 04 F0 F2 DB DF C7 01 65 53 B4 ;
8tÂ�Ûh.ðòÛßÇ.eS´
00000070h: 87 7B E5 07 3A 00 3F 43 CC A8 0A D1 11 2E 7B 39 ;
‡{å.:.?C̨.Ñ..{9
00000080h: 64 D4 1D 20 F8 DE 81 8F 0E F6 52 19 88 84 7B 81 ; dÔ.
øÞ��.öR.ˆ„{�
00000090h: CA 42 27 08 D8 C3 81 3B 11 11 6A 62 04 30 FE BA ;
ÊB'.ØÃ�;..jb.0þº
000000a0h: C0 A5 94 F1 22 F7 44 16 F2 85 5B A4 C9 09 82 55 ;
À¥"ñ"÷D.ò…[¤É.‚U
000000b0h: 9B 6B A3 22 68 55 4C 3E 93 4A FF 87 6E 4B D9 52 ;
›k£"hUL>"Jÿ‡nKÙR
000000c0h: B1 98 C4 89 39 BA D6 EB 7C A3 5B 8E 67 75 E2 2C ;
±˜Ä‰9ºÖë|£[Žguâ,
000000d0h: D3 5C 69 2A B2 D4 D4 2C C4 8C E7 36 E4 1B 3B 5B ;
Ó\i*²ÔÔ,ÄŒç6ä.;[
000000e0h: 73 5D 2F 67 B1 94 49 BE 5E 2E 93 53 41 6B C3 09 ;
s]/g±"I¾^."SAkÃ.
000000f0h: CD 73 F1 CC ED 95 44 6A 63 B1 DC 46 2E AD 68 09 ;
ÍsñÌí•Djc±ÜF.­h.
00000100h: AD 68 14 89 9A E7 9D 15 37 B6 05 A7 3A E6 CA 2B ;
h.‰šç�.7¶.§:æÊ+
00000110h: E8 6C 1B 1C D9 82 01 61 6C 42 37 C3 BB 45 90 CE ;
èl..Ù‚.alB7ûE�Î
00000120h: 4C CC AB A9 61 8C 1D 54 F6 48 97 21 7F 12 8C AF ;
LÌ«©aŒ.TöH—!.Œ¯
00000130h: EF 5D 2D C9 E9 4A B0 16 11 7D 5C 57 FA DD 9B 4A ;
ï]-ÉéJ°..}\WúÝ›J
00000140h: E3 3C 2C FF 77 2D 0D F3 3A 28 D3 64 5E 85 6A 16 ;
ã<,ÿw-.ó:(Ód^…j.
00000150h: 49 73 19 CD 73 5E DB A0 D4 89 8C C8 30 AF 3C 66 ;
Is.Ís^Û Ô‰ŒÈ0¯<f
00000160h: 4A 3C 51 56 8B 62 60 45 32 90 89 60 65 22 6F A8 ;
J<QV‹b`E2�‰`e"o¨
00000170h: 05 00 7F ; ..
Posted
Updated 28-Sep-11 17:39pm
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900