VB.NET
VB.NET
Ungzip Base64 String
See more Gzip Examples
Suppose you have a gzip in base64 representation that contains a text file, such as XML. This example shows how to decompress and access the string.Chilkat VB.NET Downloads
Dim success As Boolean = False
' This example assumes the Chilkat API to have been previously unlocked.
' See Global Unlock Sample for sample code.
Dim gzip As New Chilkat.Gzip
Dim gzipBase64 As String = "H4sIAAAAAAAE ... X6aZjXO3EwAA"
Dim bd As New Chilkat.BinData
success = bd.AppendEncoded(gzipBase64,"base64")
success = gzip.UncompressBd(bd)
If (success <> True) Then
Debug.WriteLine(gzip.LastErrorText)
Exit Sub
End If
Dim strXml As String = bd.GetString("utf-8")
Debug.WriteLine("XML:")
Debug.WriteLine(strXml)