14 lines
320 B
C
14 lines
320 B
C
|
|
#ifndef LNSOCKET_VARINT_H
|
|
#define LNSOCKET_VARINT_H
|
|
|
|
#define VARINT_MAX_LEN 9
|
|
|
|
#include <stddef.h>
|
|
#include <stdint.h>
|
|
|
|
size_t varint_put(unsigned char buf[VARINT_MAX_LEN], uint64_t v);
|
|
size_t varint_size(uint64_t v);
|
|
size_t varint_get(const unsigned char *p, size_t max, int64_t *val);
|
|
|
|
#endif /* LNSOCKET_VARINT_H */
|