|
Embedded SDK
Embedded SDK
|
#include <stdint.h>#include <stddef.h>#include <stdbool.h>#include "varint.h"#include "write.h"#include "read.h"
Go to the source code of this file.
Functions | |
| uint8_t | varint_size (uint64_t value) |
| int | varint_read (const uint8_t *in, size_t in_len, uint64_t *value) |
| int | varint_write (uint8_t *out, size_t offset, uint64_t value) |
| int varint_read | ( | const uint8_t * | in, |
| size_t | in_len, | ||
| uint64_t * | value | ||
| ) |
Read Bitcoin-like varint from byte buffer.
| [in] | in | Pointer to input byte buffer. |
| [in] | in_len | Length of the input byte buffer. |
| [out] | value | Pointer to 64-bit unsigned integer to output varint. |
| uint8_t varint_size | ( | uint64_t | value | ) |
Size of value represented as Bitcoin-like varint.
| [in] | value | 64-bit unsigned integer to compute varint size. |
| int varint_write | ( | uint8_t * | out, |
| size_t | offset, | ||
| uint64_t | value | ||
| ) |
Write Bitcoin-like varint to byte buffer.
| [out] | out | Pointer to output byte buffer. |
| [in] | offset | Offset in the output byte buffer. |
| [in] | value | 64-bit unsigned integer to write as varint. |