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

Static Public Member Functions

static aku_Status encode_chunk (uint32_t *n_elements, aku_Timestamp *ts_begin, aku_Timestamp *ts_end, ChunkWriter *writer, const UncompressedChunk &data)
 
static aku_Status decode_chunk (UncompressedChunk *header, const unsigned char *pbegin, const unsigned char *pend, uint32_t nelements)
 Decode part of the ChunkHeader structure depending on stage and steps values. First goes list of timestamps, then all other values. More...
 
static size_t compress_doubles (const std::vector< double > &input, Base128StreamWriter &wstream)
 
static void decompress_doubles (Base128StreamReader &rstream, size_t numvalues, std::vector< double > *output)
 
static bool convert_from_chunk_order (const UncompressedChunk &header, UncompressedChunk *out)
 
static bool convert_from_time_order (const UncompressedChunk &header, UncompressedChunk *out)
 

Member Function Documentation

size_t Akumuli::CompressionUtil::compress_doubles ( const std::vector< double > &  input,
Base128StreamWriter wstream 
)
static

Compress list of doubles.

Parameters
inputarray of doubles
paramsarray of parameter ids
bufferresulting byte array
bool Akumuli::CompressionUtil::convert_from_chunk_order ( const UncompressedChunk header,
UncompressedChunk out 
)
static

Convert from chunk order to time order.

Note
in chunk order all data elements ordered by series id first and then by timestamp, in time order everythin ordered by time first and by id second.
bool Akumuli::CompressionUtil::convert_from_time_order ( const UncompressedChunk header,
UncompressedChunk out 
)
static

Convert from time order to chunk order.

Note
in chunk order all data elements ordered by series id first and then by timestamp, in time order everythin ordered by time first and by id second.
aku_Status Akumuli::CompressionUtil::decode_chunk ( UncompressedChunk header,
const unsigned char *  pbegin,
const unsigned char *  pend,
uint32_t  nelements 
)
static

Decode part of the ChunkHeader structure depending on stage and steps values. First goes list of timestamps, then all other values.

Decompress ChunkHeader.

Parameters
headerout header
pbeginin - begining of the data, out - new begining of the data
endend of the data
stagecurrent stage
stepsnumber of stages to do
probe_lengthnumber of elements in header
Returns
current stage number
void Akumuli::CompressionUtil::decompress_doubles ( Base128StreamReader rstream,
size_t  numvalues,
std::vector< double > *  output 
)
static

Decompress list of doubles.

Parameters
bufferinput data
numbloksnumber of 4bit blocs inside buffer
paramslist of parameter ids
outputresulting array
aku_Status Akumuli::CompressionUtil::encode_chunk ( uint32_t *  n_elements,
aku_Timestamp *  ts_begin,
aku_Timestamp *  ts_end,
ChunkWriter writer,
const UncompressedChunk data 
)
static

Compress and write ChunkHeader to memory stream.

Parameters
n_elementsout parameter - number of written elements
ts_beginout parameter - first timestamp
ts_endout parameter - last timestamp
dataChunkHeader to compress

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