70typedef enum : uint32_t {
288 uint32_t scratch_len,
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.
One decompression policy: the five resource bounds decoders enforce.
One multi-call XZ decode session (opaque decoder + liveness flag).
struct xz_dec * dec
xz-embedded decoder state (pool-allocated).
bool live
Session is begun and not yet ended.
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.
bool unarch_xz_magic(const uint8_t *sig, size_t sig_len)
Whether sig begins with the XZ stream header magic.
ra8_err_t unarch_xz_stream_run(unarch_xz_stream_t *xs, const uint8_t *in, size_t in_len, size_t *in_used, uint8_t *out, size_t out_cap, size_t *out_used, bool *end)
Feed one input chunk through a live session, producing output.
void unarch_xz_stream_end(unarch_xz_stream_t *xs)
End a session: free the decoder and release the allocation pool.
ra8_err_t unarch_xz_unwrap(unarch_read_fn read, void *ctx, uint64_t size, uint8_t *out, size_t out_cap, void *scratch, uint32_t scratch_len, const ra8_decomp_limits_t *limits, size_t *out_len)
Decode one whole XZ stream from a read seam into a caller arena.
ra8_err_t unarch_xz_stream_begin(unarch_xz_stream_t *xs, void *scratch, uint32_t scratch_len)
Begin a multi-call XZ decode session over a caller scratch.
unarch_xz_dims_t
Scratch sizing constants for the XZ decoder wrappers.
@ k_unarch_xz_sig_len
XZ stream header magic length.
@ k_unarch_xz_state_reserve
Decoder-state slice of the scratch.