Sample code for 30+ languages & platforms
PureBasic

UnGzip .tgz to get a .tar

See more Tar Archive Examples

A .tgz is simply a TAR archive compressed using GZip. It is also commonly referred to as a .tar.gz. Chilkat GZip can be used to ungzip to get an uncompressed .tar.

Chilkat PureBasic Downloads

PureBasic
IncludeFile "CkGzip.pb"

Procedure ChilkatExample()

    success.i = 0

    gzip.i = CkGzip::ckCreate()
    If gzip.i = 0
        Debug "Failed to create object."
        ProcedureReturn
    EndIf

    success = CkGzip::ckUncompressFile(gzip,"qa_data/tar/test.tgz","qa_output/test.tar")
    If success <> 1
        Debug CkGzip::ckLastErrorText(gzip)
    Else
        Debug "success."
    EndIf



    CkGzip::ckDispose(gzip)


    ProcedureReturn
EndProcedure