75 const uint8_t *end = *bufp + encoding_length;
76 size_t tmp_remain = encoding_length;
79 *remainp -= encoding_length;
virtual void decode_internal(uint8_t version, const uint8_t **bufp, size_t *remainp)=0
Reads serialized representation of object from a buffer.
virtual size_t encoded_length_internal() const =0
Returns internal serialized length.
virtual size_t encoded_length() const
Returns serialized object length.
uint8_t decode_i8(const uint8_t **bufp, size_t *remainp)
Decode a 8-bit integer (a byte/character)
int encoded_length_vi32(uint32_t val)
Length of a variable length encoded 32-bit integer (up to 5 bytes)
virtual void encode(uint8_t **bufp) const
Writes serialized representation of object to a buffer.
Logging routines and macros.
Compatibility Macros for C/C++.
Functions to serialize/deserialize primitives to/from a memory buffer.
virtual void decode(const uint8_t **bufp, size_t *remainp)
Reads serialized representation of object from a buffer.
Declarations for Serializable.
void encode_vi32(uint8_t **bufp, uint32_t val)
Encode a integer (up to 32-bit) in variable length encoding.
#define HT_THROWF(_code_, _fmt_,...)
virtual uint8_t encoding_version() const =0
Returns encoding version.
Error codes, Exception handling, error logging.
uint32_t decode_vi32(const uint8_t **bufp, size_t *remainp)
Decode a variable length encoded integer up to 32-bit.
virtual void encode_internal(uint8_t **bufp) const =0
Writes serialized representation of object to a buffer.
void encode_i8(uint8_t **bufp, uint8_t val)
Encodes a byte into the given buffer.