Loading...
Searching...
No Matches
varint_pair.h
1#pragma once
2#include <stdint.h>
3#include <stdbool.h>
4#include <stddef.h>
5
6#ifdef __cplusplus
7extern "C" {
8#endif
9
10typedef struct VarintPair VarintPair;
11
18VarintPair* varint_pair_alloc(void);
19
25void varint_pair_free(VarintPair* pair);
26
35bool varint_pair_pack(VarintPair* pair, bool first, uint32_t value);
36
43uint8_t* varint_pair_get_data(VarintPair* pair);
44
51size_t varint_pair_get_size(VarintPair* pair);
52
58void varint_pair_reset(VarintPair* pair);
59
70bool varint_pair_unpack(
71 uint8_t* data,
72 size_t data_length,
73 uint32_t* value_1,
74 uint32_t* value_2,
75 size_t* length);
76
77#ifdef __cplusplus
78}
79#endif
Definition varint_pair.c:6