解压缩一个zip文件时遇到错误,并且这个文件可以用winzip打开,确定是zip格式,内容无误。

google之找到一段解释,大意是文件头格式不标准,不能用ZipInputStream打开,只能用ZipFile类:

http://community.icsharpcode.net/forums/p/7410/21075.aspx
引用

I mean try using the ZipFile class to open the files.  This mimics what WinZip and other archivers typically do as streaming access is problematic in many ways.

Handling of SFX is one case where streaming access cant easily do the job.  The files you have appear to be non-standard in the sense that they dont start with a zip file immediately but have some other data at the beginning.
评论
发表评论

您还没有登录,请登录后发表评论

swordray
搜索本博客
最近加入圈子
存档
最新评论