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/latest#SevenZipTest/Program.cs , sadly i have found no valid example to what i am trying to achieve.
I have compressed the stream with this method:
SevenZip.SevenZipCompressor compressor = new SevenZip.SevenZipCompressor();
compressor.CompressionMethod = SevenZip.CompressionMethod.Lzma2;
compressor.CompressionLevel = SevenZip.CompressionLevel.Ultra;
compressor.CompressStream(stream,output_compressed);
I tried with this:
using (var tmp = new SevenZipExtractor(compressed))
{
tmp.ExtractFile(1, File.Create(@"D:\lel.txt"));
}