Chilkat HOME .NET Core C# Android™ AutoIt C C# C++ Chilkat2-Python CkPython Classic ASP DataFlex Delphi ActiveX Delphi DLL Go Java Lianja Mono C# Node.js Objective-C PHP ActiveX PHP Extension Perl PowerBuilder PowerShell PureBasic Ruby SQL Server Swift 2 Swift 3,4,5... Tcl Unicode C Unicode C++ VB.NET VBScript Visual Basic 6.0 Visual FoxPro Xojo Plugin
(DataFlex) Ungzip Base64 StringSuppose 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.
Use ChilkatAx-win32.pkg Procedure Test Handle hoGzip String sGzipBase64 Variant vBd Handle hoBd Boolean iSuccess String sStrXml String sTemp1 // This example assumes the Chilkat API to have been previously unlocked. // See Global Unlock Sample for sample code. Get Create (RefClass(cComChilkatGzip)) To hoGzip If (Not(IsComObjectCreated(hoGzip))) Begin Send CreateComObject of hoGzip End Move "H4sIAAAAAAAE ... X6aZjXO3EwAA" To sGzipBase64 Get Create (RefClass(cComChilkatBinData)) To hoBd If (Not(IsComObjectCreated(hoBd))) Begin Send CreateComObject of hoBd End Get ComAppendEncoded Of hoBd sGzipBase64 "base64" To iSuccess Get pvComObject of hoBd to vBd Get ComUncompressBd Of hoGzip vBd To iSuccess If (iSuccess <> True) Begin Get ComLastErrorText Of hoGzip To sTemp1 Showln sTemp1 Procedure_Return End Get ComGetString Of hoBd "utf-8" To sStrXml Showln "XML:" Showln sStrXml End_Procedure |
© 2000-2024 Chilkat Software, Inc. All Rights Reserved.