C
C#10mo ago
Killers0992

Problems with sharp compress | ZlibException: Bad state (incomplete literal/length tree

Code ( error in attachment )
byte[] buffer = new byte[uploadFile.Size];

await uploadFile.OpenReadStream(5368709120).ReadAsync(buffer);

var memStream = new MemoryStream(buffer);

var factory = ArchiveFactory.Open(memStream, new SharpCompress.Readers.ReaderOptions()
{
LookForHeader = true
});

foreach(var entry in factory.Entries)
{
if (!entry.Key.EndsWith(".tar")) continue;

entry.WriteToFile("./file");
}
byte[] buffer = new byte[uploadFile.Size];

await uploadFile.OpenReadStream(5368709120).ReadAsync(buffer);

var memStream = new MemoryStream(buffer);

var factory = ArchiveFactory.Open(memStream, new SharpCompress.Readers.ReaderOptions()
{
LookForHeader = true
});

foreach(var entry in factory.Entries)
{
if (!entry.Key.EndsWith(".tar")) continue;

entry.WriteToFile("./file");
}
Anyone has some clue why this happens
No description
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server