Category / Section
Is it possible to create the Zip files using Syncfusion.Compression.Zip?
1 min read
Yes, it is possible to create the Zip file using Syncfusion.Compression.Zip namespace.
Here is the code for creating Zip file:
C#
Syncfusion.Compression.Zip.ZipArchive zipArchive = new Syncfusion.Compression.Zip.ZipArchive(); zipArchive.DefaultCompressionLevel = Syncfusion.Compression.CompressionLevel.Best; //Add the file to zip zipArchive.AddFile("..\\..\\Form1.cs"); //Zip file name and location zipArchive.Save("SyncfusionCompressFileSample.zip"); zipArchive.Close();
VB.NET
Dim zipArchive As New Syncfusion.Compression.Zip.ZipArchive() zipArchive.DefaultCompressionLevel = Syncfusion.Compression.CompressionLevel.Best zipArchive.AddFile("..\..\Form1.vb") 'Zip file name and location zipArchive.Save("SyncfusionCompressFileSample.zip") zipArchive.Close()
Here is the sample for your reference:
https://www.syncfusion.com/downloads/support/directtrac/general/ze/ZipFiles1184382662