nRF Connect SDK API 2.8.99
Loading...
Searching...
No Matches
implementation.h File Reference

Public API for compression/decompression subsystem. More...

#include <stdint.h>
#include <stdlib.h>
#include <zephyr/kernel.h>
#include <zephyr/types.h>
#include <zephyr/sys/iterable_sections.h>

Go to the source code of this file.

Data Structures

struct  nrf_compress_implementation
 

Macros

#define NRF_COMPRESS_IMPLEMENTATION_DEFINE(name, _id, _init, _deinit, _reset, _compress, _decompress_bytes_needed, _decompress)
 Define a compression implementation. This adds a new entry to the iterable section linker list of compression implementations.
 

Typedefs

typedef int(* nrf_compress_init_func_t) (void *inst)
 Initialize compression implementation.
 
typedef int(* nrf_compress_deinit_func_t) (void *inst)
 De-initialize compression implementation.
 
typedef int(* nrf_compress_reset_func_t) (void *inst)
 Reset compression state function. Used to abort current compression or decompression task before starting a new one.
 
typedef int(* nrf_compress_compress_func_t) (void *inst)
 Placeholder function for future use, do not use.
 
typedef 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. This is the ideal amount of data that should be provided to the next function call. Less data than this may be provided if more is not available (for example, end of data or data is is being streamed).
 
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)
 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.
 

Enumerations

enum  nrf_compress_types { NRF_COMPRESS_TYPE_LZMA , NRF_COMPRESS_TYPE_ARM_THUMB , NRF_COMPRESS_TYPE_COUNT , NRF_COMPRESS_TYPE_USER_CUSTOM_START = 32768 }
 Supported compression types. More...
 

Functions

struct nrf_compress_implementationnrf_compress_implementation_find (uint16_t id)
 Find a compression implementation.
 

Detailed Description

Public API for compression/decompression subsystem.