Questions tagged [sevenzipsharp]

C# implementation of the 7-Zip library.

This is a C# library that allows .NET developers to use 7-Zip compression and decompression as well as the encryption that goes with it.

GitHub project page: squid-box/SevenZipSharp.

94 questions
0
votes
0 answers

Keeping specific directories when zipping files, using SevenZipSharp

In my Application im using the SevenZipSharp library and I want to compress an Array of Files. Each of my Files is in the same Directory, for example: abc/xyz/file1.txt abc/xyz/file2.txt When I call the Method CompressFiles, it cuts my Directory…
Febertson
  • 398
  • 4
  • 23
0
votes
2 answers

Why? C# Error after Refactor: 'The stream is invalid or no corresponding signature was found.'

This is a follow-on question from here: Decompress Stream to String using SevenZipSharp. The following code works in the sense that it takes a string and successfully compresses and decompresses it. using System; using System.IO; using…
SlowLearner
  • 3,086
  • 24
  • 54
0
votes
0 answers

Multiple files in memory stream in one result file for SevenZipCompressor

This has been for SharpZipLib What could be equivelant PutNextEntry equivalent for SevenZipCompressor ? I tried MemoryStream ms = new MemoryStream(fileByteList.First().Binary); MemoryStream compressedStream = new MemoryStream();…
asdf_enel_hak
  • 7,474
  • 5
  • 42
  • 84
0
votes
1 answer

Invalid RarHeader:16 in c# using SharpCompress Package

I am Facing Error when Extract a rar file in c# using sharpcompress package,i have tried in Nunrar,sevenzip extractor and so many packages,But facing that same error String filename = @"" + textBox8.Text; string ppath = @"" +…
0
votes
1 answer

Adding a file to a specific path in a 7-zip archive using SevenZipSharp

I am trying to add a file stored on my local disk to a 7-zip archive using SevenZipSharp and the 7z.dll. This file should be added to some path \a\b\c\... inside the archive. However, the CompressFiles method of SevenZipSharp's SevenZipCompressor…
HerpDerpington
  • 3,751
  • 4
  • 27
  • 43
0
votes
1 answer

open3: exec of failed at perl 5.18.2

I wrote perl script for zipping the files with Archive::SevenZip module. I got this error open3: exec of 7z -y -bd l -slt "Filelocation" failed at /usr/local/share/perl/5.18.2/Archive/SevenZip.pm. I can't able to resolve that.
keeru
  • 87
  • 6
0
votes
1 answer

C# extracting with sevenzipsharp and update progress bar without UI freeze

I'm having some problems with the file extraction. Everything works well with the progress bar output and the extraction. But when it is running the UI freezes. I've tried to use Task.Run() but then it doesn't really work well with the progress bar.…
Fredro
  • 67
  • 2
  • 7
0
votes
1 answer

Performance issues at extracting 7z file to a directory c#

I'm using SharpCompress library for extracting .7z files but it takes about 35 mins to extract 60mb .7z file. Is this normal or am I doing something wrong in terms of performance? .7z file is compressed in high compress mode and LZMA type. using…
Miral
  • 403
  • 5
  • 13
  • 30
0
votes
1 answer

SevenZipSharp, how to read txt file?

I am trying to read txt files from .7z archive using (StreamReader reader = new StreamReader(f + "//" + file.FileName)) but I get this error: An unhandled exception of type 'System.IO.DirectoryNotFoundException' occurred in mscorlib.dll …
White Angel
  • 1
  • 1
  • 1
0
votes
1 answer

Extract file using SevenZip

I'm trying to add a file unzipper to my application, so I googled a little and stumbled on the sevenzipsharp library that is able to extract the most common archive formats. So I for testing I created a simple application with a windows form. So…
Mech_Engineer
  • 535
  • 1
  • 19
  • 46
0
votes
1 answer

Error: The stream is invalid or no corresponding signature was found

I have this code: MemoryStream recChunk = new MemoryStream(); byte[] sizeChunkB = new byte[10]; int sizeChunk; streamLigacao.Read(sizeChunkB, 0, sizeChunkB.Length); sizeChunk = BitConverter.ToInt32(sizeChunkB, 0); int timesToEnter =…
meme
  • 597
  • 1
  • 10
  • 23
0
votes
1 answer

Saving compressed memory stream to filestream , endfile is corrupted

i am using seven.zip.sharp to compress a stream. I then want to after the compression is done, save the data in the memory stream to a filestream. The file being a ".7z" file. Problem: The output file is corrupted and i am unable to decompress it…
meme
  • 597
  • 1
  • 10
  • 23
0
votes
1 answer

SevenZipSharp comppress method doing nothing, but why?

at the begging I would like to make a point what is my target - to create split (non)compressed archive with keeping structure of catalog intact. I checked few libraries, but SevenZipSharp seems to be closest my way of doing that. Right now I have a…
Tomek
  • 701
  • 2
  • 8
  • 20
0
votes
0 answers

Adding ProcessBar to compress - SevenZipSharp

I want to add process bar when SevenZipSharp is compressing files/folders. I wrote something like: (check out comments) private void buttonCompress_Click(object sender, EventArgs e) { …
Kafus
  • 61
  • 1
  • 14
0
votes
1 answer

c# sevenzipsharp- adding folder to new/existing archive

I have some code compressing folders/files: SevenZipCompressor compressor = new SevenZipCompressor(); foreach (string listBoxItem in listBoxToCompress.Items) { string choosenPath =…
Kafus
  • 61
  • 1
  • 14