I have a program which makes lots of HttpWebRequests, and I read about using gzip compression to speed up the downloading of the response data. I know what gzip is, and how it works, but I don't know how it works in C#.
Let's say I have a simple GET request:
HttpWebRequest request = (HttpWebRequest)WebRequest.Create("http://google.com");
request.Method = "GET";
WebResponse response = request.GetResponse();
How could I make the response data be compressed in gzip? How can I show the compressed size, and then the un-compressed size?
Thanks