LZMA Programming TagPlugin > Image Parser > GBL Parser > Custom GBL Tags

Description

Tag to handle LZMA compressed programming data.

Macros

#define LZMA_COUNTER_SIZE_KB (10UL)
Maximum size of array holding probability model counters. The size given here sets the limit for the size of the lc and lp constants used by the LZMA compressor. The necessary size of the counter array can be found from size = 4 KiB + 1.5 KiB * (1 << (lc + lp)). LZMA payloads with too large lc+lp can not be decompressed.
#define LZMA_DICT_SIZE_KB (8UL)
Maximum size of dictionary. The size given here sets the limit for the size of the dictionary used by the LZMA compressor. LZMA payloads with too large dictionary can not be decompressed.
#define LZMA_SUPPORT_NO_END_MARK (0)
Support not using an end mark in the LZMA compressed file Not having an end mark in the LZMA file requires more bookkeeping during decompression. Disable this option to save some code space.

Functions

int32_t gbl_lzmaEnterProgTag ( ParserContext_t *ctx)
int32_t gbl_lzmaParseProgTag ( ParserContext_t *ctx, void *data, size_t length, const BootloaderParserCallbacks_t *callbacks)
int32_t gbl_lzmaExitProgTag ( ParserContext_t *ctx, const BootloaderParserCallbacks_t *callbacks)
size_t gbl_lzmaNumBytesRequired ( ParserContext_t *ctx)

Function Documentation

int32_t gbl_lzmaEnterProgTag ( ParserContext_t * ctx )

Enter an LZMA compressed programming tag

Parameters
ctx Parser context
Returns
Error code
int32_t gbl_lzmaParseProgTag ( ParserContext_t * ctx,
void * data,
size_t length,
const BootloaderParserCallbacks_t * callbacks
)

Parse a chunk of data from an LZMA compressed programming tag

Parameters
ctx Parser context
data Input data to parse
length Length of data
callbacks Callbacks to call with parsed data
Returns
Error code
int32_t gbl_lzmaExitProgTag ( ParserContext_t * ctx,
const BootloaderParserCallbacks_t * callbacks
)

Exit an LZMA compressed programming tag

Parameters
ctx Parser context
callbacks Callbacks to call with parsed data
Returns
Error code
size_t gbl_lzmaNumBytesRequired ( ParserContext_t * ctx )

Number of bytes needed for next stage of parsing

Parameters
ctx Parser context
Returns
Number of bytes required