How to read from file containing multiple GzipStreams
I've got a file created with code which looks like this: using (var fs=File.OpenWrite("tmp")) { using (GZipStream gs=new GZipStream(fs,CompressionMode.Compress,true)) { using (StreamWriter sw=new StreamWriter(gs)) { sw.WriteLine("hello "); } } using (GZipStream gs = new GZipStream(fs, CompressionMode.Compress, true)) { using (StreamWriter sw = new StreamWriter(gs)) { sw.WriteLine("world"); } } } Now I'm trying to read the data from this file with following code: string txt; using (var fs=File.OpenRead("tmp")) { using (GZipStream gs=new GZipStream(fs,CompressionMode.Decompress,true)) { using