|
ivutils
|
Packer optimized to pack groups of data. More...
#include <seqpack.h>


Classes | |
| class | iterator |
| total number of packed elements More... | |
Public Member Functions | |
| template<class packer_t > | |
| int | aux_depends_on (const packer_t &other) |
| this allows to share auxiliary data with other packer THE PACKERS MUST BE SYNCRONIZED EXTERNALLY: next_group must be called in sync with parent packer USE WITH CARE | |
| template<class rec_it > | |
| index_t | next_group (rec_it beg, index_t n=1) |
| put a group of n elements starting from beg packing the group with 0 elements will lead to the following behaviour when unpacked: get_group_count(it) will return 0, *it will return the next recorded element (if it exists) then after ++it, *it will return the same element, but get_group_count(it) will return the next group count THE ELEMENTS POINTED BY BEG WILL NOT BE RECORDED WHEN n=0 DO NOT USE *it if get_group_count(it) returns 0! | |
| std::size_t | packed_size () const |
| returns the size in bytes ignoring vector overheads | |
| std::size_t | data_size () const |
| returns full unpacked sequence size in bytes | |
Public Member Functions inherited from data_pack< T, comp_pr, set_t, index_t > | |
| template<class rec_it > | |
| index_t | next_group (rec_it beg, index_t n=1) |
| put a group of n elements starting with beg | |
| std::size_t | packed_size () const |
| returns the size in bytes ignoring vector overheads | |
| std::size_t | data_size () const |
| returns full unpacked sequence size in bytes | |
Protected Attributes | |
| mngptr< index_pack< index_t > > | npack |
| packer of number of elements in each packed group. | |
| index_pack< index_t > | ipack |
| container for unique values of packed data | |
Protected Attributes inherited from data_pack< T, comp_pr, set_t, index_t > | |
| index_pack< index_t > | ipack |
| container for unique values of packed data | |
Packer optimized to pack groups of data.
set_t can be container_set (vector_set or list_set). The comparison predicate is of type comp_pr which must have bool opertor()(const T&,const T&) returning true for duplicated sequences
|
protected |
packer of number of elements in each packed group.
this reference can be shared with some other group_pack