27 #ifndef ROHC_COMMON_SDVL_H 28 #define ROHC_COMMON_SDVL_H 59 __attribute__((warn_unused_result,
const));
61 __attribute__((warn_unused_result,
const));
63 size_t sdvl_get_min_len(
const size_t nr_min_required,
const size_t nr_encoded)
64 __attribute__((warn_unused_result,
const));
67 __attribute__((warn_unused_result,
const));
70 const size_t packet_max_len,
71 size_t *
const packet_len,
74 __attribute__((warn_unused_result, nonnull(1, 3)));
77 const size_t packet_max_len,
78 size_t *
const packet_len,
80 __attribute__((warn_unused_result, nonnull(1, 3)));
84 uint32_t *
const value,
85 size_t *
const bits_nr)
86 __attribute__((warn_unused_result, nonnull(1, 3, 4)));
bool sdvl_encode(uint8_t *const packet, const size_t packet_max_len, size_t *const packet_len, const uint32_t value, const size_t bits_nr)
Encode a value using Self-Describing Variable-Length (SDVL) encoding.
Definition: sdvl.c:180
bool sdvl_encode_full(uint8_t *const packet, const size_t packet_max_len, size_t *const packet_len, const uint32_t value)
Encode a value using Self-Describing Variable-Length (SDVL) encoding.
Definition: sdvl.c:271
rohc_sdvl_max_bits_t
Definition: sdvl.h:41
size_t sdvl_get_min_len(const size_t nr_min_required, const size_t nr_encoded)
Find out how many SDVL bits are needed to represent a value.
Definition: sdvl.c:86
bool sdvl_can_value_be_encoded(const uint32_t value)
Can the given value be encoded with SDVL?
Definition: sdvl.c:55
bool sdvl_can_length_be_encoded(const size_t bits_nr)
Is the given length (in bits) compatible with SDVL?
Definition: sdvl.c:69
size_t sdvl_get_encoded_len(const uint32_t value)
Find out how many bytes are needed to represent the value using Self-Describing Variable-Length (SDVL...
Definition: sdvl.c:134
size_t sdvl_decode(const uint8_t *const data, const size_t length, uint32_t *const value, size_t *const bits_nr)
Decode a Self-Describing Variable-Length (SDVL) value.
Definition: sdvl.c:321