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

One open chunked .rabook file: parsed geometry + caller storage. More...

#include <book_chunked.h>

Data Fields

ra8_vsource_read_fn file_read
 Container byte reader.
void * file_ctx
 Reader context.
book_inflate_fn inflate_cb
 zlib decompressor.
const uint64_t * table
 Chunk offsets.
uint32_t table_cap_entries
 Table entry capacity.
uint8_t * staging
 Compressed-byte staging.
uint32_t staging_cap
 Staging byte capacity.
uint64_t payload_off
 First stream file offset.
uint64_t inflated_total
 Served flat-blob length.
uint32_t chunk_bytes
 Inflated bytes per chunk.
uint32_t chunk_count
 Chunk count.

Detailed Description

One open chunked .rabook file: parsed geometry + caller storage.

Populated by book_chunked_open; treat every field as read-only afterwards. file_read addresses the container file bytes (the compressed on-disk form); book_chunked_read then serves the inflated flat-blob byte space on top of it. table points at the caller's buffer holding chunk_count + 1 payload-relative stream offsets; staging receives one chunk's compressed bytes per read.

Invariant
table[0] == 0, table is strictly increasing, and table[chunk_count] == file length - payload_off.
Every chunk's compressed length fits staging_cap.
table_cap_entries >= chunk_count + 1; the retained capacity permits defensive revalidation before any table indexing.
See also
book_chunked_open()
Since
Version 0.1.0

Definition at line 83 of file book_chunked.h.

Field Documentation

◆ chunk_bytes

◆ chunk_count

◆ file_ctx

void* book_chunked_t::file_ctx

◆ file_read

◆ inflate_cb

book_inflate_fn book_chunked_t::inflate_cb

zlib decompressor.

Definition at line 86 of file book_chunked.h.

Referenced by book_chunked_open(), internal_stage_and_inflate(), and internal_validate_reader_fields().

◆ inflated_total

◆ payload_off

uint64_t book_chunked_t::payload_off

First stream file offset.

Definition at line 91 of file book_chunked.h.

Referenced by internal_load_table(), internal_stage_and_inflate(), internal_table(), and internal_validate_reader_table().

◆ staging

uint8_t* book_chunked_t::staging

◆ staging_cap

uint32_t book_chunked_t::staging_cap

◆ table

◆ table_cap_entries

uint32_t book_chunked_t::table_cap_entries

Table entry capacity.

Definition at line 88 of file book_chunked.h.

Referenced by internal_load_table(), internal_output_is_aliased(), and internal_validate_reader_table().


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