0
.zip文件没有问题,但只有7z。使用SharpZipLib提取7z文件时出现“无法找到中央目录”错误
FileStream fs = File.OpenRead(archiveFilenameIn);
zf = new ZipFile(fs); // This is where we encountered an error
.zip文件没有问题,但只有7z。使用SharpZipLib提取7z文件时出现“无法找到中央目录”错误
FileStream fs = File.OpenRead(archiveFilenameIn);
zf = new ZipFile(fs); // This is where we encountered an error
的ZipFile
类只处理.zip
文件,而不是.7z
文件。
其实SharpZipLib
does not support .7z
files at all。
“中央目录”是一个压缩文件中存在的所有文件的列表以及它们的位置,用于在不读取整个文件的情况下快速提取一个文件或获取文件列表。
嗨Lasse,谢谢你回答我的问题。你知道我有没有好用的工具(免费)?主要是,我需要实现的是解压这个7z文件。我最后的手段是使用7z.exe,但我不想那样。 真的很感激。提前致谢。 –
不,不幸的是,我不知道哪些库或者什么不适合这个。 –
这就是Lasse。谢谢! –