The th_set_*() functions each set an individual field of the
current tar header associated with the TAR handle t. The
th_set_user() and th_set_group() functions set both the
numeric user/group ID fields and the user/group name text fields.
The other functions set only the field that they refer to.
The th_set_from_stat() function uses the other th_set_*()
functions to set all of the fields at once, based on the data passed to
it in the argument s.
The th_finish() function sets the appropriate constants for the
magic and version fields. It then calculates the header checksum and
fills in the checksum field.