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

Seekable EPUB media descriptor – opens with no whole-file residency (#151). More...

#include <epub.h>

Data Fields

epub_stream_read_fn read
 Seek+read callback (non-NULL).
void * ctx
 Opaque backing passed to read (out-lives the book).
uint64_t size
 Total archive length in bytes (> 0).

Detailed Description

Seekable EPUB media descriptor – opens with no whole-file residency (#151).

Pass the address of an instance of this struct as the media argument to epub_open_streamed(). Unlike epub_mem_media_t (which requires the entire .epub resident in one buffer), this describes the archive by a seek+read callback plus its total size, so the reader streams the ZIP central directory and each entry on demand. The backing referenced by ctx (an open file, a block device, a page cache) must out-live the opened book, exactly as the resident blob must out-live a book opened via epub_open().

Invariant
read is non-NULL and size > 0.
See also
epub_open_streamed()
Since
0.1.0

Definition at line 232 of file epub.h.

Field Documentation

◆ ctx

void* epub_stream_media_t::ctx

Opaque backing passed to read (out-lives the book).

Definition at line 234 of file epub.h.

Referenced by epub_open_streamed(), internal_backing_read(), and priv_epub_stream_read().

◆ read

epub_stream_read_fn epub_stream_media_t::read

Seek+read callback (non-NULL).

Definition at line 233 of file epub.h.

Referenced by epub_open_streamed(), internal_backing_read(), and priv_epub_stream_read().

◆ size

uint64_t epub_stream_media_t::size

Total archive length in bytes (> 0).

Definition at line 235 of file epub.h.

Referenced by epub_open_streamed(), and priv_epub_stream_read().


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