jjzjj

destFileStream

全部标签

c# - .net framework 4.0 c# 中的文件压缩

4.0版是否有任何内置类/示例来压缩目录中的特定文件?我在MSDN上找到了一个使用压缩类的示例,但它仅适用于4.5及以上版本。 最佳答案 您可以使用GZipStream和DeflateStream还包括.NETFramework4的类。检查Howto:CompressFiles来自MSDN。UsetheSystem.IO.Compression.GZipStreamclasstocompressanddecompressdata.YoucanalsousetheSystem.IO.Compression.DeflateStreamc