ComponentOne Zip for .NET
Create(Stream) Method
Example 

C1.C1Zip.4 Assembly > C1.C1Zip Namespace > C1ZipFile Class > Create Method : Create(Stream) Method
System.IO.Stream that will contain the new zip file.
Creates a new zip file in a stream.
Syntax
Public Overloads Sub Create( _
   ByVal stream As Stream _
) 
public void Create( 
   Stream stream
)

Parameters

stream
System.IO.Stream that will contain the new zip file.
Example
The code below creates a new C1ZipFile on a memory stream, then adds several files to it. Finally, the code gets the zipped data out as an array of bytes, which could be stored in a database for example.
// create zip on a stream
MemoryStream msZip = new MemoryStream();
C1ZipFile zip = new C1ZipFile(msZip, true);
            
// add some entries to it
foreach (string f in Directory.GetFiles(@"c:\WINDOWS\Web\Wallpaper"))
{
  zip.Entries.Add(f);
}
            
// get zipped data out as a byte array
byte[] zipData = msZip.ToArray();
See Also

Reference

C1ZipFile Class
C1ZipFile Members
Overload List