Entry.WriteToDirectory crashes on a particular entry of a particular 7Zip archive #134

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

Originally created by @Tyrrrz on GitHub (Sep 27, 2016).

Archive in question: http://www.tyrrrz.me/dl/test.7z

The following code:

using (var archive = ArchiveFactory.Open(archiveFilePath, Options.None))
{
    foreach (var entry in archive.Entries)
    {
        entry.WriteToDirectory(destinationDirectory, ExtractOptions.ExtractFullPath | ExtractOptions.Overwrite);
    }
}

...raises "Method not supported" exception on all entries in the following folder: "sound\weapons" (the rest unpack fine).

I have tried the code above, using a reader, instead of iterating over entries, all to the same result.

Originally created by @Tyrrrz on GitHub (Sep 27, 2016). Archive in question: http://www.tyrrrz.me/dl/test.7z The following code: ``` using (var archive = ArchiveFactory.Open(archiveFilePath, Options.None)) { foreach (var entry in archive.Entries) { entry.WriteToDirectory(destinationDirectory, ExtractOptions.ExtractFullPath | ExtractOptions.Overwrite); } } ``` ...raises "Method not supported" exception on all entries in the following folder: "sound\weapons" (the rest unpack fine). I have tried the code above, using a reader, instead of iterating over entries, all to the same result.
claunia added the bug label 2026-01-29 22:07:10 +00:00
Author
Owner

@adamhathcock commented on GitHub (Sep 28, 2016):

Hah! Those entries are compressed with Deflate and for some reason it just wasn't implemented. Easy to do.

@adamhathcock commented on GitHub (Sep 28, 2016): Hah! Those entries are compressed with Deflate and for some reason it just wasn't implemented. Easy to do.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/sharpcompress#134