When UnZip, Entry.Size = 0 but in reality it's not so + Entry.Attrib value = "Entry.Attrib threw an exception of type 'System.NotImplementedException'" #688

Open
opened 2026-01-29 22:15:54 +00:00 by claunia · 0 comments
Owner

Originally created by @alexey-shilkin on GitHub (Jul 14, 2025).

I wrote C# code below, where SrcFullFileName = attached zip file:

using (Stream stream = File.OpenRead(SrcFullFileName)){
using (SharpCompress.Readers.IReader? reader = ReaderFactory.Open(stream)){
while (reader.MoveToNextEntry()) {
int i = reader.Entry.Size; /// = 0 - it is a bug + also Entry.Attrib value = "Entry.Attrib threw an exception of type 'System.NotImplementedException'"
}
}
}

Problem is that after reader.MoveToNextEntry() when Entry has been read - entry has size = 0, but actually it is not 0 + Entry.Attrib threw exception System.NotImplementedException (see screeenshot)

I use nuget SharpCompress 0.40.0 (same bug was in earlier versions as well) + .NET 9 + VS 17.14.8

bug - size of XML is 0 but its size is not 0.zip

Image

Originally created by @alexey-shilkin on GitHub (Jul 14, 2025). I wrote C# code below, where SrcFullFileName = attached zip file: using (Stream stream = File.OpenRead(SrcFullFileName)){ using (SharpCompress.Readers.IReader? reader = ReaderFactory.Open(stream)){ while (reader.MoveToNextEntry()) { int i = reader.Entry.Size; /// = 0 - it is a bug + also Entry.Attrib value = "Entry.Attrib threw an exception of type 'System.NotImplementedException'" } } } Problem is that after reader.MoveToNextEntry() when Entry has been read - entry has size = 0, but actually it is not 0 + Entry.Attrib threw exception System.NotImplementedException (see screeenshot) I use nuget SharpCompress 0.40.0 (same bug was in earlier versions as well) + .NET 9 + VS 17.14.8 [bug - size of XML is 0 but its size is not 0.zip](https://github.com/user-attachments/files/21219822/bug.-.size.of.XML.is.0.but.its.size.is.not.0.zip) ![Image](https://github.com/user-attachments/assets/43a41a81-6656-46df-ae90-27fbf27b02d9)
claunia added the bugup for grabs labels 2026-01-29 22:15:54 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/sharpcompress#688