0.9.8.10
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Functions
Hypertable::Serialization Namespace Reference

Functions

void encode_i8 (uint8_t **bufp, uint8_t val)
 Encodes a byte into the given buffer. More...
 
uint8_t decode_i8 (const uint8_t **bufp, size_t *remainp)
 Decode a 8-bit integer (a byte/character) More...
 
uint8_t decode_byte (const uint8_t **bufp, size_t *remainp)
 Decodes a single byte from the given buffer. More...
 
void encode_bool (uint8_t **bufp, bool bval)
 Encodes a boolean into the given buffer. More...
 
bool decode_bool (const uint8_t **bufp, size_t *remainp)
 Decodes a boolean value from the given buffer. More...
 
void encode_i16 (uint8_t **bufp, uint16_t val)
 Encode a 16-bit integer in little-endian order. More...
 
uint16_t decode_i16 (const uint8_t **bufp, size_t *remainp)
 Decode a 16-bit integer in little-endian order. More...
 
void encode_i32 (uint8_t **bufp, uint32_t val)
 Encode a 32-bit integer in little-endian order. More...
 
uint32_t decode_i32 (const uint8_t **bufp, size_t *remainp)
 Decode a 32-bit integer in little-endian order. More...
 
void encode_i64 (uint8_t **bufp, uint64_t val)
 Encode a 64-bit integer in little-endian order. More...
 
uint64_t decode_i64 (const uint8_t **bufp, size_t *remainp)
 Decode a 64-bit integer in little-endian order. More...
 
int encoded_length_vi32 (uint32_t val)
 Length of a variable length encoded 32-bit integer (up to 5 bytes) More...
 
int encoded_length_vi64 (uint64_t val)
 Length of a variable length encoded 64-bit integer (up to 9 bytes) More...
 
void encode_vi32 (uint8_t **bufp, uint32_t val)
 Encode a integer (up to 32-bit) in variable length encoding. More...
 
void encode_vi64 (uint8_t **bufp, uint64_t val)
 Encode a integer (up to 64-bit) in variable length encoding. More...
 
uint32_t decode_vi32 (const uint8_t **bufp, size_t *remainp)
 Decode a variable length encoded integer up to 32-bit. More...
 
uint64_t decode_vi64 (const uint8_t **bufp, size_t *remainp)
 Decode a variable length encoded integer up to 64-bit. More...
 
uint32_t decode_vi32 (const uint8_t **bufp)
 Decode a variable length encoded integer up to 32-bit. More...
 
uint64_t decode_vi64 (const uint8_t **bufp)
 Decode a variable length encoded integer up to 64-bit. More...
 
size_t encoded_length_bytes32 (int32_t len)
 Computes the encoded length of a 32-bit length byte array (i32, bytes) More...
 
void encode_bytes32 (uint8_t **bufp, const void *data, int32_t len)
 Encodes a variable sized byte array into the given buffer. More...
 
uint8_t * decode_bytes32 (const uint8_t **bufp, size_t *remainp, uint32_t *lenp)
 Decodes a variable sized byte array from the given buffer. More...
 
size_t encoded_length_str16 (const char *str)
 Computes the encoded length of a string16 encoding. More...
 
size_t encoded_length_str16 (const String &str)
 Computes the encoded length of a String. More...
 
void encode_str16 (uint8_t **bufp, const void *str, uint16_t len)
 Encodes a string buffer into the given buffer. More...
 
void encode_str16 (uint8_t **bufp, const char *str)
 Encodes a c-style null-terminated string into the given buffer. More...
 
template<class StringT >
void encode_str16 (uint8_t **bufp, const StringT &str)
 Encodes a string into the given buffer. More...
 
const char * decode_str16 (const uint8_t **bufp, size_t *remainp)
 Decodes a c-style string from the given buffer. More...
 
char * decode_str16 (const uint8_t **bufp, size_t *remainp, uint16_t *lenp)
 Decodes a c-style string from the given buffer. More...
 
size_t encoded_length_vstr (size_t len)
 Computes the encoded length of vstr (vint64, data, null) More...
 
size_t encoded_length_vstr (const char *s)
 Computes the encoded length of vstr. More...
 
size_t encoded_length_vstr (const String &s)
 Computes the encoded length of vstr. More...
 
void encode_vstr (uint8_t **bufp, const void *buf, size_t len)
 Encode a buffer as variable length string (vint64, data, null) More...
 
void encode_vstr (uint8_t **bufp, const char *s)
 Encode a c-style string as vstr. More...
 
template<class StringT >
void encode_vstr (uint8_t **bufp, const StringT &s)
 Encode a String as vstr. More...
 
char * decode_vstr (const uint8_t **bufp, size_t *remainp)
 Decode a vstr (vint64, data, null). More...
 
char * decode_vstr (const uint8_t **bufp, size_t *remainp, uint32_t *lenp)
 Decode a vstr (vint64, data, null) More...
 
void encode_inet_addr (uint8_t **bufp, const InetAddr &addr)
 Encode an InetAddr structure. More...
 
InetAddr decode_inet_addr (const uint8_t **bufp, size_t *remainp)
 Decode an InetAddr structure. More...
 
void encode_double (uint8_t **bufp, double val)
 Encodes a double with 18 decimal digits of precision as 64-bit left-of-decimal, followed by 64-bit right-of-decimal, both in little-endian order. More...
 
double decode_double (const uint8_t **bufp, size_t *remainp)
 Decodes a double as 64-bit left-of-decimal, followed by 64-bit right-of-decimal, both in little-endian order. More...
 
int encoded_length_double ()
 Length of an encoded double (16 bytes) More...
 
bool equal (double a, double b)
 Compare doubles that may have been serialized and unserialized. More...