sevenzipsharp

How would i use Sevenzipsharp with this code?

半腔热情 提交于 2020-01-20 04:53:31
问题 iv tried numerous different ways to get this to work and i got it to basicly work but i cant get the WaitForExit(); 's to work like they do here... so how would i convert this to work with sevenzip? cause i cant get it to work, and also i the SFX's are passworded so that they cannot be accessed except by the use of the program and as for adding the 7z.DLL i cant add it in because i get the error: A reference to 7za.dll could not be added. please make sure that the file is accessible, and that

How would i use Sevenzipsharp with this code?

扶醉桌前 提交于 2020-01-20 04:53:23
问题 iv tried numerous different ways to get this to work and i got it to basicly work but i cant get the WaitForExit(); 's to work like they do here... so how would i convert this to work with sevenzip? cause i cant get it to work, and also i the SFX's are passworded so that they cannot be accessed except by the use of the program and as for adding the 7z.DLL i cant add it in because i get the error: A reference to 7za.dll could not be added. please make sure that the file is accessible, and that

Excluding files with SevenZipSharp in Code

情到浓时终转凉″ 提交于 2020-01-16 06:11:18
问题 I'm currently on a little project where I have to define several paths that need to be compressed into one single zip-file. Now the following case: One of those paths is a directory, which should be compressed recursively (including all files and sub-folders it contains). Before I compress, I check several things including permissions. If the current user, which wants to compress, doesn't have the permission to a file or folder it should be excluded. Now how can I exclude several files and

How to create a compressed SFX file using SevenZipSharp?

只愿长相守 提交于 2020-01-04 01:55:46
问题 I will understand how to create a SFX using SevenZipSharp library. First of all I need to say I can't find any property to set the compression level, and all of that. And when I try to make an SFX of a file, I get this error: "Object reference not set to an instance of an object." If I try to make an SFX of a folder, I get this error: "Access to the path 'C:\test' is denied." (But is not True, I'm Admin and I've tested it with more avaliable folders...) This is the full class where I'm trying

detecting if a file is an archive using 7zip

末鹿安然 提交于 2019-12-24 03:35:12
问题 I would like to use SevenZipSharp in order to determine if a file is an archive. I know that it's possible because in explorer if I rename a .zip to .bmp, 7zip still recognises it as an archive. --edit: In other words, I want 7zip to tell me if a file (no matter the extension) contains some kind of supported archive (zip, tar, rar, iso etc.) Thanks, Fidel 回答1: static bool IsArchive(string filename) { bool result = false; try { new ArchiveFile(File.OpenRead(filename)); result = true; } catch {

How to create a SFX ZIP with SevenZipSharp?

送分小仙女□ 提交于 2019-12-24 01:53:40
问题 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 find any reference to it. Does anyone know if the class is missing or if there is a different meaning to "Special Class" that I'm missing? 回答1: It looks like the Sfx class isn't built by default. Grab the source code from Codeplex (or check out

How to create a SFX ZIP with SevenZipSharp?

无人久伴 提交于 2019-12-24 01:52:58
问题 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 find any reference to it. Does anyone know if the class is missing or if there is a different meaning to "Special Class" that I'm missing? 回答1: It looks like the Sfx class isn't built by default. Grab the source code from Codeplex (or check out

How to extract files in my archive one by one using sevenzipsharp

给你一囗甜甜゛ 提交于 2019-12-23 05:27:22
问题 I try using this Code : public void Extract(string SourceFile, string password) { SevenZipExtractor szip = new SevenZipExtractor(SourceFile, password); foreach (DataGridViewRow row in DGVFile.Rows) { string NameFile = (string)row.Cells[0].Value; int indexZip = szip.ArchiveFileData.IndexOf(NameFile); Stream pathDirectory = @"C:\\"; szip.ExtractFile(indexZip, pathDirectory); } } But thats Error, in line 7 and 8. Maybe anyone can explain how to get the index file in my archive with the name that

Decompress Stream to String using SevenZipSharp

时间秒杀一切 提交于 2019-12-13 18:17:41
问题 I'd like to compress a string using SevenZipSharp and have cobbled together a C# console application (I'm new to C#) using the following code, (bits and pieces of which came from similar questions here on SO). The compress part seems to work (albeit I'm passing in a file instead of a string), output of the compressed string to the console looks like gibberish but I'm stuck on the decompress... I'm trying to do the same thing as here (I think) : https://stackoverflow.com/a/4305399/3451115

7zipsharp extracting/decompressing stream to stream

你离开我真会死。 提交于 2019-12-12 03:26:56
问题 I am using sevenzipsharp library: http://sevenzipsharp.codeplex.com/ I made a similar question in witch i was compressing and decompressing a stream at the "same time" using threads, witch i since have deleted due to realizing that, that cannot be done. However my question still stands. How do i decompress/extract a compressed stream, not to a file, but to another stream. I have searched the examples provided by the sevenzipsharp creators in : http://sevenzipsharp.codeplex.com/SourceControl