如何使用gzipstream压缩多个文件 [英] how to compress multiple files using gzipstream
问题描述
有人可以帮我吗?
下面是代码,在这里我想压缩多个扩展名不同的文件,现在我正在压缩单个文本文件.由于我是dotnet的新手,所以任何人都可以指导我.
Below is the code and here i want to compress multiple files of different extension, right now i am compressing single text file.As i am new to dotnet could any one guide me.
非常感谢!
rr
推荐答案
类GZipStream并非旨在处理多个文件.但是有可能
[...]
The class GZipStream is not really designed to handle multiple files. But it is possible
[...]
此应用程序可以将多个文件压缩为一个文件,也可以将其解压缩.
This application can compress several files into one file and decompress them as well.
除了算法类之外,您还可以使用 System.IO.BinaryWriter 和 System.IO.BinaryReader 来完全控制文件内容的方式.
Besides algorithms classes, you may use System.IO.BinaryWriter and System.IO.BinaryReader to get full control of how the file contents will be.
[...]
http://www.codeproject.com/Articles/66269/Programmatically-Compress-and-解压缩文件
但是没有必要重新发明轮子.您可以使用旨在处理多个文件的库-
例如 http://dotnetzip.codeplex.com/
[...]
http://www.codeproject.com/Articles/66269/Programmatically-Compress-and-Decompress-Files
But it is not necessary to re-invent the wheel. You can use a library, which is designed to handle multiple files -
like http://dotnetzip.codeplex.com/
这篇关于如何使用gzipstream压缩多个文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!