ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
comic_internal.h
Go to the documentation of this file.
1
22#pragma once
23
24#include <stddef.h>
25#include <stdint.h>
26
27#include "comic.h"
28#include "ra8_attributes.h"
29#include "ra8_err.h"
30
31#ifdef __cplusplus
32extern "C" {
33#endif
34
54RA8_PRIV bool priv_comic_is_page_name(const char* name, uint16_t len);
55
81 const char* name,
82 uint16_t name_len,
83 uint64_t raw_size,
84 uint8_t extractable,
85 uint8_t method,
86 uint32_t zip_index,
87 uint64_t data_off,
88 uint64_t pack_size);
89
109
131priv_comic_cbz_extract(comic_t* c, const comic_page_t* p, uint8_t* buf, size_t cap, size_t* got);
132
148
168
193priv_comic_cbr_extract(comic_t* c, const comic_page_t* p, uint8_t* buf, size_t cap, size_t* got);
194
217
240priv_comic_cbt_extract(comic_t* c, const comic_page_t* p, uint8_t* buf, size_t cap, size_t* got);
241
242#ifdef __cplusplus
243}
244#endif
Unified demand-paged reader for comic-book archives – CBZ (ZIP) and CBR (RAR).
ra8_err_t priv_comic_cbr_extract(comic_t *c, const comic_page_t *p, uint8_t *buf, size_t cap, size_t *got)
Extract one CBR page's encoded image (STORE copy or RAR5 decode).
Definition comic_cbr.c:150
bool priv_comic_is_page_name(const char *name, uint16_t len)
Whether an archive entry name is a decodable comic page image.
Definition comic.c:152
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.
Definition comic.c:177
ra8_err_t priv_comic_cbt_open(comic_t *c)
Open the CBT (tar) backend: walk the archive + build the page index.
Definition comic_cbt.c:87
ra8_err_t priv_comic_cbz_extract(comic_t *c, const comic_page_t *p, uint8_t *buf, size_t cap, size_t *got)
Extract one CBZ page's encoded image through the streaming ZIP reader.
Definition comic_cbz.c:243
ra8_err_t priv_comic_cbz_close(comic_t *c)
Tear down the CBZ backend's miniz reader.
Definition comic_cbz.c:264
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).
Definition comic_cbt.c:116
ra8_err_t priv_comic_cbz_open(comic_t *c)
Open the CBZ (ZIP) backend: init the streaming miniz reader + page index.
Definition comic_cbz.c:204
ra8_err_t priv_comic_cbr_open(comic_t *c)
Open the CBR (RAR) backend: walk the archive + build the page index.
Definition comic_cbr.c:111
Annotation-attribute framework macros for ra8-firmware.
#define RA8_PRIV
Module-private helper: shared across TUs but only inside one library.
Error Code Definitions for ra8-firmware.
ra8_err_codes_t ra8_err_t
Canonical error-return type used by every ra8-firmware API.
Definition ra8_err.h:546
One entry in the resident, sorted page index.
Definition comic.h:140
One open comic archive: backing, kind, page index, and backend state.
Definition comic.h:179