login about faq

When I set up my Chilkat http as the following

string url = "http://www.yellowbook.com/profile/hard-rock-cafe_1614116263.html";

Chilkat.Http httpX = new Chilkat.Http();

if (!httpX.IsUnlocked()) httpX.UnlockComponent("XXX");

httpX.AddQuickHeader("Accept-Encoding", "gzip, deflate");

httpX.AllowGzip = true;

httpX.AutoAddHostHeader = true;

string html = httpX.QuickGetStr(url);

I'm get deflated html that looks like this:

I%&/m{JJt$ؐ@iG#)eVe]f@흼{{;N'?fdlJɞ!?~|?"~˓7t.WOm߽{'w>}4x'}Sg˦hjw(h޶Gw^]]Ww.^_[}tD]s,gÇGi-/>(_n#yt> g|RUojqwog@Q)=y6hY=K_UӷIvҗE6u}1ߏӟI˲w-"oXlh]~IXem1)ileGg.n|Do^/.hsNYg|ࣴn->I6eUVeu=+jzmZgt^}t<c磴%ev՛ޤg'_eo_y _="">}|7gO w~`|>ک~^Edo^!S<.8޾]? كf6΄RLfٻݦ.f]~Ջo>?}Ͳ3iwrnZ4a664<du@YCZ,Q-=y-CȦm:#pE٤Uyv!qYWi6m΋&b7i7ӺX <Qv@Wuu^IH.f5!=%Owww?X d-%QtL# (n?xr1z# dqMgU͛דmzꩠZ4SљSy<iEUi颪('=OC3J3)7w

I would like to know what is the correct way to managing html that are deflated.. does Chilkat do this for us, if yes what is the proper set up to do this?

or do I have to write an additional function that will decompress the deflated html from link of interest such as below:



I was under the impression that we need this line:

httpX.AddQuickHeader("Accept-Encoding", "gzip, deflate");

to be able to read deflated htmls as text.

asked May 01 '14 at 23:39

hsunjaya's gravatar image


When you include Zip and/or Deflate in the Accept-Encodings header, you are just telling the server that you can accept the returned data in those encodings. The server will decide whether it can return the data in either of those formats, and choose one that is appropriate.

It doesn't look like ChilkatHttp has any method to automatically handle Deflate encoding for you (although it can apparently handle gzip encoding via the AllowGzip property). In the case of the YellowBook server, it doesn't have Gzip support, only Deflate (or of course uncompressed/entity encoding). Since you are telling the server you support Deflate encoding, it is returning a deflate encoded string. I think you will need to inflate the results yourself, or omit "deflate" in your Accept-Encoding header (in which case the server will return uncompressed text).


answered May 02 '14 at 10:07

jpbro's gravatar image

jpbro ♦

Chilkat will add support for "deflate" soon. For now, just tell the server you don't want "deflate" as jpbro suggested.

By the way.. gzip uses the deflate algorithm. In essence, the only difference between gzip and deflate is that gzip includes a small header prior to the deflated data. Other than this, the compression is identical.


answered May 04 '14 at 19:01

chilkat's gravatar image

chilkat ♦♦

We'll get this soon.. Just commenting here to bring this post to the top so it won't be forgotten..

(May 06 '14 at 10:55) chilkat ♦♦
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: May 01 '14 at 23:39

Seen: 2,401 times

Last updated: May 06 '14 at 10:55

powered by OSQA