BitMagic-C++: bm::serial_stream_iterator< DEC, BLOCK_IDX > Class Template Reference

BitMagic-C++

Public Types | Public Member Functions | Protected Attributes
bm::serial_stream_iterator< DEC, BLOCK_IDX > Class Template Reference
BitMagic Library » bvector<> container » bvector<> serialization

Serialization stream iterator. More...

`#include <bmserial.h>`

Inheritance diagram for bm::serial_stream_iterator< DEC, BLOCK_IDX >:
[legend]
Collaboration diagram for bm::serial_stream_iterator< DEC, BLOCK_IDX >:
[legend]

## Public Types
enum | iterator_state { e_unknown = 0, e_list_ids, e_blocks, e_zero_blocks, e_one_blocks, e_bit_block, e_gap_block }
| iterator is a state machine, this enum encodes its key value More...
typedef deseriaizer_base< DEC, BLOCK_IDX >::decoder_type | decoder_type
typedef BLOCK_IDX | block_idx_type
typedef deseriaizer_base< DEC, block_idx_type > | parent_type
typedef unsigned(serial_stream_iterator< DEC, BLOCK_IDX >::* | get_bit_func_type) (bm::word_t *, bm::word_t *)
| member function pointer for bitset-bitset get operations More...

## Public Member Functions
| serial_stream_iterator (const unsigned char *buf)
| ~serial_stream_iterator ()
block_idx_type | bv_size () const
| serialized bitvector size More...
bool | is_eof () const
| Returns true if end of bit-stream reached. More...
void | next ()
| get next block More...
block_idx_type | skip_mono_blocks () BMNOEXCEPT
| skip all zero or all-one blocks More...
unsigned | get_bit_block (bm::word_t *dst_block, bm::word_t *tmp_block, set_operation op)
| read bit block, using logical operation More...
void | get_gap_block (bm::gap_word_t *dst_block)
| Read gap block data (with head) More...
unsigned | dec_size () const
| Return current decoder size. More...
decoder_type & | decoder ()
| Get low level access to the decoder (use carefully) More...
iterator_state | state () const BMNOEXCEPT
| Returns iterator internal state. More...
iterator_state | get_state () const BMNOEXCEPT
unsigned | get_id_count () const BMNOEXCEPT
| Number of ids in the inverted list (valid for e_list_ids) More...
bm::id_t | get_id () const BMNOEXCEPT
| Get last id from the id list. More...
block_idx_type | block_idx () const BMNOEXCEPT
| Get current block index. More...
unsigned | get_bit_block_ASSIGN (bm::word_t *dst_block, bm::word_t *tmp_block)
unsigned | get_bit_block_OR (bm::word_t *dst_block, bm::word_t *tmp_block)
unsigned | get_bit_block_AND (bm::word_t *dst_block, bm::word_t *tmp_block)
unsigned | get_bit_block_SUB (bm::word_t *dst_block, bm::word_t *tmp_block)
unsigned | get_bit_block_XOR (bm::word_t *dst_block, bm::word_t *tmp_block)
unsigned | get_bit_block_COUNT (bm::word_t *dst_block, bm::word_t *tmp_block)
unsigned | get_bit_block_COUNT_AND (bm::word_t *dst_block, bm::word_t *tmp_block)
unsigned | get_bit_block_COUNT_OR (bm::word_t *dst_block, bm::word_t *tmp_block)
unsigned | get_bit_block_COUNT_XOR (bm::word_t *dst_block, bm::word_t *tmp_block)
unsigned | get_bit_block_COUNT_SUB_AB (bm::word_t *dst_block, bm::word_t *tmp_block)
unsigned | get_bit_block_COUNT_SUB_BA (bm::word_t *dst_block, bm::word_t *tmp_block)
unsigned | get_bit_block_COUNT_A (bm::word_t *dst_block, bm::word_t *tmp_block)
unsigned | get_bit_block_COUNT_B (bm::word_t *dst_block, bm::word_t *tmp_block)
unsigned | get_arr_bit (bm::word_t *dst_block, bool clear_target=true) BMNOEXCEPT
| Get array of bits out of the decoder into bit block (Converts inverted list into bits) Returns number of words (bits) being read. More...
unsigned | get_block_type () const BMNOEXCEPT
| Get current block type. More...
unsigned | get_bit () BMNOEXCEPT
void | get_inv_arr (bm::word_t *block) BMNOEXCEPT
bool | try_skip (block_idx_type nb, block_idx_type expect_nb) BMNOEXCEPT
| Try to skip if skip bookmark is available within reach. More...

## Protected Attributes
get_bit_func_type | bit_func_table_ [bm::set_END]
decoder_type | decoder_
bool | end_of_stream_
block_idx_type | bv_size_
iterator_state | state_
unsigned | id_cnt_
| Id counter for id list. More...
bm::id_t | last_id_
| Last id from the id list. More...
gap_word_t | glevels_ [bm::gap_levels]
| GAP levels. More...
unsigned | block_type_
| current block type More...
block_idx_type | block_idx_
| current block index More...
block_idx_type | mono_block_cnt_
| number of 0 or 1 blocks More...
gap_word_t | gap_head_
gap_word_t * | block_idx_arr_
Protected Attributes inherited from bm::deseriaizer_base< DEC, BLOCK_IDX >
bm::gap_word_t * | id_array_
| ptr to idx array for temp decode use More...
block_idx_type | bookmark_idx_
| last bookmark block index More...
unsigned | skip_offset_
| bookmark to skip 256 encoded blocks More...
const unsigned char * | skip_pos_
| decoder skip position More...

## Additional Inherited Members
Protected Types inherited from bm::deseriaizer_base< DEC, BLOCK_IDX >
typedef DEC | decoder_type
typedef BLOCK_IDX | block_idx_type
typedef bm::bit_in< DEC > | bit_in_type
Protected Member Functions inherited from bm::deseriaizer_base< DEC, BLOCK_IDX >
| deseriaizer_base ()
void | read_gap_block (decoder_type &decoder, unsigned block_type, bm::gap_word_t *dst_block, bm::gap_word_t &gap_head)
| Read GAP block from the stream. More...
unsigned | read_id_list (decoder_type &decoder, unsigned block_type, bm::gap_word_t *dst_arr)
| Read list of bit ids. More...
void | read_bic_arr (decoder_type &decoder, bm::word_t *blk) BMNOEXCEPT
| Read binary interpolated list into a bit-set. More...
void | read_bic_gap (decoder_type &decoder, bm::word_t *blk) BMNOEXCEPT
| Read binary interpolated gap blocks into a bitset. More...
void | read_bic_arr_inv (decoder_type &decoder, bm::word_t *blk) BMNOEXCEPT
| Read inverted binary interpolated list into a bit-set. More...
void | read_digest0_block (decoder_type &decoder, bm::word_t *blk) BMNOEXCEPT
| Read digest0-type bit-block. More...
block_idx_type | try_skip (decoder_type &decoder, block_idx_type nb, block_idx_type expect_nb) BMNOEXCEPT
| Try to skip if skip bookmark is available within reach. More...
Static Protected Member Functions inherited from bm::deseriaizer_base< DEC, BLOCK_IDX >
static void | read_0runs_block (decoder_type &decoder, bm::word_t *blk) BMNOEXCEPT
| read bit-block encoded as runs More...
static const char * | err_msg () BMNOEXCEPT

## Detailed Description

### template<class DEC, typename BLOCK_IDX>
class bm::serial_stream_iterator< DEC, BLOCK_IDX >

Serialization stream iterator.

Iterates blocks and control tokens of serialized bit-stream

Definition at line 667 of file bmserial.h.

## Member Typedef Documentation

## ◆ block_idx_type

template<class DEC , typename BLOCK_IDX >

typedef BLOCK_IDX bm::serial_stream_iterator< DEC, BLOCK_IDX >::block_idx_type

Definition at line 671 of file bmserial.h.

## ◆ decoder_type

template<class DEC , typename BLOCK_IDX >

typedef deseriaizer_base<DEC, BLOCK_IDX>::decoder_type bm::serial_stream_iterator< DEC, BLOCK_IDX >::decoder_type

Definition at line 670 of file bmserial.h.

## ◆ get_bit_func_type

template<class DEC , typename BLOCK_IDX >

typedef unsigned(serial_stream_iterator<DEC, BLOCK_IDX>::* bm::serial_stream_iterator< DEC, BLOCK_IDX >::get_bit_func_type) (bm::word_t *, bm::word_t *)

member function pointer for bitset-bitset get operations

Definition at line 738 of file bmserial.h.

## ◆ parent_type

template<class DEC , typename BLOCK_IDX >

typedef deseriaizer_base<DEC, block_idx_type> bm::serial_stream_iterator< DEC, BLOCK_IDX >::parent_type

Definition at line 672 of file bmserial.h.

## Member Enumeration Documentation

## ◆ iterator_state

template<class DEC , typename BLOCK_IDX >

enum bm::serial_stream_iterator::iterator_state

iterator is a state machine, this enum encodes its key value

Enumerator
e_unknown |
e_list_ids | plain int array
e_blocks | stream of blocks
e_zero_blocks | one or more zero bit blocks
e_one_blocks | one or more all-1 bit blocks
e_bit_block | one bit block
e_gap_block | one gap block

Definition at line 708 of file bmserial.h.

## Constructor & Destructor Documentation

## ◆ serial_stream_iterator()

template<typename DEC , typename BLOCK_IDX >

bm::serial_stream_iterator< DEC, BLOCK_IDX >::serial_stream_iterator | ( | const unsigned char * | buf | ) |

Definition at line 4025 of file bmserial.h.

References bm::serial_stream_iterator< DEC, BLOCK_IDX >::bit_func_table_, bm::serial_stream_iterator< DEC, BLOCK_IDX >::block_idx_arr_, BM_ASSERT, bm::BM_HM_64_BIT, bm::BM_HM_ID_LIST, bm::BM_HM_NO_BO, bm::BM_HM_NO_GAPL, bm::BM_HM_RESIZE, bm::serial_stream_iterator< DEC, BLOCK_IDX >::bv_size_, bm::serial_stream_iterator< DEC, BLOCK_IDX >::decoder_, bm::serial_stream_iterator< DEC, BLOCK_IDX >::e_blocks, bm::serial_stream_iterator< DEC, BLOCK_IDX >::e_list_ids, bm::gap_levels, bm::gap_max_bits, bm::serial_stream_iterator< DEC, BLOCK_IDX >::glevels_, bm::deseriaizer_base< DEC, BLOCK_IDX >::id_array_, bm::serial_stream_iterator< DEC, BLOCK_IDX >::id_cnt_, bm::serial_stream_iterator< DEC, BLOCK_IDX >::next(), bm::set_AND, bm::set_ASSIGN, bm::set_COUNT, bm::set_COUNT_A, bm::set_COUNT_AND, bm::set_COUNT_B, bm::set_COUNT_OR, bm::set_COUNT_SUB_AB, bm::set_COUNT_SUB_BA, bm::set_COUNT_XOR, bm::set_OR, bm::set_SUB, bm::set_XOR, and bm::serial_stream_iterator< DEC, BLOCK_IDX >::state_.

## ◆ ~serial_stream_iterator()

template<typename DEC , typename BLOCK_IDX >

bm::serial_stream_iterator< DEC, BLOCK_IDX >::~serial_stream_iterator

Definition at line 4125 of file bmserial.h.

## Member Function Documentation

## ◆ block_idx()

template<class DEC , typename BLOCK_IDX >

block_idx_type bm::serial_stream_iterator< DEC, BLOCK_IDX >::block_idx | ( |  | ) | const
| inline

Get current block index.

Definition at line 731 of file bmserial.h.

References bm::serial_stream_iterator< DEC, BLOCK_IDX >::block_idx_.

Referenced by bm::iterator_deserializer< BV, bm::serial_stream_iterator >::deserialize().

## ◆ bv_size()

template<class DEC , typename BLOCK_IDX >

block_idx_type bm::serial_stream_iterator< DEC, BLOCK_IDX >::bv_size | ( |  | ) | const
| inline

serialized bitvector size

Definition at line 679 of file bmserial.h.

References bm::serial_stream_iterator< DEC, BLOCK_IDX >::bv_size_.

Referenced by bm::iterator_deserializer< BV, bm::serial_stream_iterator >::deserialize().

## ◆ dec_size()

template<class DEC , typename BLOCK_IDX >

unsigned bm::serial_stream_iterator< DEC, BLOCK_IDX >::dec_size | ( |  | ) | const
| inline

Return current decoder size.

Definition at line 700 of file bmserial.h.

References bm::serial_stream_iterator< DEC, BLOCK_IDX >::decoder_.

## ◆ decoder()

template<class DEC , typename BLOCK_IDX >

decoder_type& bm::serial_stream_iterator< DEC, BLOCK_IDX >::decoder | ( |  | ) |
| inline

Get low level access to the decoder (use carefully)

Definition at line 703 of file bmserial.h.

References bm::serial_stream_iterator< DEC, BLOCK_IDX >::decoder_.

## ◆ get_arr_bit()

template<typename DEC , typename BLOCK_IDX >

unsigned bm::serial_stream_iterator< DEC, BLOCK_IDX >::get_arr_bit | ( | bm::word_t * | dst_block,
|  | bool | clear_target = `true`
| ) |  |

Get array of bits out of the decoder into bit block (Converts inverted list into bits) Returns number of words (bits) being read.

Definition at line 5541 of file bmserial.h.

References bm::bit_block_set(), BM_ASSERT, bm::set_bit(), bm::set_block_arrbit, and bm::set_block_bit_1bit.

## ◆ get_bit()

template<typename DEC , typename BLOCK_IDX >

unsigned bm::serial_stream_iterator< DEC, BLOCK_IDX >::get_bit

Definition at line 5579 of file bmserial.h.

References BM_ASSERT, and bm::set_block_bit_1bit.

## ◆ get_bit_block()

template<typename DEC , typename BLOCK_IDX >

unsigned bm::serial_stream_iterator< DEC, BLOCK_IDX >::get_bit_block | ( | bm::word_t * | dst_block,
|  | bm::word_t * | tmp_block,
|  | set_operation | op
| ) |  |

read bit block, using logical operation

Definition at line 5608 of file bmserial.h.

References BM_ASSERT.

Referenced by bm::iterator_deserializer< BV, bm::serial_stream_iterator >::deserialize().

## ◆ get_bit_block_AND()

template<class DEC , typename BLOCK_IDX >

unsigned bm::serial_stream_iterator< DEC, BLOCK_IDX >::get_bit_block_AND | ( | bm::word_t * | dst_block,
|  | bm::word_t * | tmp_block
| ) |  |

Definition at line 4569 of file bmserial.h.

References bm::bit_block_and(), bm::bit_block_set(), BM_ASSERT, IS_VALID_ADDR, bm::set_block_arr_bienc, bm::set_block_arr_bienc_inv, bm::set_block_arrbit, bm::set_block_arrbit_inv, bm::set_block_bit, bm::set_block_bit_0runs, bm::set_block_bit_1bit, bm::set_block_bit_digest0, bm::set_block_bit_interval, bm::set_block_bitgap_bienc, and bm::set_block_size.

## ◆ get_bit_block_ASSIGN()

template<typename DEC , typename BLOCK_IDX >

unsigned bm::serial_stream_iterator< DEC, BLOCK_IDX >::get_bit_block_ASSIGN | ( | bm::word_t * | dst_block,
|  | bm::word_t * | tmp_block
| ) |  |

Definition at line 4395 of file bmserial.h.

References bm::bit_block_copy(), bm::bit_block_set(), BM_ASSERT, IS_VALID_ADDR, bm::set_block_arr_bienc, bm::set_block_arr_bienc_inv, bm::set_block_arrbit, bm::set_block_arrbit_inv, bm::set_block_bit, bm::set_block_bit_0runs, bm::set_block_bit_1bit, bm::set_block_bit_digest0, bm::set_block_bit_interval, bm::set_block_bitgap_bienc, bm::set_block_gapbit, and bm::set_block_size.

## ◆ get_bit_block_COUNT()

template<typename DEC , typename BLOCK_IDX >

unsigned bm::serial_stream_iterator< DEC, BLOCK_IDX >::get_bit_block_COUNT | ( | bm::word_t * | dst_block,
|  | bm::word_t * | tmp_block
| ) |  |

Definition at line 4890 of file bmserial.h.

References bm::bit_block_count(), bm::bit_block_set(), BM_ASSERT, bm::set_block_arr_bienc, bm::set_block_arr_bienc_inv, bm::set_block_arrbit, bm::set_block_arrbit_inv, bm::set_block_bit, bm::set_block_bit_0runs, bm::set_block_bit_1bit, bm::set_block_bit_digest0, bm::set_block_bit_interval, bm::set_block_bitgap_bienc, bm::set_block_size, and bm::word_bitcount().

Referenced by bm::serial_stream_iterator< DEC, BLOCK_IDX >::get_bit_block_COUNT_B().

## ◆ get_bit_block_COUNT_A()

template<typename DEC , typename BLOCK_IDX >

unsigned bm::serial_stream_iterator< DEC, BLOCK_IDX >::get_bit_block_COUNT_A | ( | bm::word_t * | dst_block,
|  | bm::word_t * | tmp_block
| ) |  |

Definition at line 4974 of file bmserial.h.

References bm::bit_block_count(), BM_ASSERT, bm::set_block_arr_bienc, bm::set_block_arr_bienc_inv, bm::set_block_arrbit, bm::set_block_arrbit_inv, bm::set_block_bit, bm::set_block_bit_0runs, bm::set_block_bit_1bit, bm::set_block_bit_digest0, bm::set_block_bit_interval, bm::set_block_bitgap_bienc, and bm::set_block_size.

## ◆ get_bit_block_COUNT_AND()

template<typename DEC , typename BLOCK_IDX >

unsigned bm::serial_stream_iterator< DEC, BLOCK_IDX >::get_bit_block_COUNT_AND | ( | bm::word_t * | dst_block,
|  | bm::word_t * | tmp_block
| ) |  |

Definition at line 5057 of file bmserial.h.

References bm::bit_block_set(), bm::bit_operation_and_count(), BM_ASSERT, bm::set_block_arr_bienc, bm::set_block_arr_bienc_inv, bm::set_block_arrbit, bm::set_block_arrbit_inv, bm::set_block_bit, bm::set_block_bit_0runs, bm::set_block_bit_1bit, bm::set_block_bit_digest0, bm::set_block_bit_interval, bm::set_block_bitgap_bienc, bm::set_block_size, and bm::word_bitcount().

## ◆ get_bit_block_COUNT_B()

template<class DEC , typename BLOCK_IDX >

unsigned bm::serial_stream_iterator< DEC, BLOCK_IDX >::get_bit_block_COUNT_B | ( | bm::word_t * | dst_block,
|  | bm::word_t * | tmp_block
| ) |  |
| inline

Definition at line 765 of file bmserial.h.

References bm::serial_stream_iterator< DEC, BLOCK_IDX >::get_bit_block_COUNT().

## ◆ get_bit_block_COUNT_OR()

template<typename DEC , typename BLOCK_IDX >

unsigned bm::serial_stream_iterator< DEC, BLOCK_IDX >::get_bit_block_COUNT_OR | ( | bm::word_t * | dst_block,
|  | bm::word_t * | tmp_block
| ) |  |

Definition at line 5142 of file bmserial.h.

References bm::bit_block_set(), bm::bit_operation_or_count(), bm::bit_recomb(), BM_ASSERT, bm::set_block_arr_bienc, bm::set_block_arr_bienc_inv, bm::set_block_arrbit, bm::set_block_arrbit_inv, bm::set_block_bit, bm::set_block_bit_0runs, bm::set_block_bit_1bit, bm::set_block_bit_digest0, bm::set_block_bit_interval, bm::set_block_bitgap_bienc, bm::set_block_size, bm::bitblock_sum_adapter::sum(), and bm::word_bitcount().

## ◆ get_bit_block_COUNT_SUB_AB()

template<typename DEC , typename BLOCK_IDX >

unsigned bm::serial_stream_iterator< DEC, BLOCK_IDX >::get_bit_block_COUNT_SUB_AB | ( | bm::word_t * | dst_block,
|  | bm::word_t * | tmp_block
| ) |  |

Definition at line 5345 of file bmserial.h.

References bm::bit_block_set(), bm::bit_operation_sub_count(), bm::bit_recomb(), BM_ASSERT, bm::set_block_arr_bienc, bm::set_block_arr_bienc_inv, bm::set_block_arrbit, bm::set_block_arrbit_inv, bm::set_block_bit, bm::set_block_bit_0runs, bm::set_block_bit_1bit, bm::set_block_bit_digest0, bm::set_block_bit_interval, bm::set_block_bitgap_bienc, bm::set_block_size, bm::bitblock_sum_adapter::sum(), and bm::word_bitcount().

## ◆ get_bit_block_COUNT_SUB_BA()

template<typename DEC , typename BLOCK_IDX >

unsigned bm::serial_stream_iterator< DEC, BLOCK_IDX >::get_bit_block_COUNT_SUB_BA | ( | bm::word_t * | dst_block,
|  | bm::word_t * | tmp_block
| ) |  |

Definition at line 5447 of file bmserial.h.

References bm::bit_block_set(), bm::bit_operation_sub_count(), bm::bit_recomb(), BM_ASSERT, bm::set_block_arr_bienc, bm::set_block_arr_bienc_inv, bm::set_block_arrbit, bm::set_block_arrbit_inv, bm::set_block_bit, bm::set_block_bit_0runs, bm::set_block_bit_1bit, bm::set_block_bit_digest0, bm::set_block_bit_interval, bm::set_block_bitgap_bienc, bm::set_block_size, bm::bitblock_sum_adapter::sum(), and bm::word_bitcount().

## ◆ get_bit_block_COUNT_XOR()

template<typename DEC , typename BLOCK_IDX >

unsigned bm::serial_stream_iterator< DEC, BLOCK_IDX >::get_bit_block_COUNT_XOR | ( | bm::word_t * | dst_block,
|  | bm::word_t * | tmp_block
| ) |  |

Definition at line 5243 of file bmserial.h.

References bm::bit_block_set(), bm::bit_operation_xor_count(), bm::bit_recomb(), BM_ASSERT, bm::set_block_arr_bienc, bm::set_block_arr_bienc_inv, bm::set_block_arrbit, bm::set_block_arrbit_inv, bm::set_block_bit, bm::set_block_bit_0runs, bm::set_block_bit_1bit, bm::set_block_bit_digest0, bm::set_block_bit_interval, bm::set_block_bitgap_bienc, bm::set_block_size, bm::bitblock_sum_adapter::sum(), and bm::word_bitcount().

## ◆ get_bit_block_OR()

template<typename DEC , typename BLOCK_IDX >

unsigned bm::serial_stream_iterator< DEC, BLOCK_IDX >::get_bit_block_OR | ( | bm::word_t * | dst_block,
|  | bm::word_t * | tmp_block
| ) |  |

Definition at line 4494 of file bmserial.h.

References bm::bit_block_or(), BM_ASSERT, bm::set_block_arr_bienc, bm::set_block_arr_bienc_inv, bm::set_block_arrbit, bm::set_block_arrbit_inv, bm::set_block_bit, bm::set_block_bit_0runs, bm::set_block_bit_1bit, bm::set_block_bit_digest0, bm::set_block_bit_interval, bm::set_block_bitgap_bienc, and bm::set_block_size.

## ◆ get_bit_block_SUB()

template<typename DEC , typename BLOCK_IDX >

unsigned bm::serial_stream_iterator< DEC, BLOCK_IDX >::get_bit_block_SUB | ( | bm::word_t * | dst_block,
|  | bm::word_t * | tmp_block
| ) |  |

Definition at line 4787 of file bmserial.h.

References bm::bit_block_set(), bm::bit_block_sub(), BM_ASSERT, IS_VALID_ADDR, bm::set_block_arr_bienc, bm::set_block_arr_bienc_inv, bm::set_block_arrbit, bm::set_block_arrbit_inv, bm::set_block_bit, bm::set_block_bit_0runs, bm::set_block_bit_1bit, bm::set_block_bit_digest0, bm::set_block_bit_interval, bm::set_block_bitgap_bienc, and bm::set_block_size.

## ◆ get_bit_block_XOR()

template<typename DEC , typename BLOCK_IDX >

unsigned bm::serial_stream_iterator< DEC, BLOCK_IDX >::get_bit_block_XOR | ( | bm::word_t * | dst_block,
|  | bm::word_t * | tmp_block
| ) |  |

Definition at line 4682 of file bmserial.h.

References bm::bit_block_set(), bm::bit_block_xor(), BM_ASSERT, IS_VALID_ADDR, bm::set_block_arr_bienc, bm::set_block_arr_bienc_inv, bm::set_block_arrbit, bm::set_block_arrbit_inv, bm::set_block_bit, bm::set_block_bit_0runs, bm::set_block_bit_1bit, bm::set_block_bit_digest0, bm::set_block_bit_interval, bm::set_block_bitgap_bienc, and bm::set_block_size.

## ◆ get_block_type()

template<class DEC , typename BLOCK_IDX >

unsigned bm::serial_stream_iterator< DEC, BLOCK_IDX >::get_block_type | ( |  | ) | const
| inline

Get current block type.

Definition at line 777 of file bmserial.h.

References bm::serial_stream_iterator< DEC, BLOCK_IDX >::block_type_.

## ◆ get_gap_block()

template<typename DEC , typename BLOCK_IDX >

void bm::serial_stream_iterator< DEC, BLOCK_IDX >::get_gap_block | ( | bm::gap_word_t * | dst_block | ) |

Read gap block data (with head)

Definition at line 5590 of file bmserial.h.

References BM_ASSERT, and bm::set_block_bit_1bit.

Referenced by bm::iterator_deserializer< BV, bm::serial_stream_iterator >::deserialize().

## ◆ get_id()

template<class DEC , typename BLOCK_IDX >

bm::id_t bm::serial_stream_iterator< DEC, BLOCK_IDX >::get_id | ( |  | ) | const
| inline

Get last id from the id list.

Definition at line 728 of file bmserial.h.

References bm::serial_stream_iterator< DEC, BLOCK_IDX >::last_id_.

## ◆ get_id_count()

template<class DEC , typename BLOCK_IDX >

unsigned bm::serial_stream_iterator< DEC, BLOCK_IDX >::get_id_count | ( |  | ) | const
| inline

Number of ids in the inverted list (valid for e_list_ids)

Definition at line 725 of file bmserial.h.

References bm::serial_stream_iterator< DEC, BLOCK_IDX >::id_cnt_.

## ◆ get_inv_arr()

template<typename DEC , typename BLOCK_IDX >

void bm::serial_stream_iterator< DEC, BLOCK_IDX >::get_inv_arr | ( | bm::word_t * | block | ) |

Definition at line 4373 of file bmserial.h.

References bm::bit_block_set(), and bm::clear_bit().

## ◆ get_state()

template<class DEC , typename BLOCK_IDX >

iterator_state bm::serial_stream_iterator< DEC, BLOCK_IDX >::get_state | ( |  | ) | const
| inline

Definition at line 723 of file bmserial.h.

References bm::serial_stream_iterator< DEC, BLOCK_IDX >::state_.

Referenced by bm::iterator_deserializer< BV, bm::serial_stream_iterator >::deserialize().

## ◆ is_eof()

template<class DEC , typename BLOCK_IDX >

bool bm::serial_stream_iterator< DEC, BLOCK_IDX >::is_eof | ( |  | ) | const
| inline

Returns true if end of bit-stream reached.

Definition at line 682 of file bmserial.h.

References bm::serial_stream_iterator< DEC, BLOCK_IDX >::end_of_stream_.

Referenced by bm::iterator_deserializer< BV, bm::serial_stream_iterator >::deserialize().

## ◆ next()

template<typename DEC , typename BLOCK_IDX >

void bm::serial_stream_iterator< DEC, BLOCK_IDX >::next

get next block

Definition at line 4133 of file bmserial.h.

References BM_ASSERT, BM_FALLTHROUGH, bm::set_block_16one, bm::set_block_16zero, bm::set_block_1one, bm::set_block_1zero, bm::set_block_32one, bm::set_block_32zero, bm::set_block_64one, bm::set_block_8one, bm::set_block_8zero, bm::set_block_aone, bm::set_block_arr_bienc, bm::set_block_arr_bienc_inv, bm::set_block_arrbit, bm::set_block_arrbit_inv, bm::set_block_arrgap, bm::set_block_arrgap_bienc, bm::set_block_arrgap_bienc_inv, bm::set_block_arrgap_bienc_inv_v2, bm::set_block_arrgap_bienc_v2, bm::set_block_arrgap_egamma, bm::set_block_arrgap_egamma_inv, bm::set_block_arrgap_inv, bm::set_block_azero, bm::set_block_bit, bm::set_block_bit_0runs, bm::set_block_bit_1bit, bm::set_block_bit_digest0, bm::set_block_bit_interval, bm::set_block_bitgap_bienc, bm::set_block_end, bm::set_block_gap, bm::set_block_gap_bienc, bm::set_block_gap_bienc_v2, bm::set_block_gap_egamma, bm::set_block_gapbit, bm::set_block_ref_eq, bm::set_block_xor_ref16, bm::set_block_xor_ref32, bm::set_block_xor_ref8, bm::set_nb_bookmark16, bm::set_nb_bookmark24, bm::set_nb_bookmark32, bm::set_nb_sync_mark16, bm::set_nb_sync_mark24, bm::set_nb_sync_mark32, bm::set_nb_sync_mark48, bm::set_nb_sync_mark64, bm::set_nb_sync_mark8, and bm::set_total_blocks.

Referenced by bm::iterator_deserializer< BV, bm::serial_stream_iterator >::deserialize(), and bm::serial_stream_iterator< DEC, BLOCK_IDX >::serial_stream_iterator().

## ◆ skip_mono_blocks()

template<typename DEC , typename BLOCK_IDX >

serial_stream_iterator< DEC, BLOCK_IDX >::block_idx_type bm::serial_stream_iterator< DEC, BLOCK_IDX >::skip_mono_blocks

skip all zero or all-one blocks

Definition at line 4357 of file bmserial.h.

References BM_ASSERT.

Referenced by bm::iterator_deserializer< BV, bm::serial_stream_iterator >::deserialize().

## ◆ state()

template<class DEC , typename BLOCK_IDX >

iterator_state bm::serial_stream_iterator< DEC, BLOCK_IDX >::state | ( |  | ) | const
| inline

Returns iterator internal state.

Definition at line 721 of file bmserial.h.

References bm::serial_stream_iterator< DEC, BLOCK_IDX >::state_.

Referenced by bm::iterator_deserializer< BV, bm::serial_stream_iterator >::deserialize().

## ◆ try_skip()

template<class DEC , typename BLOCK_IDX >

bool bm::serial_stream_iterator< DEC, BLOCK_IDX >::try_skip | ( | block_idx_type | nb,
|  | block_idx_type | expect_nb
| ) |  |
| inline

Try to skip if skip bookmark is available within reach.

Returns
  true if skip went well

Definition at line 786 of file bmserial.h.

References bm::serial_stream_iterator< DEC, BLOCK_IDX >::block_idx_, bm::serial_stream_iterator< DEC, BLOCK_IDX >::decoder_, bm::serial_stream_iterator< DEC, BLOCK_IDX >::e_blocks, bm::serial_stream_iterator< DEC, BLOCK_IDX >::state_, and bm::deseriaizer_base< DEC, BLOCK_IDX >::try_skip().

Referenced by bm::iterator_deserializer< BV, bm::serial_stream_iterator >::deserialize().

## Field Documentation

## ◆ bit_func_table_

template<class DEC , typename BLOCK_IDX >

get_bit_func_type bm::serial_stream_iterator< DEC, BLOCK_IDX >::bit_func_table_[bm::set_END]
| protected

Definition at line 797 of file bmserial.h.

Referenced by bm::serial_stream_iterator< DEC, BLOCK_IDX >::serial_stream_iterator().

## ◆ block_idx_

template<class DEC , typename BLOCK_IDX >

block_idx_type bm::serial_stream_iterator< DEC, BLOCK_IDX >::block_idx_
| protected

current block index

Definition at line 808 of file bmserial.h.

Referenced by bm::serial_stream_iterator< DEC, BLOCK_IDX >::block_idx(), and bm::serial_stream_iterator< DEC, BLOCK_IDX >::try_skip().

## ◆ block_idx_arr_

template<class DEC , typename BLOCK_IDX >

gap_word_t* bm::serial_stream_iterator< DEC, BLOCK_IDX >::block_idx_arr_
| protected

Definition at line 812 of file bmserial.h.

Referenced by bm::serial_stream_iterator< DEC, BLOCK_IDX >::serial_stream_iterator().

## ◆ block_type_

template<class DEC , typename BLOCK_IDX >

unsigned bm::serial_stream_iterator< DEC, BLOCK_IDX >::block_type_
| protected

current block type

Definition at line 807 of file bmserial.h.

Referenced by bm::serial_stream_iterator< DEC, BLOCK_IDX >::get_block_type().

## ◆ bv_size_

template<class DEC , typename BLOCK_IDX >

block_idx_type bm::serial_stream_iterator< DEC, BLOCK_IDX >::bv_size_
| protected

Definition at line 801 of file bmserial.h.

Referenced by bm::serial_stream_iterator< DEC, BLOCK_IDX >::bv_size(), and bm::serial_stream_iterator< DEC, BLOCK_IDX >::serial_stream_iterator().

## ◆ decoder_

template<class DEC , typename BLOCK_IDX >

decoder_type bm::serial_stream_iterator< DEC, BLOCK_IDX >::decoder_
| protected

Definition at line 799 of file bmserial.h.

Referenced by bm::serial_stream_iterator< DEC, BLOCK_IDX >::dec_size(), bm::serial_stream_iterator< DEC, BLOCK_IDX >::decoder(), bm::serial_stream_iterator< DEC, BLOCK_IDX >::serial_stream_iterator(), and bm::serial_stream_iterator< DEC, BLOCK_IDX >::try_skip().

## ◆ end_of_stream_

template<class DEC , typename BLOCK_IDX >

bool bm::serial_stream_iterator< DEC, BLOCK_IDX >::end_of_stream_
| protected

Definition at line 800 of file bmserial.h.

Referenced by bm::serial_stream_iterator< DEC, BLOCK_IDX >::is_eof().

## ◆ gap_head_

template<class DEC , typename BLOCK_IDX >

gap_word_t bm::serial_stream_iterator< DEC, BLOCK_IDX >::gap_head_
| protected

Definition at line 811 of file bmserial.h.

## ◆ glevels_

template<class DEC , typename BLOCK_IDX >

gap_word_t bm::serial_stream_iterator< DEC, BLOCK_IDX >::glevels_[bm::gap_levels]
| protected

GAP levels.

Definition at line 805 of file bmserial.h.

Referenced by bm::serial_stream_iterator< DEC, BLOCK_IDX >::serial_stream_iterator().

## ◆ id_cnt_

template<class DEC , typename BLOCK_IDX >

unsigned bm::serial_stream_iterator< DEC, BLOCK_IDX >::id_cnt_
| protected

Id counter for id list.

Definition at line 803 of file bmserial.h.

Referenced by bm::serial_stream_iterator< DEC, BLOCK_IDX >::get_id_count(), and bm::serial_stream_iterator< DEC, BLOCK_IDX >::serial_stream_iterator().

## ◆ last_id_

template<class DEC , typename BLOCK_IDX >

bm::id_t bm::serial_stream_iterator< DEC, BLOCK_IDX >::last_id_
| protected

Last id from the id list.

Definition at line 804 of file bmserial.h.

Referenced by bm::serial_stream_iterator< DEC, BLOCK_IDX >::get_id().

## ◆ mono_block_cnt_

template<class DEC , typename BLOCK_IDX >

block_idx_type bm::serial_stream_iterator< DEC, BLOCK_IDX >::mono_block_cnt_
| protected

number of 0 or 1 blocks

Definition at line 809 of file bmserial.h.

## ◆ state_

template<class DEC , typename BLOCK_IDX >

iterator_state bm::serial_stream_iterator< DEC, BLOCK_IDX >::state_
| protected

Definition at line 802 of file bmserial.h.

Referenced by bm::serial_stream_iterator< DEC, BLOCK_IDX >::get_state(), bm::serial_stream_iterator< DEC, BLOCK_IDX >::serial_stream_iterator(), bm::serial_stream_iterator< DEC, BLOCK_IDX >::state(), and bm::serial_stream_iterator< DEC, BLOCK_IDX >::try_skip().

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

- bmserial.h