Files in archives obtained from Mac Archive Utility have a zero Size and CompressedSize #204

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

Originally created by @KvanTTT on GitHub (Jul 3, 2017).

I'm using the following code to read files from archive:

using (Stream stream = File.OpenRead(sourceArchiveFileName))
{
    using (IReader reader = ReaderFactory.Open(stream))
    {
        while (reader.MoveToNextEntry())
        {
            long size = entry.Size; // Always equals to zero!
            long compressedSize = entry.CompressedSize; // Always equals to zero!
        }
    }
}

I also attach an archive obtained from Mac Archive Utility: file.txt.zip

Originally created by @KvanTTT on GitHub (Jul 3, 2017). I'm using the following code to read files from archive: ```CSharp using (Stream stream = File.OpenRead(sourceArchiveFileName)) { using (IReader reader = ReaderFactory.Open(stream)) { while (reader.MoveToNextEntry()) { long size = entry.Size; // Always equals to zero! long compressedSize = entry.CompressedSize; // Always equals to zero! } } } ``` I also attach an archive obtained from Mac Archive Utility: [file.txt.zip](https://github.com/adamhathcock/sharpcompress/files/1120504/file.txt.zip)
claunia added the question label 2026-01-29 22:08:19 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/sharpcompress#204