42 snappy::RawCompress((
const char *)input.
base, input.
fill(),
48 if (outlen >= input.
fill()) {
72 const uint8_t *msg_ptr = input.
base;
73 size_t remaining = input.
fill();
75 header.
decode(&msg_ptr, &remaining);
79 "header zlength = %lu, actual = %lu",
86 "checksum mismatch header=%lx, computed=%lx",
96 if (!snappy::RawUncompress((
const char *)msg_ptr,
99 "Compressed block inflate error");
void free()
Frees resources.
uint8_t * ptr
Pointer to the end of the used part of the buffer.
Declarations for BlockCompressionCodecSnappy.
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.
uint32_t size
The size of the allocated memory buffer (base)
Logging routines and macros.
Compatibility Macros for C/C++.
virtual void inflate(const DynamicBuffer &input, DynamicBuffer &output, BlockHeader &header)
Decompresses a buffer compressed with the SNAPPY algorithm.
Implementation of checksum routines.
virtual void deflate(const DynamicBuffer &input, DynamicBuffer &output, BlockHeader &header, size_t reserve=0)
Compresses a buffer using the SNAPPY algorithm.
#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.
This is a generic exception class for Hypertable.
long unsigned int Lu
Shortcut for printf formats.
void reserve(size_t len, bool nocopy=false)
Reserve space for additional data Will grow the space to exactly what's needed.