// Collection of code snippets by Arne Vajhøj // posted to eksperten.dk, usenet and other places (2002-now) using System; using System.IO; using System.IO.Compression; using System.Net; using System.Web; public class MainClass { public static void Main(string[] args) { HttpWebRequest wr = (HttpWebRequest)WebRequest.Create("http://localhost/z.php.gz"); Stream stm = wr.GetResponse().GetResponseStream(); GZipStream gzstm = new GZipStream(stm, CompressionMode.Decompress); StreamReader sr = new StreamReader(gzstm); string line; while((line = sr.ReadLine()) != null) { Console.WriteLine(line); } sr.Close(); gzstm.Close(); stm.Close(); } }