LZMA Programming Tag#

Tag to handle LZMA compressed programming data.

Functions#

int32_t
gbl_lzmaEnterProgTag(ParserContext_t *ctx)

Enter an LZMA compressed programming tag.

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.

int32_t
gbl_lzmaExitProgTag(ParserContext_t *ctx, const BootloaderParserCallbacks_t *callbacks)

Exit an LZMA compressed programming tag.

size_t
gbl_lzmaNumBytesRequired(ParserContext_t *ctx)

Number of bytes needed for next stage of parsing.

Macros#

#define

The maximum size of the array holding probability model counters.

#define

The maximum size of the dictionary.

Function Documentation#

gbl_lzmaEnterProgTag#

int32_t gbl_lzmaEnterProgTag (ParserContext_t * ctx)

Enter an LZMA compressed programming tag.

Parameters
N/Actx

Parser context

Returns

  • Error code


Definition at line 124 of file platform/bootloader/parser/compression/btl_decompress_lzma.h

gbl_lzmaParseProgTag#

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
N/Actx

Parser context

N/Adata

Input data to parse

N/Alength

Length of data

N/Acallbacks

Callbacks to call with parsed data

Returns

  • Error code


Definition at line 135 of file platform/bootloader/parser/compression/btl_decompress_lzma.h

gbl_lzmaExitProgTag#

int32_t gbl_lzmaExitProgTag (ParserContext_t * ctx, const BootloaderParserCallbacks_t * callbacks)

Exit an LZMA compressed programming tag.

Parameters
N/Actx

Parser context

N/Acallbacks

Callbacks to call with parsed data

Returns

  • Error code


Definition at line 147 of file platform/bootloader/parser/compression/btl_decompress_lzma.h

gbl_lzmaNumBytesRequired#

size_t gbl_lzmaNumBytesRequired (ParserContext_t * ctx)

Number of bytes needed for next stage of parsing.

Parameters
N/Actx

Parser context

Returns

  • Number of bytes required


Definition at line 156 of file platform/bootloader/parser/compression/btl_decompress_lzma.h

Macro Definition Documentation#

LZMA_COUNTER_SIZE_KB#

#define LZMA_COUNTER_SIZE_KB
Value:
(10UL)

The maximum size of the 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't be decompressed.


Definition at line 107 of file platform/bootloader/parser/compression/btl_decompress_lzma.h

LZMA_DICT_SIZE_KB#

#define LZMA_DICT_SIZE_KB
Value:
(8UL)

The maximum size of the dictionary.

The size given here sets the limit for the size of the dictionary used by the LZMA compressor. LZMA payloads with a dictionary that's too large can't be decompressed.


Definition at line 115 of file platform/bootloader/parser/compression/btl_decompress_lzma.h