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

One open comic archive: backing, kind, page index, and backend state. More...

#include <comic.h>

Collaboration diagram for comic_t:

Data Fields

comic_read_fn read
 Byte reader over the archive.
void * ctx
 Context for read.
uint64_t size
 Archive length in bytes.
comic_page_tpages
 Caller page-index array.
uint32_t page_cap
 Capacity of pages in entries.
uint32_t page_count
 Populated page count.
char * names
 Caller name arena.
uint32_t names_cap
 Capacity of names in bytes.
uint32_t names_len
 Bytes used in names.
comic_stream_t stream
 CBZ miniz I/O descriptor (stable addr).
ra8_rar_t rar
 CBR walker state.
ra8_rar5_state_t rar5_state
 CBR RAR5 decompressor scratch (no heap).
unarch_tar_t tar
 CBT tar walker state.
comic_kind_t kind
 Detected container kind.
uint8_t zip_active
 1 = miniz reader is initialised (CBZ).
uint8_t zip_storage [k_comic_zip_bytes]
 Inline storage for miniz's mz_zip_archive (CBZ; no heap).
epub_miniz_arena_t miniz_arena
 Per-comic allocator descriptor bound through miniz's opaque pointer.
epub_miniz_workspace_t miniz_workspace
 Per-comic bounded allocator workspace (used only for CBZ).

Detailed Description

One open comic archive: backing, kind, page index, and backend state.

Populated by comic_open; treat every field as read-only afterward except through the API. pages / names are the caller-owned index and name arena; zip_storage holds miniz's mz_zip_archive inline (no heap) for a CBZ; rar holds the walker for a CBR.

Invariant
page_count <= page_cap and names_len <= names_cap.
kind != k_comic_kind_none between open and close.
See also
comic_open()
Since
Version 0.1.0

Definition at line 179 of file comic.h.

Field Documentation

◆ ctx

void* comic_t::ctx

Context for read.

Definition at line 181 of file comic.h.

Referenced by comic_open(), and internal_open_detect().

◆ kind

comic_kind_t comic_t::kind

Detected container kind.

Definition at line 193 of file comic.h.

Referenced by comic_close(), comic_kind(), comic_page_count(), comic_page_info(), comic_page_read(), and internal_open_detect().

◆ miniz_arena

epub_miniz_arena_t comic_t::miniz_arena

Per-comic allocator descriptor bound through miniz's opaque pointer.

Definition at line 198 of file comic.h.

Referenced by internal_set_alloc(), priv_comic_cbz_close(), and priv_comic_cbz_open().

◆ miniz_workspace

epub_miniz_workspace_t comic_t::miniz_workspace

Per-comic bounded allocator workspace (used only for CBZ).

Definition at line 200 of file comic.h.

Referenced by internal_set_alloc().

◆ names

char* comic_t::names

Caller name arena.

Definition at line 186 of file comic.h.

Referenced by comic_open(), comic_page_info(), internal_sort(), and priv_comic_page_add().

◆ names_cap

uint32_t comic_t::names_cap

Capacity of names in bytes.

Definition at line 187 of file comic.h.

Referenced by comic_open(), and priv_comic_page_add().

◆ names_len

uint32_t comic_t::names_len

Bytes used in names.

Definition at line 188 of file comic.h.

Referenced by priv_comic_page_add().

◆ page_cap

uint32_t comic_t::page_cap

Capacity of pages in entries.

Definition at line 184 of file comic.h.

Referenced by comic_open(), and priv_comic_page_add().

◆ page_count

uint32_t comic_t::page_count

Populated page count.

Definition at line 185 of file comic.h.

Referenced by comic_close(), comic_open(), comic_page_count(), comic_page_info(), comic_page_read(), internal_sort(), and priv_comic_page_add().

◆ pages

comic_page_t* comic_t::pages

Caller page-index array.

Definition at line 183 of file comic.h.

Referenced by comic_open(), comic_page_info(), comic_page_read(), internal_sort(), and priv_comic_page_add().

◆ rar

ra8_rar_t comic_t::rar

CBR walker state.

Definition at line 190 of file comic.h.

Referenced by internal_add_member(), internal_open_detect(), priv_comic_cbr_extract(), and priv_comic_cbr_open().

◆ rar5_state

ra8_rar5_state_t comic_t::rar5_state

CBR RAR5 decompressor scratch (no heap).

Definition at line 191 of file comic.h.

Referenced by priv_comic_cbr_extract().

◆ read

comic_read_fn comic_t::read

Byte reader over the archive.

Definition at line 180 of file comic.h.

Referenced by comic_open(), and internal_open_detect().

◆ size

uint64_t comic_t::size

Archive length in bytes.

Definition at line 182 of file comic.h.

Referenced by comic_open(), internal_open_detect(), and priv_comic_cbz_open().

◆ stream

comic_stream_t comic_t::stream

CBZ miniz I/O descriptor (stable addr).

Definition at line 189 of file comic.h.

Referenced by internal_open_detect(), and priv_comic_cbz_open().

◆ tar

unarch_tar_t comic_t::tar

CBT tar walker state.

Definition at line 192 of file comic.h.

Referenced by comic_close(), internal_open_detect(), priv_comic_cbt_extract(), and priv_comic_cbt_open().

◆ zip_active

uint8_t comic_t::zip_active

1 = miniz reader is initialised (CBZ).

Definition at line 194 of file comic.h.

Referenced by comic_close(), priv_comic_cbz_close(), priv_comic_cbz_extract(), and priv_comic_cbz_open().

◆ zip_storage

uint8_t comic_t::zip_storage[k_comic_zip_bytes]

Inline storage for miniz's mz_zip_archive (CBZ; no heap).

Definition at line 196 of file comic.h.

Referenced by internal_zip().


The documentation for this struct was generated from the following file:
  • apps/shared_libs/comic/inc/comic.h