Akumuli
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends
Public Member Functions | Public Attributes | List of all members
Akumuli::Base128StreamWriter Struct Reference

Base128 encoder. More...

#include <compression.h>

Public Member Functions

 Base128StreamWriter (unsigned char *begin, const unsigned char *end)
 
 Base128StreamWriter (Base128StreamWriter &other)
 
template<class TVal >
bool tput (TVal const *iter, size_t n)
 
template<class TVal >
bool put (TVal value)
 
template<class TVal >
bool put_raw (TVal value)
 
bool commit ()
 Commit stream.
 
size_t size () const
 
size_t space_left () const
 
template<class T >
T * allocate ()
 

Public Attributes

const unsigned char * begin_
 
const unsigned char * end_
 
unsigned char * pos_
 

Detailed Description

Base128 encoder.

Member Function Documentation

template<class T >
T* Akumuli::Base128StreamWriter::allocate ( )
inline

Try to allocate space inside a stream in current position without compression (needed for size prefixes).

Returns
pointer to the value inside the stream or nullptr
template<class TVal >
bool Akumuli::Base128StreamWriter::put ( TVal  value)
inline

Put value into stream.

template<class TVal >
bool Akumuli::Base128StreamWriter::tput ( TVal const *  iter,
size_t  n 
)
inline

Put value into stream (transactional).


The documentation for this struct was generated from the following file: