mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-02-07 05:34:35 +00:00
Multi-volume Rar streams #167
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @krvi on GitHub (Apr 20, 2017).
I'm attempting to read the contents of multi-volume Rar archive. The archive is never written to disk so I need to read them as streams. I do the following steps.
1: Declare a dictionary, rather than List, simply for ease of ordering/sorting.
var rd = new Dictionary<string, Stream>();2: Populate the dictionary.
2.5: Ensure that the streams are ordered. For example:
file.part1.rar
file.part2.rar
file.part2.rar
or
file.rar
file.r00
file.r01
3: Open archive
var ra = RarArchive.Open(rd.Values.AsEnumerable());From what I've read it is supposed to work with this procedure. However, it does not work.
ra.WriteToDirectory(@"C:\test\");Produces nothing and neither doesIf I open the archive with only the first volume with ArchiveFactory
var ra = ArchiveFactory.Open(rd.Values.First());It works, for the whole files in the first volume. I can successfully use them and write them to disk.
What am I missing to be able to read the whole archive? Is this intended behavior or a bug?