I have created a very simple program in C# using the DotNetZip dll. I am trying to extract a zip file that chooses the best compression. Here is the code.
static void Main(string[] args)
{
string nameOfFile = "testBest.zip";
string directory = "testBest";
Console.WriteLine("Extracting file {0} to {1}", nameOfFile, directory);
using (ZipFile zip = ZipFile.Read(nameOfFile))
{
foreach (ZipEntry e in zip)
{
e.Extract(directory, ExtractExistingFileAction.OverwriteSilently);
}
}
}
And the error says one of the txt files uses an unsupported compression method.
Can the DotNetZip library not extract zip files when using Best compression? Is there a way to handle this? What are the alternatives?