Zip Function Within Visual Studio

2019-08-28 23:27发布

问题:

I've poked around looking for a zip function from with Visual Studio but haven't found anything.

Is there a function? Reason I'm asking, is I'm currently creating a process within my code to call 7zip, but this program isn't installed on all user machines and installing the program is an option, just not an ideal option.

Suggestions?

回答1:

Try the System.IO.Compression library that comes with C#: ZipFile Class



回答2:

I have used dotnetzip.codeplex.com with very good results. There is definitely some coding and qa work to do to ensure it's handling your data correctly. But you're quite right that it's easier to deploy to random client machines than calling out to 7zip.