2008-04-28
SharpZipLib的"Wrong local header signature"错误
关键字: zip
解压缩一个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.
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.
发表评论
最近加入圈子
最新评论
-
配置HostMonster上的Rail ...
to angmeng 编辑/public_html/.htaccess,不是/ ...
-- by swordray -
配置HostMonster上的Rail ...
请问这两行# RewriteCond %{HTTP_HOST} ^www.dom ...
-- by angmeng -
配置HostMonster上的Rail ...
仙人指路
-- by weskycn







评论排行榜