1

How can I zip more than 1 file in a GZipStream? I have 3 xml files and I want to zip them into one .gz file and when I decompress I should get all 3 separate files.

How can I do this?

Charlie Salts
  • 12,609
  • 7
  • 47
  • 77
Sathish
  • 101
  • 1
  • 6

2 Answers2

2

gzip is only designed to hold a single file. You will need to collate them in some other container before gzipping them.

Ignacio Vazquez-Abrams
  • 740,318
  • 145
  • 1,296
  • 1,325
1

You can tar them together first. SharpZipLib has support for tar, as well as its own GZip implementation. See the SharpZipLib.Tar namespace. The docs are here.

Matthew Flaschen
  • 268,153
  • 48
  • 509
  • 534