12#ifndef NRF_COMPRESS_IMPLEMENTATION_H_
13#define NRF_COMPRESS_IMPLEMENTATION_H_
17#include <zephyr/kernel.h>
18#include <zephyr/types.h>
19#include <zephyr/sys/iterable_sections.h>
114 bool last_part, uint32_t *offset, uint8_t **output,
115 size_t *output_size);
140#if defined(CONFIG_NRF_COMPRESS_COMPRESSION) || defined(__DOXYGEN__)
144#if defined(CONFIG_NRF_COMPRESS_DECOMPRESSION) || defined(__DOXYGEN__)
169#define NRF_COMPRESS_IMPLEMENTATION_DEFINE(name, _id, _init, _deinit, _reset, _compress, \
170 _decompress_bytes_needed, _decompress) \
171 STRUCT_SECTION_ITERABLE(nrf_compress_implementation, name) = { \
176 COND_CODE_1(CONFIG_NRF_COMPRESS_COMPRESSION, ( \
177 .compress = _compress, \
179 COND_CODE_1(CONFIG_NRF_COMPRESS_DECOMPRESSION, ( \
180 .decompress_bytes_needed = _decompress_bytes_needed, \
181 .decompress = _decompress, \
int(* nrf_compress_deinit_func_t)(void *inst)
De-initialize compression implementation.
Definition implementation.h:51
size_t(* nrf_compress_decompress_bytes_needed_t)(void *inst)
Return chunk size of data to provide to next call of nrf_compress_decompress_func_t function....
Definition implementation.h:88
int(* nrf_compress_compress_func_t)(void *inst)
Placeholder function for future use, do not use.
Definition implementation.h:74
int(* nrf_compress_reset_func_t)(void *inst)
Reset compression state function. Used to abort current compression or decompression task before star...
Definition implementation.h:63
nrf_compress_types
Supported compression types.
Definition implementation.h:118
@ NRF_COMPRESS_TYPE_LZMA
Definition implementation.h:120
@ NRF_COMPRESS_TYPE_ARM_THUMB
Definition implementation.h:123
@ NRF_COMPRESS_TYPE_COUNT
Definition implementation.h:126
@ NRF_COMPRESS_TYPE_USER_CUSTOM_START
Definition implementation.h:129
int(* nrf_compress_decompress_func_t)(void *inst, const uint8_t *input, size_t input_size, bool last_part, uint32_t *offset, uint8_t **output, size_t *output_size)
Decompress portion of compressed data. This function will need to be called one or more times with co...
Definition implementation.h:113
int(* nrf_compress_init_func_t)(void *inst)
Initialize compression implementation.
Definition implementation.h:40
struct nrf_compress_implementation * nrf_compress_implementation_find(uint16_t id)
Find a compression implementation.
const nrf_compress_decompress_func_t decompress
Definition implementation.h:146
const nrf_compress_reset_func_t reset
Definition implementation.h:138
const nrf_compress_decompress_bytes_needed_t decompress_bytes_needed
Definition implementation.h:145
const nrf_compress_deinit_func_t deinit
Definition implementation.h:137
const nrf_compress_init_func_t init
Definition implementation.h:136
const nrf_compress_compress_func_t compress
Definition implementation.h:141
const uint16_t id
ID of implementation nrf_compress_types.
Definition implementation.h:134
Definition implementation.h:132