FastLED 3.9.15
Loading...
Searching...
No Matches

◆ lzw__table_add_entry()

static void fl::third_party::lzw__table_add_entry ( struct lzw_ctx * ctx,
fl::u16 code )
inlinestatic

Create new table entry.

Parameters
[in]ctxLZW reading context, updated.
[in]codeLast value code for new table entry.

Definition at line 357 of file lzw.cpp.hpp.

360{
361 struct lzw_table_entry *entry = &ctx->table[ctx->table_size];
362
363 entry->value = code;
364 entry->first = ctx->prev_code_first;
365 entry->count = ctx->prev_code_count + 1;
366 entry->extends = ctx->prev_code;
367
368 ctx->table_size++;
369}
fl::u8 first
First value in entry's entire record.
Definition lzw.cpp.hpp:64
fl::u16 extends
Offset in table to previous entry.
Definition lzw.cpp.hpp:66
fl::u16 table_size
Next position in table to fill.
Definition lzw.cpp.hpp:87
fl::u16 prev_code_first
First value of previous code.
Definition lzw.cpp.hpp:76
struct lzw_table_entry table[LZW_TABLE_ENTRY_MAX]
LZW code table.
Definition lzw.cpp.hpp:97
fl::u16 count
Count of values in this entry's record.
Definition lzw.cpp.hpp:65
fl::u16 prev_code
Code read from input previously.
Definition lzw.cpp.hpp:75
fl::u8 value
Last value for record ending at entry.
Definition lzw.cpp.hpp:63
fl::u16 prev_code_count
Total values for previous code.
Definition lzw.cpp.hpp:77
LZW table entry.
Definition lzw.cpp.hpp:62

References fl::third_party::lzw_table_entry::count, fl::third_party::lzw_table_entry::extends, fl::third_party::lzw_table_entry::first, FL_NOEXCEPT, and fl::third_party::lzw_table_entry::value.

Referenced by lzw__decode().

+ Here is the caller graph for this function: