Периодически возникает задача что-то упаковать, распаковать, да и просто сделать автоматическую кладовку.

Собираю подборку библиотек:

1. SharpCompress

SharpCompress is a fully managed C# library to deal with many compression types and formats.

https://github.com/adamhathcock/sharpcompress

2. SevenZipSharp

Managed 7-zip library written in C# that provides data (self-)extraction and compression (all 7-zip formats are supported). It wraps 7z.dll or any compatible one and makes use of LZMA SDK.

https://archive.codeplex.com/?p=sevenzipsharp

3. SevenZipLib

SevenZipLib is a lightweight, easy-to-use managed interface to the 7-zip library.

https://archive.codeplex.com/?p=sevenziplib

4. Rar.exe — через командную строку

Есть вариант — через командную строку — rar.exe с параметрами, описание их в файлике, который идет в комплекте с winrar’ом

5. 7z.dll — C# (.net) interface for 7-Zip archive dlls

7-Zip is open-source archive program with plug-in interface. New archive formats and/or archive codecs can be added by dlls. 7-Zip ships with several archive formats preinstalled:

  • 7z — its own format features good compression (LZMA, PPMd) but can be slow in terms of packing/unpacking
  • Packing / unpacking: ZIP, GZIP, BZIP2 and TAR
  • Unpacking only: RAR, CAB, ISO, ARJ, LZH, CHM, Z, CPIO, RPM, DEB and NSIS

http://dev.nomad-net.info/articles/sevenzipinterface

7. NUnrar — Unrar in pure C#

NUnrar is a native C# unrar library that supports forward-only (i.e. Network) streams and Silverlight. No intermediate buffering necessary. Random access is also available. It was ported from the JUnrar version of unrar (http://java-unrar.sourceforge.net/) by Edmund Wagner.

https://archive.codeplex.com/?p=nunrar

8. SharpCompress — a fully native C# library for RAR, 7Zip, Zip, Tar, GZip, BZip2

SharpCompress is a compression library in pure C# for .NET Standard 1.3 and 2.0 that can unrar, un7zip, unzip, untar unbzip2 and ungzip with forward-only reading and file random access APIs. Write support for zip/tar/bzip2/gzip are implemented.

The major feature is support for non-seekable streams so large files can be processed on the fly (i.e. download stream).

https://github.com/adamhathcock/sharpcompress

Закладки на чтение

есть примеры кода: https://stackoverflow.com/questions/3238173/how-to-extract-a-rar-file-in-c

Нет комментариев
Комментарии к: Как работать с RAR-архивами в C#?

Ваш адрес email не будет опубликован. Обязательные поля помечены *

Attach images - Only PNG, JPG, JPEG and GIF are supported.

Good Reads

Worlwide

Trending

Login

Welcome to Typer

Brief and amiable onboarding is the first thing a new user sees in the theme.
Join Typer
Registration is closed.