ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
unarch_tar_entry_t Struct Reference

One decoded tar member: a file, a directory, or a skipped block. More...

#include <unarch_tar.h>

Data Fields

uint64_t data_off
 Absolute offset of the member's data area.
uint64_t size
 Member data length in bytes (stored verbatim).
uint64_t next_off
 Absolute offset of the next member's first block.
uint16_t name_len
 Name bytes copied into the caller buffer (clamped).
uint8_t is_file
 1 if this member is a regular file.
uint8_t is_dir
 1 if this member is a directory.

Detailed Description

One decoded tar member: a file, a directory, or a skipped block.

Filled by unarch_tar_next. next_off always advances strictly past the member (header, meta prelude, and data blocks), so a caller can walk the archive with a bounded loop. For a file member (is_file == 1) the data area is [data_off, data_off + size) – tar stores members verbatim, so size is both the packed and the unpacked length.

Invariant
next_off > <member offset> for every well-formed member.
data_off + size <= <archive size> (validated by the walker).
See also
unarch_tar_next()
Since
Version 0.1.0

Definition at line 122 of file unarch_tar.h.

Field Documentation

◆ data_off

uint64_t unarch_tar_entry_t::data_off

Absolute offset of the member's data area.

Definition at line 123 of file unarch_tar.h.

Referenced by internal_add_member(), internal_finish_member(), priv_comic_cbt_extract(), and unarch_tar_read().

◆ is_dir

uint8_t unarch_tar_entry_t::is_dir

1 if this member is a directory.

Definition at line 128 of file unarch_tar.h.

Referenced by internal_finish_member().

◆ is_file

uint8_t unarch_tar_entry_t::is_file

1 if this member is a regular file.

Definition at line 127 of file unarch_tar.h.

Referenced by internal_add_member(), internal_finish_member(), priv_comic_cbt_extract(), and unarch_tar_read().

◆ name_len

uint16_t unarch_tar_entry_t::name_len

Name bytes copied into the caller buffer (clamped).

Definition at line 126 of file unarch_tar.h.

Referenced by internal_finish_member(), and priv_comic_cbt_open().

◆ next_off

uint64_t unarch_tar_entry_t::next_off

Absolute offset of the next member's first block.

Definition at line 125 of file unarch_tar.h.

Referenced by internal_finish_member(), and priv_comic_cbt_open().

◆ size

uint64_t unarch_tar_entry_t::size

Member data length in bytes (stored verbatim).

Definition at line 124 of file unarch_tar.h.

Referenced by internal_add_member(), internal_finish_member(), priv_comic_cbt_extract(), and unarch_tar_read().


The documentation for this struct was generated from the following file: