LZMA Decompressor#
LZMA decompressor LZMA is a compression algorithm that is used in the Gecko Bootloader for compressing upgrade images.
It uses dictionary compression algorithm, a variant of LZ77
Functions#
Decompress LZMA data and flash.
Decompress LZMA compressed data.
LZMA Allocator.
LZMA Allocator.
Function Documentation#
decompressAndFlash#
int32_t decompressAndFlash (ParserContext_t * ctx, const BootloaderParserCallbacks_t * callbacks, bool finish)
Decompress LZMA data and flash.
N/A | ctx | Parser context |
N/A | callbacks | Callbacks to call with parsed data |
N/A | finish | Indicates if decompression is complete |
Returns
Error code
50
of file platform/bootloader/parser/compression/btl_decompress_lzma.h
decompressData#
int32_t decompressData (uint8_t * dstBuffer, size_t * dstBufferLen, uint8_t * srcBuffer, size_t * srcBufferLen, ELzmaStatus * status)
Decompress LZMA compressed data.
N/A | dstBuffer | Pointer to the destination buffer |
N/A | dstBufferLen | Size of the destination buffer |
N/A | srcBuffer | Pointer to the source buffer |
N/A | srcBufferLen | Size of the source buffer |
N/A | status | LZMA status code. |
Returns
Error code
63
of file platform/bootloader/parser/compression/btl_decompress_lzma.h
lzmaAlloc#
void * lzmaAlloc (ISzAllocPtr p, size_t size)
LZMA Allocator.
N/A | p | Pointer to ISzAllocPtr structure instance. |
N/A | size | Size of the dictionary buffer |
74
of file platform/bootloader/parser/compression/btl_decompress_lzma.h
lzmaFree#
void lzmaFree (ISzAllocPtr p, void * address)
LZMA Allocator.
N/A | p | Pointer to ISzAllocPtr structure instance. |
N/A | address | Pointer to ISzAlloc structure |
81
of file platform/bootloader/parser/compression/btl_decompress_lzma.h