Reading deflate file throw "Unexpected EOF"
まだ誰も着手していません。
評価
調査の方向性
InflaterInputStream.Read から始め、添付された data.zip と issue に示されているコンソールアプリケーションを使って失敗を再現します。unexpected EOF が発生する箇所を追跡し、その後、この入力の読み取りが例外なしで完了することを確認して、再現したケースのカバレッジを追加します。
索引モデルが issue の本文から書いたものです。
説明
Describe the bug
Hello community,
i am not really firm with deflate compremissed files but with the attached file (data.zip) i get a unexpeced EOF exception from the InflaterInputStream class. It is reproducible with the following code at line var size = _inflater.Read(data, 0, data.Length);
using (var input = new FileStream(@"data4.bin", FileMode.Open))
{
using (var output = new MemoryStream(65536))
{
using (var _inflater = new InflaterInputStream(input))
{
var data = new byte[4096];
while (true)
{
data = new byte[4096];
var size = _inflater.Read(data, 0, data.Length);
if (size > 0)
{
output.Write(data, 0, size);
}
else
{
break;
}
}
}
}
}
Best regards
Daniel
Reproduction Code
No response
Steps to reproduce
Create a console app, add the latest release as nuget package of SharpZipLib and run the above code.
Expected behavior
It should not throw a exception
Operating System
Windows
Framework Version
No response
Tags
No response
Additional context
No response
- 主要言語
- C#
- スター
- 3.9k
- フォーク
- 1k
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
icsharpcode/SharpZipLib のほかの issue
-
*no response* bug
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
icsharpcode/SharpZipLib#905 · コメント 1 件 ·
-
bug bzip2
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
icsharpcode/SharpZipLib#904 ·
-
SetLevel in ZipFile オープンenhancement zip
難易度 2/5 1〜2日 初心者へのやさしさ 55/100
icsharpcode/SharpZipLib#903 ·
-
*no response* bug
難易度 4/5 3〜5日 初心者へのやさしさ 32/100
icsharpcode/SharpZipLib#901 · コメント 1 件 ·
-
*no response* bug
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
icsharpcode/SharpZipLib#894 · コメント 1 件 ·
icsharpcode/SharpZipLib の issue をすべて見る
似ている issue
-
bug
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
-
Type: enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
apache/arrow-adbc#4809 ·
-
type/automation type/tech-debt
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
microsoft/vscode-azurefunctions#5197 · コメント 1 件 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
microsoft/microsoft-ui-reactor#1274 ·