61 const uint8_t *msg_ptr = input.
base;
62 size_t remaining = input.
fill();
64 header.
decode(&msg_ptr, &remaining);
68 "header zlength = %lu, actual = %lu",
74 "checksum mismatch header=%lx, computed=%lx",
uint8_t * ptr
Pointer to the end of the used part of the buffer.
A dynamic, resizable and reference counted memory buffer.
uint32_t fletcher32(const void *data8, size_t len8)
Compute fletcher32 checksum for arbitary data.
A dynamic, resizable memory buffer.
Logging routines and macros.
Compatibility Macros for C/C++.
virtual void deflate(const DynamicBuffer &input, DynamicBuffer &output, BlockHeader &header, size_t reserve=0)
Transforms a buffer into a serialized block using no compression.
Implementation of checksum routines.
void clear()
Clears the buffer.
Declarations for BlockCompressionCodecNone.
virtual void inflate(const DynamicBuffer &input, DynamicBuffer &output, BlockHeader &header)
Deserializes a block produced by deflate().
#define HT_THROWF(_code_, _fmt_,...)
uint8_t * base
Pointer to the allocated memory buffer.
size_t fill() const
Returns the size of the used portion.
long unsigned int Lu
Shortcut for printf formats.
Error codes, Exception handling, error logging.
void reserve(size_t len, bool nocopy=false)
Reserve space for additional data Will grow the space to exactly what's needed.