Abby Jangir
Abby Jangir

Reputation: 65

ZipFile API throws error when opening file

"zipfile" throws an error for ExtractToDirectory and all other functions when extracting files of huge size (> 1GB). Error: Number of entries expected in End Of Central Directory does not correspond to number of entries in Central Directory.'

string zipPath = @"C:\Users\ABC\Work\sample.exe";
string extractPath = @"C:\Users\ABC\Work\New\";
ZipFile.ExtractToDirectory(zipPath, extractPath);

Note: The file is not corrupted as it can be extracted using 7zip.

Upvotes: 1

Views: 120

Answers (0)

Related Questions