nRF Connect SDK API 2.8.99
Loading...
Searching...
No Matches

◆ nrf_compress_decompress_func_t

typedef 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)

#include <include/nrf_compress/implementation.h>

Decompress portion of compressed data. This function will need to be called one or more times with compressed data to decompress it into its natural form.

Parameters
[in]instReserved for future use, must be NULL.
[in]inputInput data buffer, containing the compressed data.
[in]input_sizeSize of the input data buffer.
[in]last_partLast part of compressed data. This should be set to true if this is the final part of the input data.
[out]offsetInput data offset pointer. This will be updated with the amount of bytes used from the input buffer. If this is not the last decompression call, then the next call to this function should be offset the input data buffer by this amount of bytes.
[out]outputOutput data buffer pointer to pointer. This will be set to the compression's output buffer when decompressed data is available to be used or copied.
[out]output_sizeSize of data in output data buffer pointer. Data should only be read when the value in this pointer is greater than 0.
Return values
0Success.
-errnoNegative errno code on other failure.