Is there a library builtin that could be used to extract rar
files in dotnet core? I found something to extract zip files, but nothing for rar
files. Used 7zip in 4.5
Asked
Active
Viewed 3,714 times
3

Martin Serrano
- 3,727
- 1
- 35
- 48

Asad Ali
- 151
- 1
- 12
-
It is already answered here: http://stackoverflow.com/questions/34952962/unzip-archive-in-net-core-1-0 – Yaser Nov 27 '16 at 22:28
-
@YaserAdelMehraban The answer you provided doesn't mention .rar archieves – NtFreX Nov 27 '16 at 23:06
-
Do you get an answer to this question?! – Hamed Hajiloo Nov 10 '22 at 19:04
1 Answers
6
It seems like there is nothing builtin to extract multipart rar files in .net. There are libraries for .net but not dotnet core as described here. (maybe they can easily be ported)
The ZipFile
class from System.IO.Compression
supports both .zip and .rar (not multipart) archives.
You can open an archive like this:
using(ZipArchive za = ZipFile.OpenRead(strPath))
{
//do something with `za.Entries` or with other properties
}
-
2This I believe works for a single rar but didn't work for a multipart rar file – Asad Ali Nov 28 '16 at 14:07
-
@AsadHasnaini You could try to port the [C# (.net) interface for 7-Zip archive dlls](http://dev.nomad-net.info/articles/sevenzipinterface) library which is in the answer I edited into the post – NtFreX Nov 28 '16 at 14:30
-
1