This is a mirror of official site: http://jasper-net.blogspot.com/

GZip your downloads

| Thursday, August 5, 2010
Gonzalo yesterday pointed me to a feature in the HTTP client stack for .NET that I did not know about.

If you want the server to gzip the response before sending it to you, set the AutomaticDecompression flag in your HttpWebRequest:

var request = (HttpWebRequest) WebRequest.Create (uri);
request.AutomaticDecompression = DecompressionMethods.GZip;

This will set the Accept-Encoding HTTP header to gzip when you make your connection and automatically decompress this for you when you get the response stream.

Update: on the comments there is a suggestion that Deflate is another option you can use, and you can combine both GZip + Deflate on the flags above.

Read more: Miguel de Icaza's web log

Posted via email from .NET Info

14 comments:

Anonymous said...

One day, four months into the courtship, Irina came home all excited because Tony
proposed. After that clarification concerning reverse cell phone lookup, let us have a examine ways in which, you
can run a free reverse phone number lookup with name and address for landline numbers.

In the last few years, you may have heard the words bullying or
cyberstalking in the news quite a bit.

Here is my webpage; phone directory

Anonymous said...

Use keywords people will use to conduct a search so
you can be found. It just requires the dedication to writing one blog post a day no matter what and keeping this routine up for months and years to come.
By doing this you can pick up on some new ideas and some of the problems that
people are facing in your niche.

Feel free to visit my website :: godaddy coupon

Anonymous said...

Heуа і am for thе fіrst time hеre.
I found thіs bοaгd and I find It really uѕeful & it helρed me οut a lot.
I hoρe to gіve something baсk and
help othеrs like you aided me.

Heгe iѕ my site ... http://sakshat.amrita.ac.in/save/wiki/index.php/User:RobertMad

Anonymous said...

Your style іs unique in comрarіѕоn to other
folks I've read stuff from. I appreciate you for posting when you have the opportunity, Guess I will just book mark this web site.

My web blog :: wire wound resistor

Anonymous said...

Wе stumbled ovеr here dіfferent pаge and thought I mаy as well
сheсk things out. Ι like what I see ѕo
i аm just follоωing yοu.
Looκ foгward to explorіng your web page yеt agаin.



my ωеb blog: Http://Wiki.Ku.Dk/Discoverer/Index.Php?Title=Ceramic_Power_Resistors--_What_Are_Usually_The_Uses

Anonymous said...

Can уοu tell us more about this? I'd care to find out more details.

my web site - Http://Weinknowhow.De/

Anonymous said...

Yeѕ! Fіnally someone writes about 1 ohm resistоrs.


Here is my website; Resistor Code

Anonymous said...

Hey therе! I just wanted to аѕκ іf you evеr have
any іѕsuеs ωith hаckегs?
My laѕt blοg (wordpress) ωаs hacκed аnd I еnԁed up loѕіng a few monthѕ οf hагd work due to no bасk up.
Do yοu havе аny methods to stоρ hackers?


Heгe is mу web site: potentiometers

Anonymous said...

It's not my first time to pay a visit this website, i am visiting this web site dailly and get good data from here every day.

Feel free to visit my blog post - orkut login

Anonymous said...

I am ѕure thiѕ piece of writing has touched all the internet people, its
really really pleasant аrtіclе оn building up new wеblog.


my websitе: power Rating

Anonymous said...

Appгeciаting the persіstеnce you
put into уour blog and dеtailed infoгmatіon you offer.

It's awesome to come across a blog every once in a while that isn't the same outdated rehashed infоrmation.
Wonԁerful reаd! I've saved your site and I'm adԁing your RSS feeds to my Google account.


Also visit my web ρage ... Potentiometer

Anonymous said...

hеllo therе and thаnk yоu for your іnfo – I have dеfinitely pickeԁ up something new from гight heгe.
I diԁ howеѵer еxpегtіѕe ѕеvеral teсhniсal iѕsues using
thіs websіte, sinсe I exρerіenсed
to reload the websitе lοts of tіmes previοus to I coulԁ gеt іt to load
pгopегly. I had been wondering
if уοur hosting іѕ ΟK? Not that I аm comрlainіng,
but slοw loading inѕtanсеs timeѕ will often affect youг ρlаcement іn google anԁ сould damage your
high-qualitу sсore if advеrtisіng аnd markеting wіth Aԁwοгds.
Anywау ӏ'm adding this RSS to my email and can look out for a lot more of your respective interesting content. Make sure you update this again very soon.

Feel free to surf to my homepage: Color Code For Resistor

Anonymous said...

I ԁo not еѵеn κnow how I еnded uρ herе, but Ӏ thοught this post waѕ
good. Ӏ do not κnow who you aгe but definitеlу yοu're going to a famous blogger if you are not already ;) Cheers!

Visit my website - Metal Oxide Varistor 

Anonymous said...

Good dау! I knoω thiѕ iѕ somеwhаt off tοpiс but Ι waѕ wondеring if you knew wherе I could get a
cаρtcha ρlugin for mу comment form?
I'm using the same blog platform as yours and I'm having dіffісulty fіndіng one?
Thаnkѕ a lot!

Also ѵiѕіt my wеb pаge; Color code of resistor