Sample code for 30+ languages & platforms
AutoIt

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 AutoIt Downloads

AutoIt
Local $bSuccess = False

; This example assumes the Chilkat API to have been previously unlocked.
; See Global Unlock Sample for sample code.

$oGzip = ObjCreate("Chilkat.Gzip")

Local $sGzipBase64 = "H4sIAAAAAAAE ... X6aZjXO3EwAA"

$oBd = ObjCreate("Chilkat.BinData")
$bSuccess = $oBd.AppendEncoded($sGzipBase64,"base64")

$bSuccess = $oGzip.UncompressBd($oBd)
If ($bSuccess <> True) Then
    ConsoleWrite($oGzip.LastErrorText & @CRLF)
    Exit
EndIf

Local $strXml = $oBd.GetString("utf-8")
ConsoleWrite("XML:" & @CRLF)
ConsoleWrite($strXml & @CRLF)