27 #ifndef ROHC_COMMON_SDVL_H
28 #define ROHC_COMMON_SDVL_H
33 # include <linux/types.h>
63 __attribute__((warn_unused_result,
const));
65 __attribute__((warn_unused_result,
const));
67 size_t sdvl_get_min_len(
const size_t nr_min_required,
const size_t nr_encoded)
68 __attribute__((warn_unused_result,
const));
71 __attribute__((warn_unused_result,
const));
74 const size_t packet_max_len,
75 size_t *
const packet_len,
78 __attribute__((warn_unused_result, nonnull(1, 3)));
81 const size_t packet_max_len,
82 size_t *
const packet_len,
84 __attribute__((warn_unused_result, nonnull(1, 3)));
88 uint32_t *
const value,
89 size_t *
const bits_nr)
90 __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:45
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