Working with Streams

Dec 15, 2010 at 8:36 PM

Hello, I have been through some of the code that is supplied with the source download but I am unable to see a way to get hold of files as just a memory stream instead of extracting it to a file. I might be missing something but if anyone is able to give me some tips that would be great.

I want to get a file by name and then obtain a stream for this file uncompressed.


Many thanks

Dec 15, 2010 at 9:19 PM

Please ignore this, and delete if possible (as I cant see a way to delete it)


Solution was simple and looking at me in the face,


                System.IO.MemoryStream msout = new System.IO.MemoryStream();
                m_7zExtractor.ExtractFile(Index, msout);


Dec 15, 2010 at 9:34 PM
Edited Dec 15, 2010 at 9:35 PM

Instead of starting a new Discussion can someone answer this question for me:


Can I create a blank file in a archive and get an active stream for it, then to later copy into and then get written to the archive?


Many thanks

Apr 4, 2011 at 10:18 AM

when I call this method, I got a msout with 0 length...why?

ExtractArchive works fine to extract into files.