mirror of
git://jb55.com/damus
synced 2024-10-01 17:30:44 +00:00
15 lines
326 B
C
15 lines
326 B
C
|
|
||
|
#ifndef PROTOVERSE_VARINT_H
|
||
|
#define PROTOVERSE_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 /* PROTOVERSE_VARINT_H */
|