45 HT_TRY(
"decoding dir entry",
char * decode_vstr(const uint8_t **bufp, size_t *remainp)
Decode a vstr (vint64, data, null).
DirEntry & decode_dir_entry(const uint8_t **bufp, size_t *remainp, DirEntry &dir_entry)
Decodes (unserializes) a directory entry from a buffer.
size_t encoded_length_vstr(size_t len)
Computes the encoded length of vstr (vint64, data, null)
bool decode_bool(const uint8_t **bufp, size_t *remainp)
Decodes a boolean value from the given buffer.
Logging routines and macros.
Compatibility Macros for C/C++.
Functions to serialize/deserialize primitives to/from a memory buffer.
void encode_dir_entry(uint8_t **bufp, const DirEntry &dir_entry)
Encodes (serializes) the given directory entry to a 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.
bool is_dir
Boolean value indicating whether or not this entry is a directory.
size_t encoded_length_dir_entry(const DirEntry &dir_entry)
Returns the number of bytes required to encode (serialize) the given directory entry.
#define HT_TRY(_s_, _code_)
std::string name
Directory entry name.