58 uint32_t attr_val_len;
65 buffer.
size = attr_val_len+1;
69 uint32_t sub_entries_count =
decode_i32(bufp, remainp);
72 while (sub_entries_count--) {
char * decode_vstr(const uint8_t **bufp, size_t *remainp)
Decode a vstr (vint64, data, null).
size_t encoded_length_vstr(size_t len)
Computes the encoded length of vstr (vint64, data, null)
uint8_t * ptr
Pointer to the end of the used part of the buffer.
A dynamic, resizable and reference counted memory buffer.
uint32_t decode_i32(const uint8_t **bufp, size_t *remainp)
Decode a 32-bit integer in little-endian order.
A dynamic, resizable memory buffer.
bool decode_bool(const uint8_t **bufp, size_t *remainp)
Decodes a boolean value from the given buffer.
bool has_attr
Boolean value indicating whether or not this entry is a directory.
void encode_dir_entry_attr(uint8_t **bufp, const DirEntryAttr &entry)
Encodes (serializes) the given directory entry to a buffer.
uint32_t size
The size of the allocated memory buffer (base)
Logging routines and macros.
void encode_i32(uint8_t **bufp, uint32_t val)
Encode a 32-bit integer in little-endian order.
Compatibility Macros for C/C++.
Functions to serialize/deserialize primitives to/from a memory buffer.
void encode_vstr(uint8_t **bufp, const void *buf, size_t len)
Encode a buffer as variable length string (vint64, data, null)
void encode_bool(uint8_t **bufp, bool bval)
Encodes a boolean into the given buffer.
DirEntryAttr & decode_dir_entry_attr(const uint8_t **bufp, size_t *remainp, DirEntryAttr &entry)
Decodes (unserializes) a directory entry from a buffer.
uint8_t * decode_bytes32(const uint8_t **bufp, size_t *remainp, uint32_t *lenp)
Decodes a variable sized byte array from the given buffer.
This is a generic exception class for Hypertable.
void encode_bytes32(uint8_t **bufp, const void *data, int32_t len)
Encodes a variable sized byte array into the given buffer.
uint8_t * add_unchecked(const void *data, size_t len)
Adds additional data without boundary checks.
std::vector< DirEntryAttr > sub_entries
int code() const
Returns the error code.
#define HT_THROW2(_code_, _ex_, _msg_)
size_t encoded_length_dir_entry_attr(const DirEntryAttr &entry)
Returns the number of bytes required to encode (serialize) the given directory entry.