How to un-protect the zip files using Syncfusion.Compression.Base?

25 May 20231 minute to read

The following complete code snippet explains how to unprotect the zip file.

using Syncfusion.Compression.Zip;
using System.IO;

class Program
  static void Main(string[] args)
    //Initailize ZipArchive
    ZipArchive zipArchive = new ZipArchive();

    //Load the zip file into ZipArchive
    zipArchive.Open(new FileStream("../../Data/", FileMode.Open), false, "password");

    //Unprotect the ZipArchive

    //Save the ZipArchive
Imports Syncfusion.Compression.Zip
Imports System.IO

Module Module1
  Sub Main()
    'Initailize ZipArchive
    Dim zipArchive As ZipArchive = New ZipArchive

    'Load the zip file into ZipArchive
    zipArchive.Open(New FileStream("../../Data/", FileMode.Open), False, "password")

    'Unprotect the ZipArchive

    'Save the ZipArchive
  End Sub
End Module

See Also