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

Cursor-tracked exact-read byte source with a running header CRC. More...

Data Fields

unarch_read_fn read
 Byte reader over the member.
void * ctx
 Context for read.
uint64_t size
 Member length in bytes.
uint64_t pos
 Next unconsumed byte offset.
uint32_t crc
 Running CRC32 of consumed bytes.
bool track_crc
 Fold consumed bytes into crc.

Detailed Description

Cursor-tracked exact-read byte source with a running header CRC.

Wraps the shared read seam: pos is the next unconsumed byte; every consumed header byte is folded into crc while track_crc is set so the optional FHCRC check needs no re-read.

Invariant
pos <= size between operations.
See also
unarch_gzip_unwrap()
Since
Version 0.1.0

Definition at line 78 of file unarch_gzip.c.

Field Documentation

◆ crc

uint32_t gz_src_t::crc

Running CRC32 of consumed bytes.

Definition at line 83 of file unarch_gzip.c.

Referenced by internal_parse_header(), and internal_src_take().

◆ ctx

void* gz_src_t::ctx

Context for read.

Definition at line 80 of file unarch_gzip.c.

Referenced by internal_src_take(), and internal_verify_trailer().

◆ pos

uint64_t gz_src_t::pos

Next unconsumed byte offset.

Definition at line 82 of file unarch_gzip.c.

Referenced by internal_inflate_pass(), internal_src_take(), and internal_verify_trailer().

◆ read

unarch_read_fn gz_src_t::read

Byte reader over the member.

Definition at line 79 of file unarch_gzip.c.

Referenced by internal_src_take(), and internal_verify_trailer().

◆ size

uint64_t gz_src_t::size

Member length in bytes.

Definition at line 81 of file unarch_gzip.c.

Referenced by internal_inflate_pass(), internal_src_take(), and internal_verify_trailer().

◆ track_crc

bool gz_src_t::track_crc

Fold consumed bytes into crc.

Definition at line 84 of file unarch_gzip.c.

Referenced by internal_parse_header(), and internal_src_take().


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