Tar Delphi DLL Reference Documentation

Tar

API for creating and extracting TAR archives. Also supports creating and extracting .tar.gz (.tgz), .tar.bz2, and .tar.Z (compressed TAR archives, also known as compressed tarball archives). Can read/write the following TAR formats: (1) GNU tar 1.13.x format, (2) PAX -- POSIX 1003.1-2001 format, (3) USTAR -- POSIX 1003.1-1988 format.

Create/Dispose

function CkTar_Create: HCkTar; stdcall;

Creates an instance of the HCkTar object and returns a handle (i.e. a Pointer). The handle is passed in the 1st argument for the functions listed on this page.

procedure CkTar_Dispose(handle: HCkTar); stdcall;

Objects created by calling CkTar_Create must be freed by calling this method. A memory leak occurs if a handle is not disposed by calling this function.

Properties

function CkTar_getCaptureXmlListing(objHandle: HCkTar): wordbool; stdcall;
procedure CkTar_putCaptureXmlListing(objHandle: HCkTar; newPropVal: wordbool); stdcall;

Introduced in version 9.5.0.46

If True, then untar methods, such as Untar, UntarGz, UntarBz2, and UntarZ, will also capture an XML listing of the contents in the XmlListing property. The format of the XML contained in XmlListing is identical to what is returned by the ListXml method. The default value is False.

procedure CkTar_getCharset(objHandle: HCkTar; outPropVal: HCkString); stdcall;
procedure CkTar_putCharset(objHandle: HCkTar; newPropVal: PWideChar); stdcall;

function CkTar__charset(objHandle: HCkTar): PWideChar; stdcall;

Character encoding to be used when interpreting filenames within .tar archives for untar operations. The default is "utf-8", and this is typically not changed. (The WriteTar methods always uses utf-8 to store filenames within the TAR archive.)

procedure CkTar_getDebugLogFilePath(objHandle: HCkTar; outPropVal: HCkString); stdcall;
procedure CkTar_putDebugLogFilePath(objHandle: HCkTar; newPropVal: PWideChar); stdcall;

function CkTar__debugLogFilePath(objHandle: HCkTar): PWideChar; stdcall;

If set to a file path, causes each Chilkat method or property call to automatically append it's LastErrorText to the specified log file. The information is appended such that if a hang or crash occurs, it is possible to see the context in which the problem occurred, as well as a history of all Chilkat calls up to the point of the problem. The VerboseLogging property can be set to provide more detailed information.

This property is typically used for debugging the rare cases where a Chilkat method call hangs or generates an exception that halts program execution (i.e. crashes). A hang or crash should generally never happen. The typical causes of a hang are:

  1. a timeout related property was set to 0 to explicitly indicate that an infinite timeout is desired,
  2. the hang is actually a hang within an event callback (i.e. it is a hang within the application code), or
  3. there is an internal problem (bug) in the Chilkat code that causes the hang.

function CkTar_getDirMode(objHandle: HCkTar): Integer; stdcall;
procedure CkTar_putDirMode(objHandle: HCkTar; newPropVal: Integer); stdcall;

The directory permissions to used in WriteTar* methods. The default is octal 0755. This is the value to be stored in the "mode" field of each TAR header for a directory entries.

procedure CkTar_getDirPrefix(objHandle: HCkTar; outPropVal: HCkString); stdcall;
procedure CkTar_putDirPrefix(objHandle: HCkTar; newPropVal: PWideChar); stdcall;

function CkTar__dirPrefix(objHandle: HCkTar): PWideChar; stdcall;

A prefix to be added to each file's path within the TAR archive as it is being created. For example, if this property is set to the string "subdir1", then "subdir1/" will be prepended to each file's path within the TAR.

Note: This property does not apply to files added using the AddFile2 method, which directly specifies the path-in-tar.

function CkTar_getFileMode(objHandle: HCkTar): Integer; stdcall;
procedure CkTar_putFileMode(objHandle: HCkTar; newPropVal: Integer); stdcall;

The file permissions to used in WriteTar* methods. The default is octal 0644. This is the value to be stored in the "mode" field of each TAR header for a file entries.

function CkTar_getGroupId(objHandle: HCkTar): Integer; stdcall;
procedure CkTar_putGroupId(objHandle: HCkTar; newPropVal: Integer); stdcall;

The default numerical GID to be stored in each TAR header when writing TAR archives. The default value is 1000.

procedure CkTar_getGroupName(objHandle: HCkTar; outPropVal: HCkString); stdcall;
procedure CkTar_putGroupName(objHandle: HCkTar; newPropVal: PWideChar); stdcall;

function CkTar__groupName(objHandle: HCkTar): PWideChar; stdcall;

The default group name to be stored in each TAR header when writing TAR archives. The default value is the logged-on username of the application's process.

procedure CkTar_getLastErrorHtml(objHandle: HCkTar; outPropVal: HCkString); stdcall;

function CkTar__lastErrorHtml(objHandle: HCkTar): PWideChar; stdcall;

Provides information in HTML format about the last method/property called. If a method call returns a value indicating failure, or behaves unexpectedly, examine this property to get more information.

procedure CkTar_getLastErrorText(objHandle: HCkTar; outPropVal: HCkString); stdcall;

function CkTar__lastErrorText(objHandle: HCkTar): PWideChar; stdcall;

Provides information in plain-text format about the last method/property called. If a method call returns a value indicating failure, or behaves unexpectedly, examine this property to get more information.

Concept of LastErrorText

LastErrorText Standard Information

procedure CkTar_getLastErrorXml(objHandle: HCkTar; outPropVal: HCkString); stdcall;

function CkTar__lastErrorXml(objHandle: HCkTar): PWideChar; stdcall;

Provides information in XML format about the last method/property called. If a method call returns a value indicating failure, or behaves unexpectedly, examine this property to get more information.

function CkTar_getLastMethodSuccess(objHandle: HCkTar): wordbool; stdcall;
procedure CkTar_putLastMethodSuccess(objHandle: HCkTar; newPropVal: wordbool); stdcall;

Introduced in version 9.5.0.52

Indicate whether the last method call succeeded or failed. A value of True indicates success, a value of False indicates failure. This property is automatically set for method calls. It is not modified by property accesses. The property is automatically set to indicate success for the following types of method calls:

  • Any method that returns a string.
  • Any method returning a Chilkat object, binary bytes, or a date/time.
  • Any method returning a standard boolean status value where success = True and failure = False.
  • Any method returning an integer where failure is defined by a return value less than zero.

Note: Methods that do not fit the above requirements will always set this property equal to True. For example, a method that returns no value (such as a "void" in C++) will technically always succeed.

function CkTar_getMatchCaseSensitive(objHandle: HCkTar): wordbool; stdcall;
procedure CkTar_putMatchCaseSensitive(objHandle: HCkTar; newPropVal: wordbool); stdcall;

Introduced in version 9.5.0.46

Determines whether pattern matching for the MustMatch and MustNotMatch properties is case-sensitive or not. The default value is False.

procedure CkTar_getMustMatch(objHandle: HCkTar; outPropVal: HCkString); stdcall;
procedure CkTar_putMustMatch(objHandle: HCkTar; newPropVal: PWideChar); stdcall;

function CkTar__mustMatch(objHandle: HCkTar): PWideChar; stdcall;

Introduced in version 9.5.0.46

If set, then file paths must match this pattern when creating TAR archives, or when extracting from TAR archives. If a file does not match, it will not be included when creating a TAR, or it will not be extracted when extracting from a TAR. This property also applies to methods that create or extract from compressed TAR archives.

The must-match pattern may include 0 or more asterisk characters, each of which represents 0 or more of any character. For example, the pattern "*.txt" causes only .txt files to be included or extracted. The default value is an empty string, indicating that all files are implicitly matched.

procedure CkTar_getMustNotMatch(objHandle: HCkTar; outPropVal: HCkString); stdcall;
procedure CkTar_putMustNotMatch(objHandle: HCkTar; newPropVal: PWideChar); stdcall;

function CkTar__mustNotMatch(objHandle: HCkTar): PWideChar; stdcall;

Introduced in version 9.5.0.46

If set, then file paths must NOT match this pattern when creating TAR archives, or when extracting from TAR archives. If a file path matches, it will not be included when creating a TAR, or it will not be extracted when extracting from a TAR. This property also applies to methods that create or extract from compressed TAR archives.

The must-not-match pattern may include 0 or more asterisk characters, each of which represents 0 or more of any character. For example, the pattern "*.obj" causes all .obj files to be skipped. The default value is an empty string, indicating that no files are skipped.

function CkTar_getNoAbsolutePaths(objHandle: HCkTar): wordbool; stdcall;
procedure CkTar_putNoAbsolutePaths(objHandle: HCkTar; newPropVal: wordbool); stdcall;

If True, then absolute paths are converted to relative paths by removing the leading "/" or "\" character when untarring. This protects your system from unknowingly untarring files into important system directories, such as C:\Windows\system32. The default value is True.

function CkTar_getNumDirRoots(objHandle: HCkTar): Integer; stdcall;

The total number of directory roots set by calling AddDirRoot (i.e. the number of times AddDirRoot was called by the application). A TAR archive is created by calling AddDirRoot for one or more directory tree roots, followed by a single call to WriteTar (or WriteTarBz2, WriteTarGz, WriteTarZ). This allows for TAR archives containing multiple directory trees to be created.

function CkTar_getScriptFileMode(objHandle: HCkTar): Integer; stdcall;
procedure CkTar_putScriptFileMode(objHandle: HCkTar; newPropVal: Integer); stdcall;

The file permissions to used in WriteTar* methods for shell script files (.sh, .csh, .bash, .bsh). The default is octal 0755. This is the value to be stored in the "mode" field of each TAR header for a file entries.

function CkTar_getSuppressOutput(objHandle: HCkTar): wordbool; stdcall;
procedure CkTar_putSuppressOutput(objHandle: HCkTar; newPropVal: wordbool); stdcall;

Introduced in version 9.5.0.46

If True, then untar methods, such as Untar, UntarGz, UntarBz2, and UntarZ, do not produce any output. Setting this value equal to True is useful when the CaptureXmlListing is also set to True, which enables an application to get the contents of a TAR archive without extracting. The default value is False.

function CkTar_getUntarCaseSensitive(objHandle: HCkTar): wordbool; stdcall;
procedure CkTar_putUntarCaseSensitive(objHandle: HCkTar; newPropVal: wordbool); stdcall;

This property is deprecated. Applications should instead use the MatchCaseSensitive property. Until this property is officially removed, it will behave the same as the MatchCaseSensitive property.

function CkTar_getUntarDebugLog(objHandle: HCkTar): wordbool; stdcall;
procedure CkTar_putUntarDebugLog(objHandle: HCkTar; newPropVal: wordbool); stdcall;

Similar to the VerboseLogging property. If set to True, then information about each file/directory extracted in an untar method call is logged to LastErrorText (or LastErrorXml / LastErrorHtml). The default value is False.

function CkTar_getUntarDiscardPaths(objHandle: HCkTar): wordbool; stdcall;
procedure CkTar_putUntarDiscardPaths(objHandle: HCkTar; newPropVal: wordbool); stdcall;

If True, then discard all path information when untarring. This causes all files to be untarred into a single directory. The default value is False.

procedure CkTar_getUntarFromDir(objHandle: HCkTar; outPropVal: HCkString); stdcall;
procedure CkTar_putUntarFromDir(objHandle: HCkTar; newPropVal: PWideChar); stdcall;

function CkTar__untarFromDir(objHandle: HCkTar): PWideChar; stdcall;

The directory path where files are extracted when untarring. The default value is ".", meaning that the current working directory of the calling process is used. If UntarDiscardPaths is set, then all files are untarred into this directory. Otherwise, the untar operation will re-create a directory tree rooted in this directory.

procedure CkTar_getUntarMatchPattern(objHandle: HCkTar; outPropVal: HCkString); stdcall;
procedure CkTar_putUntarMatchPattern(objHandle: HCkTar; newPropVal: PWideChar); stdcall;

function CkTar__untarMatchPattern(objHandle: HCkTar): PWideChar; stdcall;

This property is deprecated. It will be removed in a future version.

This property is deprecated. The MustMatch property should be used instead. Until this property is officially removed from the API, it is identical in behavior the MustMatch property.

function CkTar_getUntarMaxCount(objHandle: HCkTar): Integer; stdcall;
procedure CkTar_putUntarMaxCount(objHandle: HCkTar; newPropVal: Integer); stdcall;

Limits the number of files extracted during an untar to this count. The default value is 0 to indicate no maximum. To untar a single file, one might set the UntarMatchPattern such that it will match only the file to be extracted, and also set UntarMaxCount equal to 1. This causes an untar to scan the TAR archive until it finds the matching file, extract it, and then return.

function CkTar_getUserId(objHandle: HCkTar): Integer; stdcall;
procedure CkTar_putUserId(objHandle: HCkTar; newPropVal: Integer); stdcall;

The default numerical UID to be stored in each TAR header when writing TAR archives. The default value is 1000.

procedure CkTar_getUserName(objHandle: HCkTar; outPropVal: HCkString); stdcall;
procedure CkTar_putUserName(objHandle: HCkTar; newPropVal: PWideChar); stdcall;

function CkTar__userName(objHandle: HCkTar): PWideChar; stdcall;

The default user name to be stored in each TAR header when writing TAR archives. The default value is the logged-on username of the application's process.

function CkTar_getVerboseLogging(objHandle: HCkTar): wordbool; stdcall;
procedure CkTar_putVerboseLogging(objHandle: HCkTar; newPropVal: wordbool); stdcall;

If set to True, then the contents of LastErrorText (or LastErrorXml, or LastErrorHtml) may contain more verbose information. The default value is False. Verbose logging should only be used for debugging. The potentially large quantity of logged information may adversely affect peformance.

procedure CkTar_getVersion(objHandle: HCkTar; outPropVal: HCkString); stdcall;

function CkTar__version(objHandle: HCkTar): PWideChar; stdcall;

Version of the component/library, such as "9.5.0.63"

procedure CkTar_getWriteFormat(objHandle: HCkTar; outPropVal: HCkString); stdcall;
procedure CkTar_putWriteFormat(objHandle: HCkTar; newPropVal: PWideChar); stdcall;

function CkTar__writeFormat(objHandle: HCkTar): PWideChar; stdcall;

The TAR format to use when writing a TAR archive. Valid values are "gnu", "pax", and "ustar". The default value is "gnu".

procedure CkTar_getXmlListing(objHandle: HCkTar; outPropVal: HCkString); stdcall;
procedure CkTar_putXmlListing(objHandle: HCkTar; newPropVal: PWideChar); stdcall;

function CkTar__xmlListing(objHandle: HCkTar): PWideChar; stdcall;

Introduced in version 9.5.0.46

Contains the XML listing of the contents of the TAR archive for the last untar method call (such as Untar, UntarGz, etc.) where the CaptureXmlListing property was set to True.

Methods

function CkTar_AddDirRoot(objHandle: HCkTar;
    dirPath: PWideChar): wordbool; stdcall;

Adds a directory tree to be included in the next call to one of the WriteTar* methods. To include multiple directory trees in a .tar, call AddDirRoot multiple times followed by a single call to WriteTar.

Returns True for success, False for failure.

function CkTar_AddDirRoot2(objHandle: HCkTar;
    rootPrefix: PWideChar;
    rootPath: PWideChar): wordbool; stdcall;

Introduced in version 9.5.0.56

Adds a directory tree to be included in the next call to one of the WriteTar* methods. To include multiple directory trees in a .tar, call AddDirRoot2 (and/or AddDirRoot) multiple times followed by a single call to WriteTar.

The rootPrefix adds a prefix to the path in the TAR for all files added under this root. The rootPrefix should not end with a forward-slash char. For example: This is good: "abc/123", but this is not good: "abc/123/". If the DirPrefix property is also set, its prefix will added first.

Returns True for success, False for failure.

Adding Path Information with Individual Dir Roots

function CkTar_AddFile(objHandle: HCkTar;
    path: PWideChar): wordbool; stdcall;

Introduced in version 9.5.0.46

Adds a local file to be included in the next call to one of the WriteTar* methods. To include multiple files or directory trees in a .tar, call AddFile/AddDirRoot multiple times followed by a single call to WriteTar (or WriteTarGz, or WriteTarBz2).

Returns True for success, False for failure.

function CkTar_AddFile2(objHandle: HCkTar;
    filePath: PWideChar;
    pathWithinTar: PWideChar): wordbool; stdcall;

Introduced in version 9.5.0.69

Adds a local file to be included in the next call to one of the WriteTar* methods. Allows for the path within the TAR to be specified. To include multiple files or directory trees in a .tar, call AddFile/AddFile2/AddDirRoot multiple times followed by a single call to WriteTar (or WriteTarGz, or WriteTarBz2).

Note: The DirPrefix property does not apply to files added via this method because this method explicilty specifies the path-in-tar.

Returns True for success, False for failure.

function CkTar_CreateDeb(objHandle: HCkTar;
    controlPath: PWideChar;
    dataPath: PWideChar;
    debPath: PWideChar): wordbool; stdcall;

Introduced in version 9.5.0.66

Creates a .deb Debian binary package archive from a control.tar.gz and data.tar.gz. The controlPath is the path to the control.tar.gz file (or equivalent), and the dataPath is the path to the data.tar.gz file. The output file path (.deb) is specified in debPath.

Returns True for success, False for failure.

function CkTar_GetDirRoot(objHandle: HCkTar;
    index: Integer;
    outStr: HCkString): wordbool; stdcall;

function CkTar__getDirRoot(objHandle: HCkTar;
    index: Integer): PWideChar; stdcall;

Returns the value of the Nth directory root. For example, if an application calls AddDirRoot twice, then the NumDirRoots property would have a value of 2, and GetDirRoot(0) would return the path passed to AddDirRoot in the 1st call, and GetDirRoot(1) would return the directory path in the 2nd call to AddDirRoot.

Returns True for success, False for failure.

function CkTar_ListXml(objHandle: HCkTar;
    tarPath: PWideChar;
    outStr: HCkString): wordbool; stdcall;

function CkTar__listXml(objHandle: HCkTar;
    tarPath: PWideChar): PWideChar; stdcall;

Scans a TAR archive and returns XML detailing the files and directories found within the TAR.

Returns True for success, False for failure.

function CkTar_ListXmlAsync(objHandle: HCkTar;
    tarPath: PWideChar): HCkTask; stdcall;

Creates an asynchronous task to call the ListXml method with the arguments provided. (Async methods are available starting in Chilkat v9.5.0.52.)

Returns nil on failure

How to Run an Asynchronous Task

function CkTar_SaveLastError(objHandle: HCkTar;
    path: PWideChar): wordbool; stdcall;

Saves the last-error information (the contents of LastErrorXml) to an XML formatted file.

Returns True for success, False for failure.

function CkTar_UnlockComponent(objHandle: HCkTar;
    unlockCode: PWideChar): wordbool; stdcall;

Unlocks the component allowing for the full functionality to be used. If this method unexpectedly returns False, examine the contents of the LastErrorText property to determine the reason for failure.

Diagnosing UnlockComponent Problems

UnlockComponent LastErrorText shows exact string passed to it.

Verify UnlockComponent Success w/ Purchased Unlock Code

LastErrorText Standard Information

function CkTar_Untar(objHandle: HCkTar;
    tarPath: PWideChar): Integer; stdcall;

Extracts the files and directories from a TAR archive, reconstructing the directory tree(s) in the local filesystem. The files are extracted to the directory specified by the UntarFromDir property. Returns the number of files and directories extracted, or -1 for failure.

Untar a .tar Archive

function CkTar_UntarAsync(objHandle: HCkTar;
    tarPath: PWideChar): HCkTask; stdcall;

Creates an asynchronous task to call the Untar method with the arguments provided. (Async methods are available starting in Chilkat v9.5.0.52.)

Returns nil on failure

How to Run an Asynchronous Task

function CkTar_UntarBz2(objHandle: HCkTar;
    tarPath: PWideChar): wordbool; stdcall;

Extracts the files and directories from a tar.bz2 (or tar.bzip2) archive, reconstructing the directory tree(s) in the local filesystem. The files are extracted to the directory specified by the UntarFromDir property.

Returns True for success, False for failure.

Untar a .tar.bz2 Compressed Archive

function CkTar_UntarBz2Async(objHandle: HCkTar;
    tarPath: PWideChar): HCkTask; stdcall;

Creates an asynchronous task to call the UntarBz2 method with the arguments provided. (Async methods are available starting in Chilkat v9.5.0.52.)

Returns nil on failure

How to Run an Asynchronous Task

function CkTar_UntarFirstMatchingToMemory(objHandle: HCkTar;
    tarFileBytes: HCkByteData;
    matchPattern: PWideChar;
    outBytes: HCkByteData): wordbool; stdcall;

Memory-to-memory untar. The first file matching a pattern in the MustMatch property is extracted and returned.

Returns True for success, False for failure.

function CkTar_UntarFromMemory(objHandle: HCkTar;
    tarFileBytes: HCkByteData): Integer; stdcall;

Extracts the files and directories from an in-memory TAR archive, reconstructing the directory tree(s) in the local filesystem. The files are extracted to the directory specified by the UntarFromDir property. Returns the number of files and directories extracted, or -1 for failure.

function CkTar_UntarFromMemoryAsync(objHandle: HCkTar;
    tarFileBytes: HCkByteData): HCkTask; stdcall;

Creates an asynchronous task to call the UntarFromMemory method with the arguments provided. (Async methods are available starting in Chilkat v9.5.0.52.)

Returns nil on failure

How to Run an Asynchronous Task

function CkTar_UntarGz(objHandle: HCkTar;
    tarPath: PWideChar): wordbool; stdcall;

Extracts the files and directories from a tar.gz (or tar.gzip) archive, reconstructing the directory tree(s) in the local filesystem. The files are extracted to the directory specified by the UntarFromDir property.

Returns True for success, False for failure.

Untar a .tar.gz (.tgz) Compressed Archive

function CkTar_UntarGzAsync(objHandle: HCkTar;
    tarPath: PWideChar): HCkTask; stdcall;

Creates an asynchronous task to call the UntarGz method with the arguments provided. (Async methods are available starting in Chilkat v9.5.0.52.)

Returns nil on failure

How to Run an Asynchronous Task

function CkTar_UntarZ(objHandle: HCkTar;
    tarPath: PWideChar): wordbool; stdcall;

Extracts the files and directories from a tar.Z archive, reconstructing the directory tree(s) in the local filesystem. The files are extracted to the directory specified by the UntarFromDir property.

Returns True for success, False for failure.

Untar a .tar.Z (.taz) Compressed Archive

function CkTar_UntarZAsync(objHandle: HCkTar;
    tarPath: PWideChar): HCkTask; stdcall;

Creates an asynchronous task to call the UntarZ method with the arguments provided. (Async methods are available starting in Chilkat v9.5.0.52.)

Returns nil on failure

How to Run an Asynchronous Task

function CkTar_VerifyTar(objHandle: HCkTar;
    tarPath: PWideChar): wordbool; stdcall;

Verifies that a TAR archive is valid. This method opens the TAR archive and scans the entire file by walking the TAR headers. Returns True if no errors were found. Otherwise returns False.

function CkTar_VerifyTarAsync(objHandle: HCkTar;
    tarPath: PWideChar): HCkTask; stdcall;

Creates an asynchronous task to call the VerifyTar method with the arguments provided. (Async methods are available starting in Chilkat v9.5.0.52.)

Returns nil on failure

How to Run an Asynchronous Task

function CkTar_WriteTar(objHandle: HCkTar;
    tarPath: PWideChar): wordbool; stdcall;

Writes a TAR archive. The directory trees previously added by calling AddDirRoot one or more times are included in the output TAR archive.

Returns True for success, False for failure.

Create TAR Archive

function CkTar_WriteTarAsync(objHandle: HCkTar;
    tarPath: PWideChar): HCkTask; stdcall;

Creates an asynchronous task to call the WriteTar method with the arguments provided. (Async methods are available starting in Chilkat v9.5.0.52.)

Returns nil on failure

How to Run an Asynchronous Task

function CkTar_WriteTarBz2(objHandle: HCkTar;
    bz2Path: PWideChar): wordbool; stdcall;

Writes a .tar.bz2 compressed TAR archive. The directory trees previously added by calling AddDirRoot one or more times are included in the output file.

Returns True for success, False for failure.

Create TAR BZ2 Compressed Archive (.tar.bz2, .tbz, .tbz2, .tb2)

function CkTar_WriteTarBz2Async(objHandle: HCkTar;
    bz2Path: PWideChar): HCkTask; stdcall;

Creates an asynchronous task to call the WriteTarBz2 method with the arguments provided. (Async methods are available starting in Chilkat v9.5.0.52.)

Returns nil on failure

How to Run an Asynchronous Task

function CkTar_WriteTarGz(objHandle: HCkTar;
    gzPath: PWideChar): wordbool; stdcall;

Writes a .tar.gz (also known as .tgz) compressed TAR archive. The directory trees previously added by calling AddDirRoot one or more times are included in the output file.

Returns True for success, False for failure.

Create Compressed .tgz (.tar.gz) TAR Archive

function CkTar_WriteTarGzAsync(objHandle: HCkTar;
    gzPath: PWideChar): HCkTask; stdcall;

Creates an asynchronous task to call the WriteTarGz method with the arguments provided. (Async methods are available starting in Chilkat v9.5.0.52.)

Returns nil on failure

How to Run an Asynchronous Task