mohammedn
mohammedn

Reputation: 2950

How to compress files in .NET 1.1

I need to compress files in [*.zip] format in .NET 1.1. I don't want to use SharpZip for compression as I got random errors - "Access Denied" - when running it in .NET 1.1.

SharptZip will work properly only if I put the assembly on the GAC - which is not an option in my project. This is the problem. Check this: http://forums.asp.net/p/1139901/1839049.aspx#1839049

Upvotes: 0

Views: 1034

Answers (4)

Rakhitha
Rakhitha

Reputation: 328

If you have the option of using J#.Net libraries you should be able to use java zip api included in it.

Here is a sample code.

Upvotes: 0

Cheeso
Cheeso

Reputation: 192617

You need to upgrade! .NET 1.1 is 6 years old now!

Upvotes: 0

axel_c
axel_c

Reputation: 6806

You could grab the zlib dll and use .NET interop to call the compression functions (if i remember correctly, you could get away with just 2 calls, one for library initialization and one to compress the data). Beware that you'll run problems on 64-bit architectures if you use a 32-bit zlib dll and vice versa.

Upvotes: 0

TcKs
TcKs

Reputation: 26632

You can use a command-line tool for zip. For example 7-Zip.

Upvotes: 1

Related Questions