Uncompress GZipStream
I am testing with a webservice, that returns a value with GZipStream compression. When I copy the value from the debugger into a online service I can decompress it to XML.
I have tried several things with Chilkat (version 9.5.0.55 from 2016) without success. The function ComUncompressString returns nothing.
Has anyone done this before? Am I using the wrong function?
Code:
Get wsGetTFSTransactionsV2 of oWSIAudit stRequest to stResponse
// Response:
// stResponse.Compression "GZipStream"
// stResponse.Value "H4sIAAAAAAAEAJ "
Get Create (RefClass(cComChilkatGlobal)) to hoGlobal
If (Not(IsComObjectCreated(hoGlobal))) Begin
Send CreateComObject of hoGlobal
End
Get ComUnlockBundle of hoGlobal CHILKAT_UNLOCK_CODE to iSuccess
If (iSuccess <> True) Begin
Get ComLastErrorText Of hoGlobal to sTemp1
Showln sTemp1
Procedure_Return
End
Get ComVersion of hoGlobal to sTemp1 // 9.5.0.55
Get Create (RefClass(cComChilkatGzip)) to hoGzip
If (Not(IsComObjectCreated(hoGzip))) Begin
Send CreateComObject of hoGzip
End
Get ComUncompressString of hoGzip stResponse.Value "utf-8" to sXML
Best regards,
Peter van Mil
Appvantage b.v.