52typedef enum : uint32_t {
63typedef enum : uint8_t {
80typedef enum : uint8_t {
96typedef enum : uint16_t {
110typedef enum : uint8_t {
124typedef enum : uint32_t {
135typedef enum : uint8_t {
145typedef enum : uint8_t {
157typedef enum : uint32_t {
169typedef enum : uint16_t {
Annotation-attribute framework macros for ra8-firmware.
#define RA8_PRIV
Module-private helper: shared across TUs but only inside one library.
Error Code Definitions for ra8-firmware.
ra8_err_codes_t ra8_err_t
Canonical error-return type used by every ra8-firmware API.
Clean-room RAR 5.0 ("method 50") decompressor – LZ + Huffman + filters.
ra8_err_t priv_rar5_read_tables(ra8_rar5_state_t *st)
Parse a table block: build the BD pre-table then the four LZ tables.
uint32_t priv_rar5_get(ra8_rar5_state_t *st, uint32_t n)
Peek and consume n bits from the streaming reader in one step.
r5_filterop_t
Opcode bytes and instruction widths of the executable filters.
@ k_r5_x86_ilen
CALL/JMP instruction width.
@ k_r5_arm_bl
ARM BL opcode byte.
@ k_r5_x86_jmp
x86 near JMP opcode.
@ k_r5_x86_call
x86 near CALL opcode.
r5_mask_t
Wide bit masks the decoder applies to accumulated fields.
@ k_r5_nibble_mask
Low nibble of a bit-length byte.
@ k_r5_byte_mask
Single-byte mask.
@ k_r5_bf_mask
DecodeNumber bit-field, low bit cleared.
uint32_t priv_rar5_decode_num(ra8_rar5_state_t *st, const ra8_rar5_dtab_t *d)
Decode one Huffman symbol from d, consuming its code bits.
r5_blockflag_t
RAR5 compressed-block header flag layout.
@ k_r5_bf_last
Last block in the file.
@ k_r5_bf_bcount_shift
Shift to the block-size byte count.
@ k_r5_bf_bcount_mask
Mask of the block-size byte count.
@ k_r5_hdr_chk_seed
Header-checksum seed constant.
@ k_r5_bf_tables
Block carries new Huffman tables.
@ k_r5_bf_bitsize_mask
Last-byte valid-bit count minus one.
r5_bits_t
Fixed field widths and code-length limits of the RAR5 bitstream.
@ k_r5_maxbits
Longest Huffman code length.
@ k_r5_byte_bits
Bits per packed byte.
@ k_r5_low3_mask
Low three bits (byte-alignment residue).
@ k_r5_acc_bits
Bit-accumulator width (mask guard).
@ k_r5_bf_bits
DecodeNumber look-ahead window width.
@ k_r5_len_escape
4-bit escape in the BD length list.
ra8_err_t priv_rar5_read_block_header(ra8_rar5_state_t *st, r5_block_t *b)
Read and validate one RAR5 block header at the current bit position.
uint32_t priv_rar5_fill_zeros(uint8_t *out, uint32_t start, uint32_t count, uint32_t max)
Extend out with count zero bit-lengths, bounded by max.
r5_mainsym_t
Reserved main-alphabet symbol boundaries above the 256 literals.
@ k_r5_sym_filter
Read one data filter.
@ k_r5_sym_lenbase
First LZ length slot.
@ k_r5_sym_replast
Repeat the last match.
@ k_r5_sym_repdist0
First remembered distance.
r5_armmask_t
The 24-bit branch-offset mask of the ARM filter.
@ k_r5_arm_off_mask
ARM BL 24-bit word offset.
r5_filter_t
Field widths of the RAR5 in-stream filter descriptor.
@ k_r5_ftype_bits
Filter-type field width.
@ k_r5_fchan_bits
Delta channel-count field width.
r5_tblcode_t
Continuation codes and run bases of the length-table encoding.
@ k_r5_tbl_copy_long
Copy previous length, 7-bit run.
@ k_r5_zeros_extra
BD zero-run length bias.
@ k_r5_tbl_zero_short
Zero length, 3-bit run.
@ k_r5_run_long_bits
Long-run extra-bit width.
@ k_r5_run_long_add
Long-run length bias.
@ k_r5_tbl_zero_long
Zero length, 7-bit run.
bool priv_rar5_copy_match(uint8_t *out, size_t *out_pos, size_t unp, uint32_t length, uint64_t dist)
Copy an LZ match of length bytes at back-distance dist into out.
r5_pad_t
Slack, past the packed length, tolerated while draining the bit stream.
@ k_r5_max_pad_bits
Bit slack past the packed member end.
ra8_err_t priv_rar5_apply_run(ra8_rar5_state_t *st, uint8_t *tbl, uint32_t *idx, uint32_t num)
Append one run (copy-previous or zero) to the length table.
void priv_rar5_filter_delta(ra8_rar5_state_t *st, uint8_t *d, uint32_t len, uint32_t channels)
Apply the per-channel byte-delta filter over d.
r5_distth_t
Distance thresholds that add 1..3 to a decoded match length.
@ k_r5_dist_th2
+1 more above this distance.
@ k_r5_dist_th3
+1 more above this distance.
@ k_r5_dist_th1
+1 length above this distance.
Decoded fields of one RAR5 compressed-block header.
uint32_t last_bits
Valid bits in the block's last byte.
bool last
Block is the last in the file.
bool tables
Block carries fresh Huffman tables.
uint64_t size
Block size in bytes from BlockStart.
One canonical Huffman decode table (shared by all five RAR5 alphabets).
Caller-owned zero-heap scratch for one ra8_rar5_decompress call.