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
2
votes
2 answers

Why is compressed then uncompressed stream of different length

I'm using the SevenZipSharp library to compress and then uncompress a MemoryStream which contains a simple serialized object. However, the compressed and decompressed streams are of different length. From the code run below I get Input length:…
chris.au
  • 1,088
  • 2
  • 15
  • 41
2
votes
2 answers

How to create a SFX ZIP with SevenZipSharp?

I have been looking at SevenZipSharp to create a self extracting zip file. The project page says that they have a special class SevenZipSfx that does this. However I have searched the object explorer and the documentation for version 0.64 and I cant…
QueueHammer
  • 10,515
  • 12
  • 67
  • 91
2
votes
1 answer

The stream is invalid or no corresponding signature was found

I am trying to use SevenZipSharp to compress and decompress a memory stream. Compression is working fine but decompression is not. I think SevenZipSharp is not able to figure the archive type from the stream. SevenZipCompressor compress = new…
AbbasFaisal
  • 1,428
  • 2
  • 18
  • 21
2
votes
1 answer

How to extract a multi volume 7z file using SevenZipSharp?

I generated a multi volume 7z file using SevenZipSharp library. The problem I have is that when I try to extract the file, I get a exception about an invalid casting: Unable to cast object of type 'SevenZip.InMultiStreamWrapper' to type…
ElektroStudios
  • 19,105
  • 33
  • 200
  • 417
2
votes
0 answers

How to read the first part of a zipped file without decompressing the whole thing?

I have a zip file which may contain files of the type I want, but I don't know yet. When I open these files (when unzipped) in notepad, the first 8 characters are always the same. Is there a way to find out whether the first 8 characters match…
BeanFrog
  • 2,297
  • 12
  • 26
2
votes
2 answers

Decode an LZMA stream c#

I'm trying to decode an LZMA stream into a stream object so that I can read from it without hogging memory. My input file looks like: some uncompressed data . . some lzma compressed data . . And I'd like to read the uncompressed data, then make a…
maboesanman
  • 387
  • 4
  • 15
2
votes
2 answers

SevenZipSharp append an encrypted archive

I'm using seven zip sharp and am having issues trying to add a file to an encrypted archive. Appending to a non-encrypted archive (with appropriate methods) seems to work, but an encrypted archive throws this following error Invalid archive:…
Dawood Moazzem
  • 163
  • 3
  • 11
2
votes
0 answers

SevenZipSharp Password Check?

In the past i was suggested to use SevenZipExtractor.Check() to see if a file is password protected. This solution is giving me problems as Check() does an integrity check which means it decompresses everything. This takes far to long with the…
user34537
1
vote
2 answers

sevenzipsharp file lock. I can't move a file?

I am running sevenzipsharp on various archives and if it passes my test I'd like to move the archive into another folder. However I get an exception saying the file is in use by a process. I can't move it either in windows explorer however when i…
user34537
1
vote
2 answers

SevenZSharp Decode with password

I work with SevenZSharp from here for Decode file I use: CompressionEngine.Current.Decoder.DecodeIntoDirectory(@"D:\target\host_update.7z", @"D:\target"); But I don't have information how to decode .7z file with password!? Please, help me. Thanks
koder_mooder
  • 124
  • 1
  • 2
  • 9
1
vote
2 answers

Checking whether an archive is password-protected in Sevenzipsharp (C#)

I'm writing an window form similar to 7-Zip, my problem is in the extraction part, I don't know how to check if the archive I want to extract is password protected or not. Any idea?
carryall
  • 482
  • 3
  • 10
  • 21
1
vote
0 answers

Decompress 7z archive in memory with SevenZipSharp

I have a 7z archive containing hundreds of text files. I want to load each text file directly into memory. This code works, but it is slow: var memoryStreams = new List(); var st = new SevenZipExtractor("files.7z"); for (var i = 0; i <…
JJ Lison
  • 11
  • 1
1
vote
0 answers

SevenZipSharp library not working on Xamarin forms

We are working on a Xamarin project that needs to split a large file into smaller files with specified file sizes. we tried to use the SeveZipSharp library by installing the squid-box-sevenzipsharp NuGet package which supports xamarin forms for…
1
vote
2 answers

Appending Streams with SevenSharpZip

I've been knocking my head on this for 2 days. We're using 7ZipSharp to create .7z files from several source files (incoming emails in fact). In order to optimize the application, I want to avoid hard disk access so I switched to the…
CharlieBrown
  • 4,143
  • 23
  • 24
1
vote
1 answer

Set compression rootfolder in SevenZipSharp

I try to change an existing zipping tool. The zipping tool currently uses SharpZipLib. I have to convert it so that it uses SevenZipSharp. When zipping with SharpZipLib I can change the root directory of the zip and I want to keep this root…
Bongo
  • 2,933
  • 5
  • 36
  • 67