43typedef enum : uint32_t {
bool priv_comic_is_page_name(const char *name, uint16_t len)
Whether an archive entry name is a decodable comic page image.
ra8_err_t priv_comic_page_add(comic_t *c, const char *name, uint16_t name_len, uint64_t raw_size, uint8_t extractable, uint8_t method, uint32_t zip_index, uint64_t data_off, uint64_t pack_size)
Append one image member to the resident page index.
Unified demand-paged reader for comic-book archives – CBZ (ZIP) and CBR (RAR).
cbt_limits_t
Name scratch size for the tar member walk.
@ k_cbt_max_members
Static upper bound on members walked.
@ k_cbt_name_max
Longest member name indexed (bytes, incl.
ra8_err_t priv_comic_cbt_open(comic_t *c)
Open the CBT (tar) backend: walk the archive + build the page index.
static ra8_err_t internal_add_member(comic_t *c, const unarch_tar_entry_t *ent, const char *name, uint16_t nlen)
Index one tar member if it is a decodable page-image file.
ra8_err_t priv_comic_cbt_extract(comic_t *c, const comic_page_t *p, uint8_t *buf, size_t cap, size_t *got)
Extract one CBT page's encoded image (verbatim tar member copy).
static const char *const s_tag_cbt
Log tag for CBT-backend diagnostics.
Cross-TU seams between the comic facade and its CBZ / CBR backends.
Annotation-attribute framework macros for ra8-firmware.
#define RA8_PRIV
Module-private helper: shared across TUs but only inside one library.
#define RA8_INTERNAL
Marker that a function is intended to be static (file-local).
Validation and Error-Checking Macros for ra8-firmware.
#define RA8_CHECK_NULL_PTR(ptr, tag, message)
Reject nullptr pointer, returning k_ra8_err_null_ptr.
@ k_ra8_err_invalid_state
Module in wrong state for requested operation.
@ k_ra8_err_validation_failed
Validation rule failed (caller-supplied invariant not satisfied).
@ k_ra8_ok
Success – operation completed with all postconditions satisfied.
@ k_ra8_err_not_found
Requested item not found (lookup / search missed).
ra8_err_codes_t ra8_err_t
Canonical error-return type used by every ra8-firmware API.
@ k_ra8_rar_method_store
Uncompressed: data area is the file bytes.
One entry in the resident, sorted page index.
uint64_t raw_size
Encoded image length in bytes (decoder input).
uint64_t data_off
CBR: absolute offset of the member data area.
One open comic archive: backing, kind, page index, and backend state.
unarch_tar_t tar
CBT tar walker state.
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).
bool live
Open succeeded and not superseded.
Clean-room, read-only streaming tar walker (POSIX ustar + pax + GNU).
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.