DeflateStream 4GB Limit in .NET

From MSDN: DeflateStream Class

DeflateStream cannot be used to compress files larger than 4 GB.

Are there any other implementations for .NET without a 4 GB limit?

NOTE. I really need to unzip a GZ file with content larger than 4 GB. Can any code do this?

+6
c # gzip compression
Feb 02 '09 at 22:19
source share
7 answers

Take a look at SharpZipLib . Not sure if he is subject to the same limitations, but worth a look.

+2
Feb 02 '09 at 22:53
source share

FYI, we removed the 4 GB limit from DeflateStream in .NET 4.

+8
Feb 03 '09 at 3:02
source share

There is sample code in CodeProject using the 7-Zip library.

The license is open, so you can use it in your project.

7-Zip also supports GZ files.

+7
Feb 02 '09 at 22:38
source share

Looking back, it seems that many people are faced with this problem. Details of System.IO.Compressio.DeflateStream, please , are the most comprehensive.

The only implementation I could find that seems to overcome this problem with Zip64 is Xceed Zip for .NET .

However, it is very expensive, and I'm not sure if it will satisfy your needs.

Edit:

It seems that there are many Zip64 implementations for .NET, but I can not find any free ones.

+1
Feb 02 '09 at 22:32
source share

Look for libraries that support DEFLATE64 (not Zip64, this is an extension in the ZIP file format). Xceed Zip for .NET supports Deflate64, and I'm sure others do too.

+1
Feb 03 '09 at 2:51
source share

DotNetZip makes ZIP64 for .NET, and it's free. But Zip64 is not the same as Deflate64.

0
Mar 05 '09 at 9:29
source share

Although this documentation specifies a 4 GB limit for both DeflateStream and GZipStream, only GZipStream is limited due to the CRC32 checksum. If you do not need CRC32, use DeflateStream.

0
Jun 02 '09 at 12:36
source share



All Articles