I have a text file that was compressed by 7Zip that I want to read from within a program. I want to put the contents of that text file into a MemoryStream and read it with a StreamReader. My current code is as follows:
SevenZipExtractor extractor = new SevenZipExtractor("@C:\TestFile.7z");
MemoryStream ms = new MemoryStream();
StreamReader sr = new StreamReader(ms);
sr.ReadToEnd() just gives me a blank string.
I can unzip my TestFile.7z file with ExtractArchive, but I do not want to extract it to a file. I want to get the contents of the file without having to create files (because of possible permission issues). Can I even do this with the SevenZipExtractor