Issue Reading Bz2 File #358

Open
opened 2026-01-29 22:10:38 +00:00 by claunia · 1 comment
Owner

Originally created by @lloiodice on GitHub (Jun 21, 2019).

Cannot Read File:
https://www.dropbox.com/s/04rxt3l9gjum3gi/install.log.3.bz2?dl=0

Using

        using (Stream stream = File.OpenRead("/tmp/install.log.3.bz2"))
        using (var reader = ReaderFactory.Open(stream))
        {
            while (reader.MoveToNextEntry())
            {
                if (!reader.Entry.IsDirectory)
                {
                    Console.WriteLine(reader.Entry.Key);
                    
                }
            }
        }

The exception is:

Cannot determine compressed stream type. Supported Reader Formats: Zip, GZip, BZip2, Tar, Rar, LZip, XZ

The bz2 opens fine using WinRar and 7Zip

Originally created by @lloiodice on GitHub (Jun 21, 2019). Cannot Read File: https://www.dropbox.com/s/04rxt3l9gjum3gi/install.log.3.bz2?dl=0 Using using (Stream stream = File.OpenRead("/tmp/install.log.3.bz2")) using (var reader = ReaderFactory.Open(stream)) { while (reader.MoveToNextEntry()) { if (!reader.Entry.IsDirectory) { Console.WriteLine(reader.Entry.Key); } } } The exception is: Cannot determine compressed stream type. Supported Reader Formats: Zip, GZip, BZip2, Tar, Rar, LZip, XZ The bz2 opens fine using WinRar and 7Zip
claunia added the enhancementup for grabs labels 2026-01-29 22:10:38 +00:00
Author
Owner

@adamhathcock commented on GitHub (Aug 20, 2019):

bz2 looks to be just a direct usage of a BZip2 stream. There is no direct ReaderFactory support for it as an Archive format. Probably similar to GZip archive format. Needs a PR

@adamhathcock commented on GitHub (Aug 20, 2019): `bz2` looks to be just a direct usage of a BZip2 stream. There is no direct ReaderFactory support for it as an Archive format. Probably similar to GZip archive format. Needs a PR
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/sharpcompress#358