Reading a 3.9GB zip file using c# .net4.5 ZipArchive System.IO.Compression

952 views Asked by At

When I try to read the files contained in a large zip file (expands to 3.9GB) using ZipArchive, I get an InvalidDataException exception "The archive entry was compressed using an unsupported compression method" on the StreamReader line.

using (ZipArchive archive = ZipFile.OpenRead(zippedFileName))
{
    foreach (ZipArchiveEntry entry in archive.Entries)
    {
        using (StreamReader sr = new StreamReader(entry.Open()))
        {
            ...
        }
    }
}

The same code works file for a 600M (extracted) zip file.

Is there a way to get this to work?

0

There are 0 answers