Sample code for 30+ languages & platforms
DataFlex

GZip Decompress File

See more Gzip Examples

Demonstrates how to uncompress a .gz compressed file to get the uncompressed original file.

Chilkat DataFlex Downloads

DataFlex
Use ChilkatAx-win32.pkg

Procedure Test
    Boolean iSuccess
    Handle hoGzip
    String sTemp1

    Move False To iSuccess

    // 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

    Get ComUncompressFile Of hoGzip "qa_data/gzip/something.csv.gz" "qa_output/something.csv" To iSuccess
    If (iSuccess <> True) Begin
        Get ComLastErrorText Of hoGzip To sTemp1
        Showln sTemp1
        Procedure_Return
    End

    Showln "File successfully uncompressed and extracted from the Gzip compressed format."


End_Procedure