mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-02-07 21:22:04 +00:00
Unable to unRAR version 5.5 file #390
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 @xuejf-super on GitHub (Mar 26, 2020).
@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.
@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 });
}
}
}
@adamhathcock commented on GitHub (Mar 26, 2020):
RAR5 decryption isn't currently implemented
@xuejf-super commented on GitHub (Mar 26, 2020):
okay, thank you
@atiq-cs commented on GitHub (Dec 19, 2022):
Likewise, getting error on unrar / decryption,
@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.