I am creating two gzip files, one which contains only a single gzip member, where as the second one contains 2 gzip members (two files concatenated into a single gzip file).
When I try to download this through a web server, chrome decompresses the first file fine and shows the contents as is.
But when downloading the second file, chrome seems to decompress only the first member and the second member is left uncompressed.
I tried opening the second file using 7zip and verified that the contents are fine.
Below is the code I am using to generate the two files in C#
FileStream fileStream = new FileStream("D:\\single_big_gzip.gz", FileMode.Create);
FileStream fileStream2 = new FileStream("D:\\multiple_gzip_files.gz", FileMode.Create);
// Write to First file
GZipStream gzipStream = new GZipStream(fileStream, CompressionMode.Compress, false);
StreamWriter writer = new StreamWriter(gzipStream);
writer.WriteLine("hello world!");
writer.Flush();
gzipStream.Close();
fileStream.Close();
// write to second file
gzipStream = new GZipStream(fileStream2, CompressionMode.Compress, true);
writer = new StreamWriter(gzipStream);
writer.WriteLine("Hello world!");
writer.Flush();
gzipStream.Close();
gzipStream = new GZipStream(fileStream2, CompressionMode.Compress, true);
writer = new StreamWriter(gzipStream);
writer.WriteLine("Bye Bye Birdie!");
writer.Flush();
gzipStream.Close();
fileStream2.Close();
Any idea how I can get chrome to decompress the entire second file?
Thank you.