sevenzipsharp

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

无人久伴 提交于 2019-12-11 18:32:14
问题 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 SevenZip; namespace _7ZipWrapper { public class ProgramOriginal { public static void Main() // This should be broken into separate methods { // Setup Input String var strToCompress = "This String"; // will pass as parameter var memStreamToCompress = new

Why sfx sevenzipsharp '7-zip : unsupported method' when extract?

送分小仙女□ 提交于 2019-12-07 16:59:36
问题 I have created hallo.7z and used 7zxSD_LZMA.sfx as module. I think my configuration is right but while extracting sfx I receive 7-zip : unsupported method void CreateExeFile() { try { SfxModule mdl = SfxModule.Extended; SevenZipSfx sfx = new SevenZipSfx(mdl); sfx.ModuleFileName = @"7zxSD_LZMA.sfx"; sfx.MakeSfx("D:\\hallo.7z", new Dictionary<string, string> { { "Title", "Extract Files" }, { "InstallPath", ProgramFilesx86() + "\\ATIG Platform" }, { "BeginPrompt", "Choose directory }, {

how to basically extract file with sevenzipsharp

╄→尐↘猪︶ㄣ 提交于 2019-12-07 12:05:15
问题 I will extract files to usb from iso file with sevenzipsharp. For this, I download sevenzipsharp from vs nuget package manager and I coded (actually I couldn't :) ) this code . I dont take any error but It isnt working. Where do I make mistakes? Please write details. if (IntPtr.Size == 8) //x64 { SevenZip.SevenZipExtractor.SetLibraryPath(@"C:\Program Files\7-Zip\7z.dll"); } else //x86 { SevenZip.SevenZipCompressor.SetLibraryPath(@"C:\Program Files (x86)\7-Zip\7z.dll"); } using (var file = new

SevenZipSharp - compress memory stream

浪尽此生 提交于 2019-12-04 00:28:44
问题 I am using SevenZipSharp in order to compress files into a zip file. Is there a way to use it to create a zip from a memory stream (meaning, load the file into the memory stream before)? Thanks, Maya. 回答1: I'm using SevenZipSharp with streams no problem what so ever. SevenZip.SevenZipCompressor compressor = new SevenZip.SevenZipCompressor(); compressor.CompressionMethod = SevenZip.CompressionMethod.Lzma2; compressor.CompressionLevel = SevenZip.CompressionLevel.Normal; compressor

SevenZipSharp - compress memory stream

空扰寡人 提交于 2019-12-01 03:15:57
I am using SevenZipSharp in order to compress files into a zip file. Is there a way to use it to create a zip from a memory stream (meaning, load the file into the memory stream before)? Thanks, Maya. I'm using SevenZipSharp with streams no problem what so ever. SevenZip.SevenZipCompressor compressor = new SevenZip.SevenZipCompressor(); compressor.CompressionMethod = SevenZip.CompressionMethod.Lzma2; compressor.CompressionLevel = SevenZip.CompressionLevel.Normal; compressor.CompressStream(ms, compressedStream); On the final line, "ms" is a stream that I want to compress, let's say a