I want to zip a file using PZKip in C# .net. I am using VS 2008. Can any one of you please help me with a C# .net code example.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
When you say PKZip, does that mean you actually have the executable and you want to use that to ZIP a file? If that’s the case, you can call the EXE through C# rather easily:
I don’t know what the parameters, specifically, are for pkzip, but you can probably figure that out quite easily.
Now, if on the other hand you’re asking about how to compress a file programmatically in C# to ZIP format, I would recommend you grab SharpZipLib. It supports several formats, including Zip, Gzip, BZip2, and Tar. It comes with sample code and it’s open source.
You can grab it here: http://www.icsharpcode.net/opensource/sharpziplib/