ArchiveSave Method (Stream, ArchiveSaveOptions)

Saves archive to the stream provided.

Namespace:  Aspose.Zip
Assembly:  Aspose.Zip (in Aspose.Zip.dll) Version: 22.3
Syntax
public void Save(
	Stream outputStream,
	ArchiveSaveOptions saveOptions = null
)

Parameters

outputStream
Type: System.IOStream
Destination stream.
saveOptions (Optional)
Type: Aspose.Zip.SavingArchiveSaveOptions
Options for archive saving.
Exceptions
ExceptionCondition
ArgumentExceptionoutputStream is not writable.
Remarks

outputStream must be writable.

Examples
using (FileStream zipFile = File.Open("archive.zip", FileMode.Create))
{
    using (var archive = new Archive())
    {
        archive.CreateEntry("entry.bin", "data.bin");
        archive.Save(zipFile);
    }
}
See Also