GZipArchives created from a stream have ArchiveType set to Tar instead of GZip #642

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

Originally created by @Morilli on GitHub (May 30, 2024).

Since 61c01ce9b0, GZipArchives created from a source stream get their ArchiveType set to ArchiveType.Tar instead of ArchiveType.GZip.

6fc4b045fd/src/SharpCompress/Archives/GZip/GZipArchive.cs (L103-L104)

This gives an incorrect ArchiveType when checking with ArchiveFactory.Open for example.

Originally created by @Morilli on GitHub (May 30, 2024). Since 61c01ce9b083ed9c23229ee4d75975cfa0aa58e1, `GZipArchive`s created from a source stream get their `ArchiveType` set to `ArchiveType.Tar` instead of `ArchiveType.GZip`. https://github.com/adamhathcock/sharpcompress/blob/6fc4b045fde70c42df738d203c453082354e9558/src/SharpCompress/Archives/GZip/GZipArchive.cs#L103-L104 This gives an incorrect `ArchiveType` when checking with `ArchiveFactory.Open` for example.
claunia added the bug label 2026-01-29 22:15:12 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/sharpcompress#642