C1.C1Zip Namespace > C1ZipFile Class > Create Method : Create(Stream) Method |
'Declaration
Public Overloads Sub Create( _ ByVal stream As System.IO.Stream _ )
public void Create( System.IO.Stream stream )
// 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();
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2