-
大小: 1.21MB文件類型: .rar金幣: 2下載: 0 次發布日期: 2024-02-02
- 語言: 其他
- 標簽: SharpZipLib??dll??
資源簡介
在使用ICSharpCode.SharpZipLib進行目錄壓縮后,再解壓縮是提示這個錯誤Size mismatch: 4294967295;126976 70202;126976
我已經重新編譯過了,解決了該問題。
解決方法:在項目所引用庫“ICSharpCode.SharpZipLib.dll”的ICSharpCode.SharpZipLib.Zip.Compression. ZipInputStream.cs類中找到拋出異常的代碼段:
int BodyRead(byte[] buffer, int offset, int count)
{
...
if ((flags & 8) == 0 && (inf.TotalIn != csize || inf.TotalOut != size)) {
throw new ZipException("Size mismatch: " + csize + ";" + size + " " + inf.TotalIn + ";" + inf.TotalOut);
}
...
return count;
}
將
if ((flags & 8) == 0 && (inf.TotalIn != csize || inf.TotalOut != size)) {
throw new ZipException("Size mismatch: " + csize + ";" + size + " " + inf.TotalIn + ";" + inf.TotalOut);
}
注釋掉即可,解壓和壓縮一切都正常。

代碼片段和文件信息
using?System.Reflection;
using?System.Runtime.CompilerServices;
[assembly:?Assemblytitle(“CreateZipFile“)]
[assembly:?AssemblyDescription(“Free?C#?IDE“)]
[assembly:?AssemblyConfiguration(““)]
[assembly:?AssemblyCompany(““)]
[assembly:?AssemblyProduct(“A?SharpDevelop?sample“)]
[assembly:?AssemblyCopyright(“Mike?Krueger?2000“)]
[assembly:?AssemblyTrademark(““)]
[assembly:?AssemblyCulture(““)]
[assembly:?AssemblyVersion(“0.85.4.369“)]
[assembly:?AssemblyDelaySign(false)]
[assembly:?AssemblyKeyFile(““)]
[assembly:?AssemblyKeyName(““)]
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件?????212992??2010-01-25?16:50??SharpZipLib?源代碼和重新編譯后的dll文件\ICSharpCode.SharpZipLib.dll
?????文件?????212992??2010-01-25?16:55??SharpZipLib?源代碼和重新編譯后的dll文件\SharpZipLib_0854_SourceSamples\bin\ICSharpCode.SharpZipLib.dll
?????文件?????720384??2010-01-25?16:55??SharpZipLib?源代碼和重新編譯后的dll文件\SharpZipLib_0854_SourceSamples\bin\ICSharpCode.SharpZipLib.pdb
?????文件?????455728??2010-01-25?16:55??SharpZipLib?源代碼和重新編譯后的dll文件\SharpZipLib_0854_SourceSamples\bin\ICSharpCode.SharpZipLib.xm
?????文件????????110??2007-03-04?11:56??SharpZipLib?源代碼和重新編譯后的dll文件\SharpZipLib_0854_SourceSamples\build.bat
????.......?????10779??2007-08-25?06:47??SharpZipLib?源代碼和重新編譯后的dll文件\SharpZipLib_0854_SourceSamples\doc\Changes.txt
????.......?????18349??2007-03-04?11:54??SharpZipLib?源代碼和重新編譯后的dll文件\SharpZipLib_0854_SourceSamples\doc\COPYING.txt
????.......??????8618??2007-08-29?21:45??SharpZipLib?源代碼和重新編譯后的dll文件\SharpZipLib_0854_SourceSamples\doc\ReadMe.rtf
????.......????136949??2007-06-23?06:44??SharpZipLib?源代碼和重新編譯后的dll文件\SharpZipLib_0854_SourceSamples\doc\specification\appnote.txt
????.......?????38936??2007-01-26?21:30??SharpZipLib?源代碼和重新編譯后的dll文件\SharpZipLib_0854_SourceSamples\doc\specification\bzip2?-?Wikipedia?the?free?encyclopedia.htm
????.......?????36944??2007-03-04?11:54??SharpZipLib?源代碼和重新編譯后的dll文件\SharpZipLib_0854_SourceSamples\doc\specification\rfc-deflate.txt
????.......?????25037??2007-03-04?11:54??SharpZipLib?源代碼和重新編譯后的dll文件\SharpZipLib_0854_SourceSamples\doc\specification\rfc-gzip.txt
????.......?????20502??2007-03-04?11:54??SharpZipLib?源代碼和重新編譯后的dll文件\SharpZipLib_0854_SourceSamples\doc\specification\rfc-zlib.txt
????.......?????20502??2007-03-04?11:54??SharpZipLib?源代碼和重新編譯后的dll文件\SharpZipLib_0854_SourceSamples\doc\specification\rfc1950.txt
????.......?????36944??2007-03-04?11:54??SharpZipLib?源代碼和重新編譯后的dll文件\SharpZipLib_0854_SourceSamples\doc\specification\rfc1951.txt
????.......?????25037??2007-03-04?11:54??SharpZipLib?源代碼和重新編譯后的dll文件\SharpZipLib_0854_SourceSamples\doc\specification\rfc1952.txt
?????文件????????596??2007-03-04?11:56??SharpZipLib?源代碼和重新編譯后的dll文件\SharpZipLib_0854_SourceSamples\ICSharpCode.SharpZipLib.key
?????文件????????359??2007-08-23?21:45??SharpZipLib?源代碼和重新編譯后的dll文件\SharpZipLib_0854_SourceSamples\ICSharpCode.SharpZLib.cmbx
?????文件???????1452??2007-08-23?21:46??SharpZipLib?源代碼和重新編譯后的dll文件\SharpZipLib_0854_SourceSamples\ICSharpCode.SharpZLib.sln
????..A..H.????197632??2010-01-25?16:55??SharpZipLib?源代碼和重新編譯后的dll文件\SharpZipLib_0854_SourceSamples\ICSharpCode.SharpZLib.suo
?????文件????????158??2007-03-04?11:56??SharpZipLib?源代碼和重新編譯后的dll文件\SharpZipLib_0854_SourceSamples\installGAC.bat
?????文件???????1027??2007-09-07?23:29??SharpZipLib?源代碼和重新編譯后的dll文件\SharpZipLib_0854_SourceSamples\mkDistribution.bat
?????文件????????106??2007-09-06?07:57??SharpZipLib?源代碼和重新編譯后的dll文件\SharpZipLib_0854_SourceSamples\mkhelp.bat
?????文件??????????3??2007-09-07?23:31??SharpZipLib?源代碼和重新編譯后的dll文件\SharpZipLib_0854_SourceSamples\REVISION
????.......???????557??2007-09-07?23:41??SharpZipLib?源代碼和重新編譯后的dll文件\SharpZipLib_0854_SourceSamples\samples\cs\CreateZipFile\AssemblyInfo.cs
????.......???????600??2007-03-04?11:53??SharpZipLib?源代碼和重新編譯后的dll文件\SharpZipLib_0854_SourceSamples\samples\cs\CreateZipFile\CreateZipFile.cmbx
????.......??????2535??2007-06-30?09:52??SharpZipLib?源代碼和重新編譯后的dll文件\SharpZipLib_0854_SourceSamples\samples\cs\CreateZipFile\CreateZipFile.csproj
????.......???????439??2007-05-19?06:46??SharpZipLib?源代碼和重新編譯后的dll文件\SharpZipLib_0854_SourceSamples\samples\cs\CreateZipFile\CreateZipFile.csproj.user
????.......??????2811??2007-03-04?11:53??SharpZipLib?源代碼和重新編譯后的dll文件\SharpZipLib_0854_SourceSamples\samples\cs\CreateZipFile\CreateZipFile.prjx
????.......???????844??2007-05-19?06:46??SharpZipLib?源代碼和重新編譯后的dll文件\SharpZipLib_0854_SourceSamples\samples\cs\CreateZipFile\CreateZipFile.sln
............此處省略298個文件信息
- 上一篇:LabVIEW的人臉識別代碼
- 下一篇:紅綠燈protues仿真
評論
共有 條評論