Assuming you're using .NET 4.5, you can use
the built-in ZipFile
class[
^].
Add a reference to the
System.IO.Compression.FileSystem
assembly, and
Import
the
System.IO.Compression
namespace. Then use:
Dim path As String = IO.Directory.GetCurrentDirectory()
Dim zipPath As String = IO.Path.Combine(path, "mods.zip")
If Not IO.File.Exists(zipPath) Then
Throw New IO.FileNotFoundException(Nothing, zipPath)
End If
Dim extractPath As String = IO.Path.Combine(path, "extract")
If Not IO.Directory.Exists(extractPath) Then
IO.Directory.CreateDirectory(extractPath)
End If
ZipFile.ExtractToDirectory(zipPath, extractPath)
If you're using .NET 4.0 or earlier, then you can use a third-party library such as
SharpZipLib[
^] or
DotNetZip[
^] to extract the file.