ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
unarch_gzip.h
Go to the documentation of this file.
1
44#pragma once
45
46#include <stddef.h>
47#include <stdint.h>
48
49#include "ra8_decomp_limits.h"
50#include "ra8_err.h"
51#include "unarch_io.h"
52
53#ifdef __cplusplus
54extern "C" {
55#endif
56
66typedef enum : uint16_t {
70
93[[nodiscard]] bool unarch_gzip_magic(const uint8_t* sig, size_t sig_len);
94
141 void* ctx,
142 uint64_t size,
143 uint8_t* out,
144 size_t out_cap,
145 const ra8_decomp_limits_t* limits,
146 size_t* out_len);
147
148#ifdef __cplusplus
149}
150#endif
Unified decompression-limits policy: one bound set for every decoder.
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 decompression policy: the five resource bounds decoders enforce.
ra8_err_t unarch_gzip_unwrap(unarch_read_fn read, void *ctx, uint64_t size, uint8_t *out, size_t out_cap, const ra8_decomp_limits_t *limits, size_t *out_len)
Decode one whole gzip member from a read seam into a caller arena.
unarch_gzip_dims_t
Grammar sizes and fail-closed bounds of the gzip decoder.
Definition unarch_gzip.h:66
@ k_unarch_gzip_str_max
Max FNAME / FCOMMENT bytes accepted.
Definition unarch_gzip.h:68
@ k_unarch_gzip_sig_len
Magic length (1F 8B).
Definition unarch_gzip.h:67
bool unarch_gzip_magic(const uint8_t *sig, size_t sig_len)
Whether sig begins with the gzip member magic (1F 8B).
Shared seek+read seam and flat-memory backing for the unarchivers.
size_t(* unarch_read_fn)(void *ctx, uint64_t offset, void *buf, size_t len)
Seek+read backing over an archive's bytes.
Definition unarch_io.h:55