mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-02-03 21:23:38 +00:00
Add support for seeking with non-compressed RARs #35
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 @ljani on GitHub (May 17, 2015).
Originally assigned to: @adamhathcock on GitHub.
It'd be nice if RARs with
0x30(store) packing method could be seeked. That should work since that doesn't require any unpacking and can be read directly from disk. Some book keeping is needed though.@adamhathcock commented on GitHub (May 18, 2015):
If you open with RarArchive, can you not seek?
Or do you mean you want the Stream from RarArchive be seekable?
@ljani commented on GitHub (May 19, 2015):
I mean that it would be nice if the
StreamfromRarArchiveEntry.OpenEntryStream()would be seekable. For non-compressed rars, that shouldn't be too hard since you can read the stream directly from the file.I thought about writing a wrapper, but you had hid the implementation details in
internalclasses, so I couldn't access the data in egFileParts;)@adamhathcock commented on GitHub (May 19, 2015):
It should be easy enough to be an if statement here: https://github.com/adamhathcock/sharpcompress/blob/master/SharpCompress/Archive/Rar/RarArchiveEntry.cs#L74
I can't remember where the store flag is.
@ljani commented on GitHub (May 19, 2015):
All the interesting information is hidden in
FileHeader(eg.PackingMethod,CompressedSizeandDataStartPosition) and is not accessible to outside. I could to reflection, but it gets a bit ugly, because everything isinternal. Thus I decided against creating my own dirty wrapper and decided to ask if someone had interest to implement this properly in the library itself.@adamhathcock commented on GitHub (May 20, 2015):
It seems like you could :)
Just fork and adjust the code. It doesn't seem like it would be a big job.