Questions tagged [sharpcompress]

SharpCompress is a compression library for .NET/Mono/Silverlight/WP7 that can unrar, un7zip, unzip, untar unbzip2 and ungzip with forward-only reading and file random access APIs.

SharpCompress is a compression library for .NET/Mono/Silverlight/WP7 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 is implemented.

32 questions
5
votes
2 answers

SharpCompress & LZMA2 7z archive - very slow extraction of specific file. Why? Alternatives?

I have a 7zip archive craeted with LZMA2 compression (compression level: ultra). The archive contains 1,749 files, which in total originally had a size of 661mb. The zipped file is 39mb in size. Now I'm trying to use C# to extract a tiny…
Bogey
  • 4,926
  • 4
  • 32
  • 57
5
votes
1 answer

Using SharpCompress to identify the volumes associated with a given RAR archive

TL;DR the sample code given on the site's home page does not compile. How to list all the volumes in a multi-part RAR file? Problem definition I have a Windows 10 folder with lots of multi-part RAR files. The 'root' rar and its parts need to be…
Gayot Fow
  • 8,710
  • 1
  • 35
  • 48
4
votes
0 answers

Unrar WinRar 5.5 archives in C#

In July 2017 WinRar released version 5.5 which made changes to the rar standard. Since then, our library of choice, SharpCompress, fails with any archives produced by that version: System.InvalidOperationException: Cannot determine compressed stream…
Flai
  • 160
  • 1
  • 8
3
votes
1 answer

How to unpack a .xz (lzma2) file using sharpcompress

I have downloaded the SharpCompress source code and created a simple console application to decompress a small .xz file. Following several different examples on the github site and other examples here on stackoverflow, I can't find any combinations…
mobiletonster
  • 407
  • 1
  • 6
  • 10
1
vote
2 answers

create an 7zip archive with sharpcompress

I need to compress a file as 7zip using SharpCompress: http://sharpcompress.codeplex.com what I have done as follows: using (var archive = ZipArchive.Create()) { archive.AddEntry("CompressionTest.pdb", new FileInfo("CompressionTest.pdb")); …
olidev
  • 20,058
  • 51
  • 133
  • 197
1
vote
0 answers

Extracting 7z file with millions of 200 bit file size inside take hours to finish. How to speed up?

Good day, I've created my own custom Wizard Installer for my website project. My goal is to minimize the work during the installation of our client. I'm trying to extract a 7z file that has millions of tiny files (200-bit size of each file) inside.…
Noryn Basaya
  • 664
  • 1
  • 5
  • 21
1
vote
0 answers

How can I extract the files from a .rar archive protected by password, using SharpCompress?

I want to extract the files from a given .rar archive, which is password protected. I have the following: pwd = "password"; srs = @"c:\path\file.rar" des = @"c:\path\folder" using (var archive = RarArchive.Open(srs, new ReaderOptions() { Password =…
Karne
  • 11
  • 3
1
vote
0 answers

SharpCompress.Rar IEntry extract, write to StorageFile

// Create buffer byte[] buffer = new byte[entry.Size]; // Create a file to store the contents StorageFile file = await extractFolder.CreateFileAsync(Path.GetFileName(entry.Key), CreationCollisionOption.ReplaceExisting); // Store the contents using…
Christos K.
  • 99
  • 3
  • 14
1
vote
1 answer

Get volumes files from multi part rar file c#

I have multi-part RAR files in the same folder and I want to check if all parts of the RAR exist. I am using SharpCompress v0.24, here is my code: using (var archive = RarArchive.Open("D:/Ontology tool.part1.rar")) { foreach (RarVolume vol in…
Fath Bakri
  • 161
  • 1
  • 12
1
vote
1 answer

Decompressing bzip2 data in Javascript

I ultimately have to consume some data from a Javascript file that looks as follows: Note: The base64 is illustrative only. function GetTripsDataCompressed() { return 'QlpoOTFBWSZTWdXoWuEDCAgfgBAHf/.....=='; } GetTripsDataCompressed() returns a…
TheEdge
  • 9,291
  • 15
  • 67
  • 135
1
vote
2 answers

C#: Programmatically create a split zip file

I want to create a zip file from a folder that it around 1.5GB, and have that zip file be split into chunks of 100MB. I've found quite a few threads on this, but nothing has quite worked out for me. First I tried System.IO.Compression, but found…
John Darvill
  • 1,274
  • 11
  • 17
1
vote
1 answer

Using a generic stream to create a zipped file with SharpCompress

Since System.IO.Compression seems to be out of reach for now if I want to use both dotnet core + net461, I've tried with SharpCompress. The "read zip" part was easy, but I am having trouble finding out how to write to a zip stream. The wiki of the…
Xavier Peña
  • 7,399
  • 9
  • 57
  • 99
1
vote
1 answer

Dropbox folder download issue (c#)

I'm automaticly downloading a whole folder from my Dropbox - storage(?), via the weblink eg:https://www.dropbox.com/sh/bunchOfLetters/somthnsomthn?dl=1 with just a basic webclient: using (WebClient wc = new WebClient()) { wc.DownloadFile(new…
1
vote
2 answers

c# sharpcompress : How to check progress

IArchive rar = SharpCompress.Archive.Rar.RarArchive.Open(new FileInfo("ze.rar"), SharpCompress.Common.Options.None); rar.WriteToDirectory(Directory.GetCurrentDirectory() + "\\DATA", SharpCompress.Common.ExtractOptions.Overwrite); With the…
1
vote
1 answer

Don't modify file's edit date when this is added to a archive

I'm creating my zip archive using SharpCompress library. I successfully create Zip archive but, the library, automaticcally update file's edit date to current datetime. I don't want this behaviour. What I would is: the edit date will be unchanged…
BAD_SEED
  • 4,840
  • 11
  • 53
  • 110
1
2 3