简体   繁体   English

Ionic.Zip库无法提取.rar文件C#

[英]Ionic.Zip library unable to extract .rar file C#

I am trying to extract .rar file using .net zip library (Ionic.Zip.dll). 我正在尝试使用.net zip库(Ionic.Zip.dll)提取.rar文件。 I got error " cannot read that as a zipfile " while executing following code; 执行以下代码时出现错误“ 无法将其读取为zipfile ”;

using (ZipFile zip1 = ZipFile.Read("E:\\APPS\\package.rar")){
}

I know the error is self explanatory but documentation of Ionic.Zip says that it can be used to extract .rar files. 我知道该错误是不言自明的,但Ionic.Zip的文档称该错误可用于提取.rar文件。 Any ideas? 有任何想法吗?

Well, I not found anywhere in description that DotNetZip can extract rar files. 好吧,我在说明中DotNetZip可以提取rar文件的地方。 He can extract zip created with WinRAR but nowhere notice rar file can be extracted. 他可以解zip使用WinRAR创建的zip ,但无法解WinRAR rar文件。

DotNetZip - Zip and Unzip in C#, VB, any .NET language DotNetZip-用C#,VB,任何.NET语言压缩和解压缩

But, there is something interesting (link bellow) : 但是,有一些有趣的东西(下面的链接):

SharpCompress - a fully native C# library for RAR, 7Zip, Zip, Tar, GZip, BZip2 SharpCompress-用于RAR,7Zip,Zip,Tar,GZip,BZip2的完全本机C#库

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM