Articles in this section
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

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied