16 #ifndef IMPALA_UTIL_BIT_STREAM_UTILS_H
17 #define IMPALA_UTIL_BIT_STREAM_UTILS_H
19 #include <boost/cstdint.hpp>
75 void Flush(
bool align=
false);
bool GetAligned(int num_bytes, T *v)
bool PutValue(uint64_t v, int num_bits)
uint64_t buffered_values_
uint64_t buffered_values_
int bytes_written() const
BitWriter(uint8_t *buffer, int buffer_len)
uint8_t * GetNextBytePtr(int num_bytes=1)
bool PutAligned(T v, int num_bytes)
bool GetVlqInt(int32_t *v)
void Flush(bool align=false)
static int Ceil(int value, int divisor)
Returns the ceil of value/divisor.
bool PutVlqInt(int32_t v)
BitReader(uint8_t *buffer, int buffer_len)
'buffer' is the buffer to read from. The buffer's length is 'buffer_len'.
static const int MAX_VLQ_BYTE_LEN
Maximum byte length of a vlq encoded int.
bool GetValue(int num_bits, T *v)