You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Solid Multipart RAR4.x archive fails to decompress due to 2 if statements intentionally throwing exceptions. When these 2 checks are commented out the archive extracts without issue.
I have tried various other approaches that all failed. Either complaining that it is solid and to use ExtractAllFiles(). When Trying ExtractAllFiles it complained that it was MultiVolume.
My successful test was using the following method.
public static class IArchiveEntryExtensions
{
public static void WriteTo(this IArchiveEntry archiveEntry, Stream streamToWriteTo)
{
//Nanook
//if (archiveEntry.Archive.Type == ArchiveType.Rar && archiveEntry.Archive.IsSolid)
//{
// throw new InvalidFormatException("Cannot use Archive random access on SOLID Rar files.");
//}
and in RarArchiveEntry.cs
public Stream OpenEntryStream()
{
//Nanook
//if (archive.IsSolid)
//{
// throw new InvalidOperationException("Use ExtractAllEntries to extract SOLID archives.");
//}
I realise there's probably a legitimate reason for these checks. I just wanted to raise this for consideration.
Thanks for a great compression library.
The text was updated successfully, but these errors were encountered:
Nanook
changed the title
Solid Multipart RAR4.x archive - Fails but works with a 2 comments.
Solid Multipart RAR4.x archive - Fails but works with 2 comments.
Oct 10, 2018
Solid Multipart RAR4.x archive fails to decompress due to 2 if statements intentionally throwing exceptions. When these 2 checks are commented out the archive extracts without issue.
I have tried various other approaches that all failed. Either complaining that it is solid and to use ExtractAllFiles(). When Trying ExtractAllFiles it complained that it was MultiVolume.
My successful test was using the following method.
and commenting out the following code:
and in RarArchiveEntry.cs
I realise there's probably a legitimate reason for these checks. I just wanted to raise this for consideration.
Thanks for a great compression library.
The text was updated successfully, but these errors were encountered: