Random access an encrypted multipart rar volume #50

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

Originally created by @Dreamcooled on GitHub (Aug 1, 2015).

Hei @adamhathcock
Thanks for sharing this project with us.
I'm trying to achieve some complicated stuff with rar and for that I have looked at number of unrar implementations (including the unrar code itself). Your implementation is by far the most advanced and best structured one 👍 .

What I'm trying to achieve:

  • Let's assume I have a multivolume rar archive which contains at least one big file (splitted).
  • The file in the archive might be encrypted or even the whole archive (including filenames).
  • I dont have the volumes on my disk, but I have a Stream subclass which allows random access and provides access to the volumes. This means I use the following constructor:
 var streams = new List<LazyStream>();
 ....
 RarArchive a = RarArchive.Open(streams, Options.None);
  • I try to random access the entry stream
a.Entries.First().OpenEntryStream().Read(...)

Even if we leave out the encryption for a second, we have multiple problems:

  • RarArchiveEntry.OpenEntryStream won't work with incomplete/multipart ArchiveEntries
  • MultiVolumeReadOnlyStream allows no random access

My Questions:

  • Is what I'm trying to achieve technologically possible? Or are there any showstoppers?
  • Would it be possible to achieve such a thing by extending sharpcompress, without having to rewrite almost everything?
  • If it's indeed possible, could you imagine supporting me in extending sharpcompress in that direction (e.g. if I have any questions...) ?

Background:
Movies, Tv Shows hosted on one-click-hosters are often delivered in 100mb parts. I already have a piece of software which allows you to automatically unpack parts (and start watching the content) while the missing parts are still loading.
But if you take this idea to the next level and combine a downloader, extractor and a player into one application, you would be able to provide an even greater experience (seeking !). Seeking in a mkv file is not a problem. Seeking in AES Stream is a bit harder (but should still be possible in theory, right?). But seeking in a multipart rar volume.....

Originally created by @Dreamcooled on GitHub (Aug 1, 2015). Hei @adamhathcock Thanks for sharing this project with us. I'm trying to achieve some complicated stuff with rar and for that I have looked at number of unrar implementations (including the unrar code itself). Your implementation is by far the most advanced and best structured one :+1: . **What I'm trying to achieve:** - Let's assume I have a multivolume rar archive which contains at least one big file (splitted). - The file in the archive might be encrypted or even the whole archive (including filenames). - I dont have the volumes on my disk, but I have a `Stream` subclass which allows random access and provides access to the volumes. This means I use the following constructor: ``` var streams = new List<LazyStream>(); .... RarArchive a = RarArchive.Open(streams, Options.None); ``` - I try to random access the entry stream ``` a.Entries.First().OpenEntryStream().Read(...) ``` Even if we leave out the encryption for a second, we have multiple problems: - `RarArchiveEntry.OpenEntryStream` won't work with incomplete/multipart ArchiveEntries - `MultiVolumeReadOnlyStream` allows no random access **My Questions:** - Is what I'm trying to achieve technologically possible? Or are there any showstoppers? - Would it be possible to achieve such a thing by extending sharpcompress, without having to rewrite almost everything? - If it's indeed possible, could you imagine supporting me in extending sharpcompress in that direction (e.g. if I have any questions...) ? **Background:** Movies, Tv Shows hosted on one-click-hosters are often delivered in 100mb parts. I already have a piece of software which allows you to automatically unpack parts (and start watching the content) while the missing parts are still loading. But if you take this idea to the next level and combine a downloader, extractor and a player into one application, you would be able to provide an even greater experience (seeking !). Seeking in a mkv file is not a problem. Seeking in AES Stream is a bit harder (but should still be possible in theory, right?). But seeking in a multipart rar volume.....
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/sharpcompress#50