This project is read-only.

Possible to give name to memorystream

Aug 31, 2009 at 1:56 PM

I'm trying to compress a memory stream, but the problem is that the memory stream will get the filename "default" when uncompressed.

How can I modify the filename?

I'm using this code:

byte[] testMemStream = Encoding.UTF8.GetBytes(textToSend);

var inStream = new MemoryStream(testMemStream);
var outStream = new MemoryStream();
            
SevenZipCompressor.SetLibraryPath(HttpContext.Current.Server.MapPath("/bin/7z.dll"));
var szc = new SevenZipCompressor();
szc.ArchiveFormat = OutArchiveFormat.SevenZip;
szc.CompressionLevel = CompressionLevel.Fast;
szc.CompressStream(inStream, outStream, zipPassword);

Sep 1, 2009 at 12:00 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Mar 1, 2010 at 6:49 PM

Hi markhor,

I'm using the CompressStream method and still getting the "defaut" filename in the zip file.

I'm currently using the latest version of SevenZipSharp and 7z.dll.

Please help and thanks for a fantatic work

Mar 2, 2010 at 4:58 AM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.