Unable to unRAR version 5.5 file #390

Open
opened 2026-01-29 22:11:10 +00:00 by claunia · 6 comments
Owner

Originally created by @xuejf-super on GitHub (Mar 26, 2020).

Originally created by @xuejf-super on GitHub (Mar 26, 2020).
claunia added the question label 2026-01-29 22:11:10 +00:00
Author
Owner

@adamhathcock commented on GitHub (Mar 26, 2020):

Going to need more detail.

Don’t believe they’ve changed the format again but I could be wrong.

@adamhathcock commented on GitHub (Mar 26, 2020): Going to need more detail. Don’t believe they’ve changed the format again but I could be wrong.
Author
Owner

@xuejf-super commented on GitHub (Mar 26, 2020):

The following code is used to decompress the compressed file of RAR 5.5, and an exception "file crc mismatch" is thrown

string path = @"C:\Users\Administrator\Desktop\1\1\2222.rar";
string fpath = @"C:\Users\Administrator\Desktop\1\1\2222";
using (Stream stream = File.OpenRead(path))
{
var reader = ReaderFactory.Open(stream, new ReaderOptions() { Password = "cxmt1508" });
while (reader.MoveToNextEntry())
{
if (!reader.Entry.IsDirectory)
{
Console.WriteLine(reader.Entry.Key);
reader.WriteEntryToDirectory(fpath, new ExtractionOptions() { ExtractFullPath = true, Overwrite = true });
}
}
}

@xuejf-super commented on GitHub (Mar 26, 2020): The following code is used to decompress the compressed file of RAR 5.5, and an exception "file crc mismatch" is thrown string path = @"C:\Users\Administrator\Desktop\1\1\2222.rar"; string fpath = @"C:\Users\Administrator\Desktop\1\1\2222"; using (Stream stream = File.OpenRead(path)) { var reader = ReaderFactory.Open(stream, new ReaderOptions() { Password = "cxmt1508" }); while (reader.MoveToNextEntry()) { if (!reader.Entry.IsDirectory) { Console.WriteLine(reader.Entry.Key); reader.WriteEntryToDirectory(fpath, new ExtractionOptions() { ExtractFullPath = true, Overwrite = true }); } } }
Author
Owner

@adamhathcock commented on GitHub (Mar 26, 2020):

RAR5 decryption isn't currently implemented

@adamhathcock commented on GitHub (Mar 26, 2020): RAR5 decryption isn't currently implemented
Author
Owner

@xuejf-super commented on GitHub (Mar 26, 2020):

okay, thank you

@xuejf-super commented on GitHub (Mar 26, 2020): okay, thank you
Author
Owner

@atiq-cs commented on GitHub (Dec 19, 2022):

SharpCompress Version="0.32.2"

Likewise, getting error on unrar / decryption,

Unhandled exception. System.InvalidOperationException: TODO rar5
   at SharpCompress.Common.Rar.Headers.FileHeader.get_FileCrc()
   at SharpCompress.Compressors.Rar.MultiVolumeReadOnlyStream.InitializeNextFilePart()
   at SharpCompress.Compressors.Rar.MultiVolumeReadOnlyStream..ctor(IEnumerable`1 parts, IExtractionListener streamListener)
   at SharpCompress.Archives.Rar.RarArchiveEntry.OpenEntryStream()
   at SharpCompress.Archives.IArchiveEntryExtensions.WriteTo(IArchiveEntry archiveEntry, Stream streamToWriteTo)
   at SharpCompress.Archives.IArchiveEntryExtensions.<>c__DisplayClass2_0.<WriteToFile>b__0(String x, FileMode fm)
   at SharpCompress.Common.ExtractionMethods.WriteEntryToFile(IEntry entry, String destinationFileName, ExtractionOptions options, Action`2 openAndWrite)
   at SharpCompress.Archives.IArchiveEntryExtensions.WriteToFile(IArchiveEntry entry, String destinationFileName, ExtractionOptions options)
   at SharpCompress.Common.ExtractionMethods.WriteEntryToDirectory(IEntry entry, String destinationDirectory, ExtractionOptions options, Action`2 write)
   at SharpCompress.Archives.IArchiveEntryExtensions.WriteToDirectory(IArchiveEntry entry, String destinationDirectory, ExtractionOptions options)
   at ConsoleApp.MediaTool.ExtractRar(String filePath) in D:\Code\CS\MediaTool\ConsoleApp\MediaTool.cs:line 104
@atiq-cs commented on GitHub (Dec 19, 2022): SharpCompress Version="0.32.2" Likewise, getting error on unrar / decryption, Unhandled exception. System.InvalidOperationException: TODO rar5 at SharpCompress.Common.Rar.Headers.FileHeader.get_FileCrc() at SharpCompress.Compressors.Rar.MultiVolumeReadOnlyStream.InitializeNextFilePart() at SharpCompress.Compressors.Rar.MultiVolumeReadOnlyStream..ctor(IEnumerable`1 parts, IExtractionListener streamListener) at SharpCompress.Archives.Rar.RarArchiveEntry.OpenEntryStream() at SharpCompress.Archives.IArchiveEntryExtensions.WriteTo(IArchiveEntry archiveEntry, Stream streamToWriteTo) at SharpCompress.Archives.IArchiveEntryExtensions.<>c__DisplayClass2_0.<WriteToFile>b__0(String x, FileMode fm) at SharpCompress.Common.ExtractionMethods.WriteEntryToFile(IEntry entry, String destinationFileName, ExtractionOptions options, Action`2 openAndWrite) at SharpCompress.Archives.IArchiveEntryExtensions.WriteToFile(IArchiveEntry entry, String destinationFileName, ExtractionOptions options) at SharpCompress.Common.ExtractionMethods.WriteEntryToDirectory(IEntry entry, String destinationDirectory, ExtractionOptions options, Action`2 write) at SharpCompress.Archives.IArchiveEntryExtensions.WriteToDirectory(IArchiveEntry entry, String destinationDirectory, ExtractionOptions options) at ConsoleApp.MediaTool.ExtractRar(String filePath) in D:\Code\CS\MediaTool\ConsoleApp\MediaTool.cs:line 104
Author
Owner

@adamhathcock commented on GitHub (Dec 19, 2022):

So we think there's a 5.5 specification change?

That exception is because the RAR 5 CRC isn't implemented properly.

@adamhathcock commented on GitHub (Dec 19, 2022): So we think there's a 5.5 specification change? That exception is because the RAR 5 CRC isn't implemented properly.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/sharpcompress#390