zip more than 1 file in GzipStream

橙三吉。 提交于 2019-12-08 05:37:46

问题


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?


回答1:


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




回答2:


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.



来源:https://stackoverflow.com/questions/3042281/zip-more-than-1-file-in-gzipstream

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!