Create a self-extracting archive:
 
Dim DirectoryPath As String = "c:\Documents\Project7"
Using zip As New ZipFile()
zip.AddDirectory(DirectoryPath, System.IO.Path.GetFileName(DirectoryPath))
zip.Comment = "This will be embedded into a self-extracting console-based exe"
zip.SaveSelfExtractor("archive.exe", SelfExtractorFlavor.ConsoleApplication)
End Using



Update some entries in a Zip file:
 
Using zip1 As New ZipFile
' the UpdateFile method works even if the entry does not yet exist.
' Really it should be called "AddOrUpdateFile"
zip1.UpdateFile("MyDocuments\Readme.txt", "")
zip1.UpdateFile("CustomerList.csv", "")
zip1.Comment = "This zip archive has been created."
zip1.Save("Content.zip")
End Using
Using zip2 As ZipFile = ZipFile.Read("Content.zip")
zip2.UpdateFile("Updates\Readme.txt", "")
zip2.Comment = "This zip archive has been updated: the Readme has been changed."
zip2.Save
End Using



Produce a zip file that contains embedded zip files
 
Public Sub Run()
Using s1 As Stream = ZipIntoMemory("c:\temp\dir1")
Using s2 As Stream = ZipIntoMemory("c:\temp\dir2")
Using zip1 as New ZipFile
zip1.AddEntry("test1.zip", s1)
zip1.AddEntry("test2.zip", s2)
' save to a file. Could also save to a stream here
zip1.Save("Tescher.zip")
End Using
End Using
End Using
End Sub
Public Function ZipIntoMemory(ByVal path As String) As Stream
Dim ms As New MemoryStream
Using zip1 as New ZipFile
zip1.AddDirectory(path, "Result")
zip1.Save(ms)
End Using
' move the stream position to the beginning
ms.Seek(0,SeekOrigin.Begin)
Return ms
End Function