ary
ary

Reputation: 617

Zipping files in ASP.NET without using free third-party solutions

Do C# support zipping multiple files without using free third-party solutions. I knew there are some third-party solutions such as DotNet zip, SharpZipLib etc... did this, but I would like to create a one without using any of the above.

I see using J# (vjslib.dll) we can use GZip but J# is currently retired and not included in VS2010.

Can you point me to the correct place of this implementation?

Upvotes: 4

Views: 1555

Answers (2)

Christian Klauser
Christian Klauser

Reputation: 4466

There is always System.IO.Compression which features a class called GZipStream. The ability to write real *.zip files will only be added in .NET 4.5 (see System.IO.Compression in 4.5).

So for now you can either try to write your own implementation (not recommended) or use a third-party component. Depending on the license of the component, you might be able to copy its code into your project (making patches to the component a bit cumbersome). The GPL for instance only requires you to release your source code when you distribute your derivative work. But in the case of a web application where no code or binary is actually given away, there are no consequences to using a GPL-ed library.

Upvotes: 9

Nikhil Agrawal
Nikhil Agrawal

Reputation: 48568

If at any point your mind changes and you want free third party option i guess this the the best you can get.

http://dotnetzip.codeplex.com/

Upvotes: 4

Related Questions