C-Sharp | Java | Python | Swift | GO | WPF | Ruby | Scala | F# | JavaScript | SQL | PHP | Angular | HTML
Program: Upon execution, the program will take all the files in the source directory and add them to an archive called "destination.zip".
Then: It will expand "destination.zip" into a folder called "destination". We specify CompressionLevel.Optimal.
VB.NET program that uses ZipFile
Imports System.IO.Compression
Module Module1
Sub Main()
' Create ZIP from "source" directory (in program folder).
ZipFile.CreateFromDirectory("source",
"destination.zip",
CompressionLevel.Optimal,
False)
' Extract ZIP to "destination" folder.
ZipFile.ExtractToDirectory("destination.zip",
"destination")
End Sub
End Module