Determine if the web response is gzip compressed

By [)ia6l0 iii

Use the ContentEncoding property of the webresponse to figure out if the response is gzip compressed

The following code snippet shows you how to check if the webresponse's content is gzip compressed.

if (WebResponse.ContentEncoding.ToLower().Contains(""gzip""))
  responseStream = new GZipStream(responseStream, CompressionMode.Decompress);


Determine if the web response is gzip compressed  (1795 Views)