Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If OpenFileDialog1.ShowDialog = Windows.Forms.DialogResult.Cancel Then
Exit Sub
End If
Dim FileName = OpenFileDialog1.FileName
Try
Dim Z As System.IO.ZipPackage
Z = System.IO.Packaping.Package.Open(FileName & ".Zip", IO.FileMode.Create)
Dim B = System.IO.File.ReadAllBytes(FileName)
Dim partUriDocument As Uri = System.IO.Packaping.PackUriHelper.CreatePartUri(New Uri(System.IO.Path.GetFileName(FileName), UriKind.Relative))
Dim P = Z.CreatePart(partUriDocument, System.Net.Mime.MediaTypeNames.Application.Zip, IO.Packaging.CompressionOption.Maximum)