76typedef enum : uint16_t {
Unified decompression-limits policy: one bound set for every decoder.
Error Code Definitions for ra8-firmware.
ra8_err_codes_t ra8_err_t
Canonical error-return type used by every ra8-firmware API.
Running consumption tracker charged by a decoder against its policy.
One decompression policy: the five resource bounds decoders enforce.
One decoded tar member: a file, a directory, or a skipped block.
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.
uint8_t is_file
1 if this member is a regular file.
uint16_t name_len
Name bytes copied into the caller buffer (clamped).
uint8_t is_dir
1 if this member is a directory.
One open tar archive: the backing plus the walk's running budget.
void * ctx
Context for read.
uint64_t size
Archive length in bytes.
bool live
Open succeeded and not superseded.
unarch_read_fn read
Byte reader over the archive.
ra8_decomp_budget_t budget
Entry / iteration budget for the walk.
Shared seek+read seam and flat-memory backing for the unarchivers.
size_t(* unarch_read_fn)(void *ctx, uint64_t offset, void *buf, size_t len)
Seek+read backing over an archive's bytes.
ra8_err_t unarch_tar_open(unarch_tar_t *t, unarch_read_fn read, void *ctx, uint64_t size, const ra8_decomp_limits_t *limits)
Bind a walker to an archive and validate its first header block.
ra8_err_t unarch_tar_next(unarch_tar_t *t, uint64_t off, char *name_buf, uint16_t name_cap, unarch_tar_entry_t *out)
Decode the member at off and advance to the next member.
ra8_err_t unarch_tar_read(const unarch_tar_t *t, const unarch_tar_entry_t *ent, uint8_t *buf, size_t cap, size_t *got)
Copy a file member's data area into the caller buffer.
bool unarch_tar_probe(const uint8_t *block, size_t len)
Whether a leading header block looks like a tar archive.
unarch_tar_dims_t
Fixed sizes of the tar on-disk grammar and the walker's bounds.
@ k_unarch_tar_pax_max
Max pax / longname data bytes.
@ k_unarch_tar_block
On-disk block / header size.
@ k_unarch_tar_meta_max
Max meta (x/g/L/K) blocks per member.