Sathish
Sathish

Reputation: 101

zip more than 1 file in GzipStream

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?

Upvotes: 1

Views: 1972

Answers (2)

Matthew Flaschen
Matthew Flaschen

Reputation: 284786

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.

Upvotes: 1

Ignacio Vazquez-Abrams
Ignacio Vazquez-Abrams

Reputation: 798436

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

Upvotes: 2

Related Questions