Tar Zig Reference Documentation
Tar
Current Version: 11.6.1
Chilkat.Tar
Add files or directory trees and write standard TAR output, with control
over archive paths, directory handling, and write format.
Work with common compressed archive forms such as
Inspect archive entries, verify archive structure, and produce XML
listings for display, logging, or programmatic processing.
Extract entire archives or selected entries, including workflows that
extract matching files directly to memory or
Include or exclude files using filters, control relative paths in the
archive, and manage how entries are restored during extraction.
Preserve or override UNIX-style permissions and create Debian
For an extended overview, see
Tar Class Overview.
Create, list, verify, filter, and extract TAR archives and compressed TAR formats.
Chilkat.Tar creates, verifies, lists, and extracts TAR archives,
including compressed TAR formats such as .tar.gz,
.tgz, .tar.bz2, and .tar.Z. It
supports adding individual files and directory trees, controlling archive
paths, preserving or overriding file permissions, filtering included or
extracted files, extracting from memory, extracting selected entries to
memory or BinData, producing XML listings, and creating Debian
.deb package archives from control and data tarballs.
Create TAR archives
Compressed TAR formats
.tar.gz,
.tgz, .tar.bz2, and .tar.Z.
List and verify contents
Selective extraction
BinData.
Filters and paths
Permissions and packages
.deb package archives from control and data tarballs.
Tar when the data is a TAR archive or a compressed TAR
archive. Configure the archive paths, filters, permissions, and compression
format, then create, list, verify, or extract the archive as needed. Use
Chilkat.Zip for ZIP archives, Chilkat.Gzip for a
single GZIP stream, and Chilkat.Compression for raw compression
operations.
Object Creation
// Add the package once:
// zig fetch --save https://chilkatdownload.com/11.6.1/chilkat-zig-11.6.1.tar.gz
// and in build.zig:
// const chilkat = b.dependency("chilkat", .{ .target = target, .optimize = optimize });
// exe.root_module.addImport("chilkat", chilkat.module("chilkat"));
const chilkat = @import("chilkat");
// Once per process, before any other Chilkat call:
try chilkat.unlockBundle("Anything for 30-day trial");
const tar = try chilkat.Tar.init();
defer tar.deinit();Creates the underlying native Chilkat object. Tar is a one-pointer struct passed by value; copying it copies the handle (two names for one object). Returns error.OutOfMemory if the library could not allocate the object. Use an object from one thread at a time; it may be handed from one thread to another.
Releases the native object. Call it exactly once per object (usually with defer); the handle is invalid afterwards. Objects returned by methods are owned by the caller too and are released the same way.
Wraps a handle obtained from the C API (chilkat.c.CkTar), taking ownership of it. The struct's handle field goes the other way, for anything the Zig API does not cover.
Errors and memory
Methods that can fail return an error union: a method whose only outcome is success or failure returns Error!void; a method producing a string returns (Error || Allocator.Error)![:0]u8; a method producing an object returns Error!T. chilkat.Error is error{ChilkatFailed}; the reason for a failure is in getLastErrorText, and the object remains usable. Properties never fail, and methods that answer a question (hasMember, isUnlocked, ...) return a plain bool.
String arguments are [:0]const u8 (UTF-8; string literals can be passed as is). String results are copies allocated with the allocator argument and owned by the caller, so they stay valid across later calls on the same object.
const text = tar.someMethod(allocator, ...) catch |err| {
const why = try tar.getLastErrorText(allocator);
defer allocator.free(why);
std.debug.print("{s}\n", .{why});
return err;
};
defer allocator.free(text);
Properties
CaptureXmlListing
pub fn getCaptureXmlListing(self: Tar) bool
pub fn setCaptureXmlListing(self: Tar, value: bool) void
Controls whether extraction methods also capture an XML inventory of the archive. When set to true, methods such as Untar, UntarGz, UntarBz2, and UntarZ store the listing in XmlListing. The XML has the same structure as the string returned by ListXml. The default is false.
CaptureXmlListing and SuppressOutput to true before an untar operation to scan the archive and obtain its XML listing without writing archive entries to disk.Charset
pub fn getCharset(self: Tar, allocator: Allocator) Allocator.Error![:0]u8
pub fn setCharset(self: Tar, value: [:0]const u8) void
Specifies the character encoding used to decode filenames stored in a TAR archive during extraction. The default is utf-8, which is normally appropriate for modern archives.
This property affects archive entry names only. It does not convert or otherwise alter the contents of extracted files. TAR archives written by the WriteTar* methods store filenames as UTF-8.
DebugLogFilePath
pub fn getDebugLogFilePath(self: Tar, allocator: Allocator) Allocator.Error![:0]u8
pub fn setDebugLogFilePath(self: Tar, value: [:0]const u8) void
If set to a file path, this property logs the LastErrorText of each Chilkat method or property call to the specified file. This logging helps identify the context and history of Chilkat calls leading up to any crash or hang, aiding in debugging.
Enabling the VerboseLogging property provides more detailed information. This property is mainly used for debugging rare instances where a Chilkat method call causes a hang or crash, which should generally not happen.
Possible causes of hangs include:
- A timeout property set to 0, indicating an infinite timeout.
- A hang occurring within an event callback in the application code.
- An internal bug in the Chilkat code causing the hang.
DirMode
pub fn getDirMode(self: Tar) i32
pub fn setDirMode(self: Tar, value: i32) void
Specifies the UNIX permission bits written to the TAR header for directory entries created by the WriteTar* methods. The default is octal 0755, which represents rwxr-xr-x.
DirPrefix
pub fn getDirPrefix(self: Tar, allocator: Allocator) Allocator.Error![:0]u8
pub fn setDirPrefix(self: Tar, value: [:0]const u8) void
Specifies a path prefix to prepend to entries when a TAR archive is created. For example, setting this property to subdir1 causes an entry such as report.txt to be stored as subdir1/report.txt.
The prefix changes only the path stored in the archive; it does not rename or move the source file on disk.
AddFile2 explicitly supplies the complete path within the archive, so DirPrefix is not applied to files added by that method.FileMode
pub fn getFileMode(self: Tar) i32
pub fn setFileMode(self: Tar, value: i32) void
Specifies the UNIX permission bits written to the TAR header for ordinary file entries created by the WriteTar* methods. The default is octal 0644, which represents rw-r--r--.
ScriptFileMode instead, allowing executable permissions to be recorded separately.GroupId
pub fn getGroupId(self: Tar) i32
pub fn setGroupId(self: Tar, value: i32) void
Specifies the numeric group identifier (GID) written to TAR headers when an archive is created. The default value is 1000.
GroupName
pub fn getGroupName(self: Tar, allocator: Allocator) Allocator.Error![:0]u8
pub fn setGroupName(self: Tar, value: [:0]const u8) void
Specifies the group name written to TAR headers when an archive is created. By default, Chilkat uses the username of the account running the application.
GroupId. Extraction tools and operating systems may give different precedence to these fields.HeartbeatMs
pub fn getHeartbeatMs(self: Tar) i32
pub fn setHeartbeatMs(self: Tar, value: i32) void
Specifies the approximate interval, in milliseconds, between AbortCheck event callbacks during supported long-running operations. The default is 0, which disables periodic AbortCheck callbacks.
LastErrorHtml
pub fn getLastErrorHtml(self: Tar, allocator: Allocator) Allocator.Error![:0]u8
Provides HTML-formatted information about the last called method or property. If a method call fails or behaves unexpectedly, check this property for details. Note that information is available regardless of the method call's success.
topLastErrorText
pub fn getLastErrorText(self: Tar, allocator: Allocator) Allocator.Error![:0]u8
Provides plain text information about the last called method or property. If a method call fails or behaves unexpectedly, check this property for details. Note that information is available regardless of the method call's success.
LastErrorXml
pub fn getLastErrorXml(self: Tar, allocator: Allocator) Allocator.Error![:0]u8
Provides XML-formatted information about the last called method or property. If a method call fails or behaves unexpectedly, check this property for details. Note that information is available regardless of the method call's success.
topLastMethodSuccess
pub fn getLastMethodSuccess(self: Tar) bool
pub fn setLastMethodSuccess(self: Tar, value: bool) void
Indicates the success or failure of the most recent method call: true means success, false means failure. This property remains unchanged by property setters or getters. This method is present to address challenges in checking for null or Nothing returns in certain programming languages. Note: This property does not apply to methods that return integer values or to boolean-returning methods where the boolean does not indicate success or failure.
MatchCaseSensitive
pub fn getMatchCaseSensitive(self: Tar) bool
pub fn setMatchCaseSensitive(self: Tar, value: bool) void
Controls whether the patterns in MustMatch and MustNotMatch are matched case-sensitively. The default is false.
MustMatch
pub fn getMustMatch(self: Tar, allocator: Allocator) Allocator.Error![:0]u8
pub fn setMustMatch(self: Tar, value: [:0]const u8) void
Specifies an inclusion pattern applied when creating or extracting TAR archives, including compressed TAR formats. A candidate path is included or extracted only when it matches this pattern. The default is an empty string, which permits all paths.
The pattern may contain zero or more asterisks (*), where each asterisk matches zero or more characters. For example, *.txt selects paths ending in .txt. Case handling is controlled by MatchCaseSensitive.
MustMatch and MustNotMatch are set, a path must satisfy the inclusion pattern and must not satisfy the exclusion pattern.MustNotMatch
pub fn getMustNotMatch(self: Tar, allocator: Allocator) Allocator.Error![:0]u8
pub fn setMustNotMatch(self: Tar, value: [:0]const u8) void
Specifies an exclusion pattern applied when creating or extracting TAR archives, including compressed TAR formats. A candidate path that matches this pattern is skipped. The default is an empty string, which excludes nothing.
The pattern may contain zero or more asterisks (*), where each asterisk matches zero or more characters. For example, *.obj skips paths ending in .obj. Case handling is controlled by MatchCaseSensitive.
MustMatch does not override a match in MustNotMatch.NoAbsolutePaths
pub fn getNoAbsolutePaths(self: Tar) bool
pub fn setNoAbsolutePaths(self: Tar, value: bool) void
Controls whether absolute archive paths are converted to relative paths during extraction. When true, a leading / or \ is removed before the entry is written. The default is true.
NumDirRoots
pub fn getNumDirRoots(self: Tar) i32
Returns the number of directory roots currently registered for archive creation by calls to AddDirRoot and AddDirRoot2. Individual files added with AddFile or AddFile2 are not included in this count.
Use zero-based indexes from 0 through NumDirRoots - 1 with GetDirRoot.
PercentDoneScale
pub fn getPercentDoneScale(self: Tar) i32
pub fn setPercentDoneScale(self: Tar, value: i32) void
Specifies the value reported by PercentDone when an eligible operation is 100% complete. The default is 100. Increasing the scale allows finer-grained integer progress values; for example, a scale of 1000 allows 453 to represent 45.3%.
The value is clamped to the range 10 through 100000. This property is available only in environments that support event callbacks, and only methods for which measurable progress is available emit percentage updates.
ScriptFileMode
pub fn getScriptFileMode(self: Tar) i32
pub fn setScriptFileMode(self: Tar, value: i32) void
Specifies the UNIX permission bits written to TAR headers for shell-script files recognized by extensions such as .sh, .csh, .bash, and .bsh. The default is octal 0755, which records executable permissions.
SuppressOutput
pub fn getSuppressOutput(self: Tar) bool
pub fn setSuppressOutput(self: Tar, value: bool) void
Controls whether untar operations write extracted files and directories to the filesystem. When true, methods such as Untar, UntarGz, UntarBz2, and UntarZ scan the archive without producing extracted output. The default is false.
CaptureXmlListing to obtain an XML listing without extracting the archive.UntarCaseSensitive
pub fn getUntarCaseSensitive(self: Tar) bool
pub fn setUntarCaseSensitive(self: Tar, value: bool) void
Deprecated. Use MatchCaseSensitive instead.
Until this property is removed, reading or setting it has the same effect as reading or setting MatchCaseSensitive.
UntarDebugLog
pub fn getUntarDebugLog(self: Tar) bool
pub fn setUntarDebugLog(self: Tar, value: bool) void
Controls whether untar methods add per-entry extraction details to LastErrorText, LastErrorXml, and LastErrorHtml. The default is false.
UntarDiscardPaths
pub fn getUntarDiscardPaths(self: Tar) bool
pub fn setUntarDiscardPaths(self: Tar, value: bool) void
Controls whether directory components from archive entry names are discarded during extraction. When true, each file is written directly into UntarFromDir rather than recreating the archived directory tree. The default is false.
UntarFromDir
pub fn getUntarFromDir(self: Tar, allocator: Allocator) Allocator.Error![:0]u8
pub fn setUntarFromDir(self: Tar, value: [:0]const u8) void
Specifies the destination directory for extraction. The default is ., meaning the current working directory of the calling process.
When UntarDiscardPaths is false, archived subdirectories are recreated beneath this directory. When it is true, extracted files are placed directly in this directory.
UntarMaxCount
pub fn getUntarMaxCount(self: Tar) i32
pub fn setUntarMaxCount(self: Tar, value: i32) void
Limits the number of matching entries extracted by an untar operation. The default is 0, which means no maximum.
For example, set MustMatch to select a particular path and set UntarMaxCount to 1 to stop after the first matching entry is extracted.
UserId
pub fn getUserId(self: Tar) i32
pub fn setUserId(self: Tar, value: i32) void
Specifies the numeric user identifier (UID) written to TAR headers when an archive is created. The default value is 1000.
UserName
pub fn getUserName(self: Tar, allocator: Allocator) Allocator.Error![:0]u8
pub fn setUserName(self: Tar, value: [:0]const u8) void
Specifies the user name written to TAR headers when an archive is created. By default, Chilkat uses the username of the account running the application.
UserId. Their interpretation depends on the extracting tool and destination system.VerboseLogging
pub fn getVerboseLogging(self: Tar) bool
pub fn setVerboseLogging(self: Tar, value: bool) void
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.
Version
pub fn getVersion(self: Tar, allocator: Allocator) Allocator.Error![:0]u8
WriteFormat
pub fn getWriteFormat(self: Tar, allocator: Allocator) Allocator.Error![:0]u8
pub fn setWriteFormat(self: Tar, value: [:0]const u8) void
Specifies the TAR header format used by the WriteTar* methods. The default is gnu. Supported values are:
| Value | Use |
|---|---|
gnu | GNU TAR format and extensions. This is the Chilkat default and supports archive metadata beyond classic ustar limits. |
pax | POSIX pax extended format. It is designed to represent long names and additional metadata through extensible records. |
ustar | POSIX ustar format. It is broadly interoperable but has stricter limits on path lengths and metadata fields. |
ustar when compatibility with simple TAR readers is the priority and the archive fits its limits. Use pax for portable extended metadata, or retain gnu when GNU TAR compatibility is expected.XmlListing
pub fn getXmlListing(self: Tar, allocator: Allocator) Allocator.Error![:0]u8
pub fn setXmlListing(self: Tar, value: [:0]const u8) void
Contains the XML listing captured by the most recent untar operation for which CaptureXmlListing was true. The XML structure is the same as the output from ListXml.
Methods
AddDirRoot
Adds the directory tree at dir_path to the set of sources used by the next WriteTar* operation. Call this method multiple times to include multiple directory trees in one archive.
Use AddDirRoot2 when the tree should appear beneath an explicit prefix inside the archive.
ClearDirRootsAndFiles is called.Returns error.ChilkatFailed on failure; getLastErrorText explains why.
AddDirRoot2
Adds the directory tree at root_path to the archive-creation source list and stores its entries beneath the archive prefix supplied in root_prefix. Call this method multiple times, or combine it with AddDirRoot, before calling a WriteTar* method.
root_prefix should be a relative archive path such as abc/123 and should not end with /. If DirPrefix is also set, DirPrefix is applied first.
DirPrefix = "package" and rootPrefix = "assets", files from this root are stored beneath package/assets/.Returns error.ChilkatFailed on failure; getLastErrorText explains why.
AddFile
Adds the local file at path to the set of sources used by the next WriteTar* operation. Call AddFile, AddFile2, and the directory-root methods as needed before writing a single archive.
Use AddFile2 when the path stored inside the TAR must be specified independently of the source file path.
ClearDirRootsAndFiles is called.Returns error.ChilkatFailed on failure; getLastErrorText explains why.
AddFile2
Adds the local file at file_path to the archive-creation source list and stores it using the exact archive path supplied in path_within_tar. This allows the source path and the path visible inside the TAR to differ.
Call this method as many times as needed, optionally together with the other file and directory-root methods, before calling a single WriteTar* method.
path_within_tar already specifies the path within the TAR, DirPrefix does not modify entries added by this method. Use forward slashes and a relative path for portable archive names.Returns error.ChilkatFailed on failure; getLastErrorText explains why.
ClearDirRootsAndFiles
Removes all files and directory roots previously registered by AddDirRoot, AddDirRoot2, AddFile, and AddFile2.
Call this method before building a different archive with the same Tar object when the earlier source list should not be reused.
Returns error.ChilkatFailed on failure; getLastErrorText explains why.
CreateDeb
Creates a Debian binary package at deb_path from the prepared control archive at control_path and data archive at data_path. The inputs are typically named control.tar.gz and data.tar.gz, or use another compression form accepted by the target Debian tooling.
.deb file is an ar archive containing a debian-binary format marker, a control.tar.* member for package metadata and maintainer scripts, and a data.tar.* member for the installed filesystem payload.Returns error.ChilkatFailed on failure; getLastErrorText explains why.
GetDirRoot
Returns a directory root previously added with AddDirRoot or AddDirRoot2. index is a zero-based index.
Valid indexes range from 0 through NumDirRoots - 1. For example, after two roots are added, GetDirRoot(0) returns the first and GetDirRoot(1) returns the second.
Returns error.ChilkatFailed on failure; getLastErrorText explains why. The string is allocated with allocator and owned by the caller (defer allocator.free(s)).
ListXml
Scans the uncompressed TAR archive at tar_path and returns an XML description of its files, directories, and archive metadata. The archive is not extracted.
CaptureXmlListing. Set SuppressOutput as well when no files should be written.Returns error.ChilkatFailed on failure; getLastErrorText explains why. The string is allocated with allocator and owned by the caller (defer allocator.free(s)).
Untar
Extracts the uncompressed TAR archive at tar_path into the directory specified by UntarFromDir. Archived directory trees are recreated unless UntarDiscardPaths is true.
Returns the number of files and directories extracted, or -1 if the operation fails. Extraction is also affected by the matching, path-safety, count-limit, listing, and output-suppression properties of this object.
.tar archive is not compressed. Use UntarGz, UntarBz2, or UntarZ for the corresponding compressed tarball formats.UntarBz2
Decompresses and extracts the .tar.bz2 archive at tar_path into UntarFromDir. This format is also commonly named .tbz, .tbz2, or .tb2.
Returns true on success and false on failure. The same extraction filters, path controls, listing options, and output settings used by Untar also apply.
Returns error.ChilkatFailed on failure; getLastErrorText explains why.
UntarFirstMatchingToBd
Scans the uncompressed TAR archive at tar_path and copies the contents of the first file whose archive path matches match_pattern into the BinData object supplied in bd. Matching is evaluated in archive order.
No archive entry is written to the local filesystem. Returns true when a matching file is successfully extracted to bd and false otherwise.
Returns error.ChilkatFailed on failure; getLastErrorText explains why.
UntarGz
Decompresses and extracts the .tar.gz archive at tar_path into UntarFromDir. The .tgz extension is a common short form for the same gzip-compressed TAR structure.
Returns true on success and false on failure. The same extraction filters, path controls, listing options, and output settings used by Untar also apply.
Returns error.ChilkatFailed on failure; getLastErrorText explains why.
UntarZ
Decompresses and extracts the .tar.Z archive at tar_path into UntarFromDir. The .Z suffix denotes the historical UNIX compress format; .taz is a common alternate extension.
Returns true on success and false on failure. The same extraction filters, path controls, listing options, and output settings used by Untar also apply.
Returns error.ChilkatFailed on failure; getLastErrorText explains why.
VerifyTar
Opens the uncompressed TAR archive at tar_path and scans its headers through the end of the archive. Returns true when the archive structure is accepted and no TAR-format errors are found; otherwise returns false.
WriteTar
Creates an uncompressed TAR archive at tar_path from the files and directory trees previously added with AddFile, AddFile2, AddDirRoot, and AddDirRoot2. Archive paths, permissions, ownership metadata, filters, and header format are controlled by the corresponding properties.
Returns true on success and false on failure.
Returns error.ChilkatFailed on failure; getLastErrorText explains why.
WriteTarBz2
Creates a bzip2-compressed TAR archive at bz2_path from the files and directory trees previously added to this object. Common filename extensions include .tar.bz2, .tbz, .tbz2, and .tb2.
Returns true on success and false on failure.
Returns error.ChilkatFailed on failure; getLastErrorText explains why.
WriteTarGz
Creates a gzip-compressed TAR archive at gz_path from the files and directory trees previously added to this object. The usual extensions are .tar.gz and .tgz.
Returns true on success and false on failure.
Returns error.ChilkatFailed on failure; getLastErrorText explains why.
Events
All Chilkat methods are synchronous: the call returns when the work is done. During a call, Tar raises three events so your program can show progress and offer a way out. Declare any subset of abortCheck, percentDone and progressInfo in a struct of your own and install a pointer to it with setEventHandler:
const Progress = struct {
pub fn percentDone(_: *Progress, pct: i32) bool {
std.debug.print("{d}%\n", .{pct});
return false; // return true to abort the method in progress
}
pub fn progressInfo(_: *Progress, name: [:0]const u8, value: [:0]const u8) void {
std.debug.print("{s}: {s}\n", .{ name, value });
}
};
var progress = Progress{};
tar.setEventHandler(&progress); // progress must outlive the installation
defer tar.clearEventHandler();
tar.setHeartbeatMs(250); // abortCheck 4 times per second during Chilkat callsInstalls handler, a pointer to any struct, as the receiver of this object's events, replacing any handler installed earlier. The dispatch is resolved at compile time: only the methods the struct declares are called, and a struct declaring none of the three is a compile error. The struct must stay alive, at the same address, until clearEventHandler or deinit.
Removes the handler; events are no longer delivered.
AbortCheck fires at regular intervals controlled by the HeartbeatMs property (0, the default, disables it); PercentDone fires when an operation's completion percentage is known; ProgressInfo delivers named progress values. Returning true from abortCheck or percentDone aborts the running method, which then returns error.ChilkatFailed.
Events fire on the thread that called the method, before that method returns. To abort a long operation from another thread, have abortCheck read a std.atomic.Value(bool), or set the object's AbortCurrent property.
AbortCheck
pub fn abortCheck(self: *T) bool
Enables a method call to be aborted by triggering the AbortCheck event at intervals defined by the HeartbeatMs property. If HeartbeatMs is set to its default value of 0, no events will occur. For instance, set HeartbeatMs to 200 to trigger 5 AbortCheck events per second.
Example
const Abort = struct {
stop: std.atomic.Value(bool) = .init(false),
pub fn abortCheck(self: *Abort) bool {
return self.stop.load(.acquire); // another thread may call abort.stop.store(true, .release)
}
};
var abort = Abort{};
tar.setHeartbeatMs(250); // call abortCheck 4 times per second
tar.setEventHandler(&abort);
defer tar.clearEventHandler();PercentDone
pub fn percentDone(self: *T, pct: i32) bool
This provides the percentage completion for any method involving network communications or time-consuming processing, assuming the progress can be measured as a percentage. This event is triggered only when it's possible and logical to express the operation's progress as a percentage. The pctDone argument will range from 1 to 100. For methods that finish quickly, the number of PercentDone callbacks may vary, but the final callback will have pctDone equal to 100. For longer operations, callbacks will not exceed one per percentage point (e.g., 1, 2, 3, ..., 98, 99, 100).
The PercentDone callback also acts as an AbortCheck event. For fast methods where PercentDone fires, an AbortCheck event may not trigger since the PercentDone callback already provides an opportunity to abort. For longer operations, where time between PercentDone callbacks is extended, AbortCheck callbacks enable more responsive operation termination.
To abort the operation, set the abort output argument to true. This will cause the method to terminate and return a failure status or corresponding failure value.
Example
const Progress = struct {
pub fn percentDone(_: *Progress, pct: i32) bool {
// pct ranges from 1 to 100.
std.debug.print("Percent done: {d}\n", .{pct});
return false; // return true to abort the method in progress
}
};
var progress = Progress{};
tar.setEventHandler(&progress);
defer tar.clearEventHandler();ProgressInfo
pub fn progressInfo(self: *T, name: [:0]const u8, value: [:0]const u8) void
This event callback provides tag name/value pairs that detail what occurs during a method call. To discover existing tag names, create code to handle the event, emit the pairs, and review them. Most tag names are self-explanatory.
Note: Some Chilkat methods don't fire any ProgressInfo events.
Example
const Info = struct {
pub fn progressInfo(_: *Info, name: [:0]const u8, value: [:0]const u8) void {
std.debug.print("{s}: {s}\n", .{ name, value });
}
};
var info = Info{};
tar.setEventHandler(&info);
defer tar.clearEventHandler();