BitMagic-C++: bm::bit_in< TDecoder > Class Template Reference

BitMagic-C++

Public Member Functions
bm::bit_in< TDecoder > Class Template Reference
Elias Gamma Code (internal)

Byte based reader for un-aligned bit streaming. More...

`#include <encoding.h>`

## Public Member Functions
| bit_in (TDecoder &decoder) BMNOEXCEPT
unsigned | gamma () BMNOEXCEPT
| decode unsigned value using Elias Gamma coding More...
unsigned | get_bits (unsigned count) BMNOEXCEPT
| read number of bits out of the stream More...
void | bic_decode_u16 (bm::gap_word_t *arr, unsigned sz, bm::gap_word_t lo, bm::gap_word_t hi) BMNOEXCEPT
| Binary Interpolative array decode. More...
void | bic_decode_u16_bitset (bm::word_t *block, unsigned sz, bm::gap_word_t lo, bm::gap_word_t hi) BMNOEXCEPT
void | bic_decode_u16_dry (unsigned sz, bm::gap_word_t lo, bm::gap_word_t hi) BMNOEXCEPT
void | bic_decode_u16_rg (bm::gap_word_t *arr, unsigned sz, bm::gap_word_t lo, bm::gap_word_t hi) BMNOEXCEPT
| Binary Interpolative array decode. More...
void | bic_decode_u16_cm (bm::gap_word_t *arr, unsigned sz, bm::gap_word_t lo, bm::gap_word_t hi) BMNOEXCEPT
| Binary Interpolative array decode. More...
void | bic_decode_u32_cm (bm::word_t *arr, unsigned sz, bm::word_t lo, bm::word_t hi) BMNOEXCEPT
| Binary Interpolative array decode (32-bit) More...
void | bic_decode_u16_rg_bitset (bm::word_t *block, unsigned sz, bm::gap_word_t lo, bm::gap_word_t hi) BMNOEXCEPT
| Binary Interpolative array decode into bitset (32-bit based) More...
void | bic_decode_u16_rg_dry (unsigned sz, bm::gap_word_t lo, bm::gap_word_t hi) BMNOEXCEPT
| Binary Interpolative array decode into /dev/null. More...
void | bic_decode_u16_cm_bitset (bm::word_t *block, unsigned sz, bm::gap_word_t lo, bm::gap_word_t hi) BMNOEXCEPT
| Binary Interpolative array decode into bitset (32-bit based) More...
void | bic_decode_u16_cm_dry (unsigned sz, bm::gap_word_t lo, bm::gap_word_t hi) BMNOEXCEPT
| Binary Interpolative array decode into /dev/null. More...

## Detailed Description

### template<class TDecoder>
class bm::bit_in< TDecoder >

Byte based reader for un-aligned bit streaming.

See also
  encoder

Definition at line 248 of file encoding.h.

## Constructor & Destructor Documentation

## ◆ bit_in()

template<class TDecoder >

bm::bit_in< TDecoder >::bit_in | ( | TDecoder & | decoder | ) |
| inline

Definition at line 251 of file encoding.h.

## Member Function Documentation

## ◆ bic_decode_u16()

template<class TDecoder >

void bm::bit_in< TDecoder >::bic_decode_u16 | ( | bm::gap_word_t * | arr,
|  | unsigned | sz,
|  | bm::gap_word_t | lo,
|  | bm::gap_word_t | hi
| ) |  |
| inline

Binary Interpolative array decode.

Definition at line 264 of file encoding.h.

Referenced by bm::deseriaizer_base< DEC, BV::block_idx_type >::read_bic_gap(), bm::deseriaizer_base< DEC, BV::block_idx_type >::read_gap_block(), and bm::deseriaizer_base< DEC, BV::block_idx_type >::read_id_list().

## ◆ bic_decode_u16_bitset()

template<class TDecoder >

void bm::bit_in< TDecoder >::bic_decode_u16_bitset | ( | bm::word_t * | block,
|  | unsigned | sz,
|  | bm::gap_word_t | lo,
|  | bm::gap_word_t | hi
| ) |  |
| inline

Definition at line 270 of file encoding.h.

Referenced by bm::deseriaizer_base< DEC, BV::block_idx_type >::read_bic_arr().

## ◆ bic_decode_u16_cm()

template<class TDecoder >

void bm::bit_in< TDecoder >::bic_decode_u16_cm | ( | bm::gap_word_t * | arr,
|  | unsigned | sz,
|  | bm::gap_word_t | lo,
|  | bm::gap_word_t | hi
| ) |  |

Binary Interpolative array decode.

Definition at line 1483 of file encoding.h.

References bm::bit_scan_reverse32(), and BM_ASSERT.

## ◆ bic_decode_u16_cm_bitset()

template<class TDecoder >

void bm::bit_in< TDecoder >::bic_decode_u16_cm_bitset | ( | bm::word_t * | block,
|  | unsigned | sz,
|  | bm::gap_word_t | lo,
|  | bm::gap_word_t | hi
| ) |  |

Binary Interpolative array decode into bitset (32-bit based)

Definition at line 1535 of file encoding.h.

References bm::bit_scan_reverse32(), BM_ASSERT, bm::set_word_mask, and bm::set_word_shift.

## ◆ bic_decode_u16_cm_dry()

template<class TDecoder >

void bm::bit_in< TDecoder >::bic_decode_u16_cm_dry | ( | unsigned | sz,
|  | bm::gap_word_t | lo,
|  | bm::gap_word_t | hi
| ) |  |

Binary Interpolative array decode into /dev/null.

Definition at line 1592 of file encoding.h.

References bm::bit_scan_reverse32(), and BM_ASSERT.

## ◆ bic_decode_u16_dry()

template<class TDecoder >

void bm::bit_in< TDecoder >::bic_decode_u16_dry | ( | unsigned | sz,
|  | bm::gap_word_t | lo,
|  | bm::gap_word_t | hi
| ) |  |
| inline

Definition at line 275 of file encoding.h.

Referenced by bm::deseriaizer_base< DEC, BV::block_idx_type >::read_bic_arr().

## ◆ bic_decode_u16_rg()

template<class TDecoder >

void bm::bit_in< TDecoder >::bic_decode_u16_rg | ( | bm::gap_word_t * | arr,
|  | unsigned | sz,
|  | bm::gap_word_t | lo,
|  | bm::gap_word_t | hi
| ) |  |

Binary Interpolative array decode.

Definition at line 1388 of file encoding.h.

References bm::bit_scan_reverse32(), and BM_ASSERT.

## ◆ bic_decode_u16_rg_bitset()

template<class TDecoder >

void bm::bit_in< TDecoder >::bic_decode_u16_rg_bitset | ( | bm::word_t * | block,
|  | unsigned | sz,
|  | bm::gap_word_t | lo,
|  | bm::gap_word_t | hi
| ) |  |

Binary Interpolative array decode into bitset (32-bit based)

Definition at line 1644 of file encoding.h.

References bm::bit_scan_reverse32(), BM_ASSERT, bm::set_word_mask, and bm::set_word_shift.

## ◆ bic_decode_u16_rg_dry()

template<class TDecoder >

void bm::bit_in< TDecoder >::bic_decode_u16_rg_dry | ( | unsigned | sz,
|  | bm::gap_word_t | lo,
|  | bm::gap_word_t | hi
| ) |  |

Binary Interpolative array decode into /dev/null.

Definition at line 1691 of file encoding.h.

References bm::bit_scan_reverse32(), and BM_ASSERT.

## ◆ bic_decode_u32_cm()

template<class TDecoder >

void bm::bit_in< TDecoder >::bic_decode_u32_cm | ( | bm::word_t * | arr,
|  | unsigned | sz,
|  | bm::word_t | lo,
|  | bm::word_t | hi
| ) |  |

Binary Interpolative array decode (32-bit)

Definition at line 1431 of file encoding.h.

References bm::bit_scan_reverse32(), and BM_ASSERT.

## ◆ gamma()

template<class TDecoder >

unsigned bm::bit_in< TDecoder >::gamma

decode unsigned value using Elias Gamma coding

Definition at line 1732 of file encoding.h.

References bm::bit_scan_fwd().

Referenced by bm::deseriaizer_base< DEC, BV::block_idx_type >::read_gap_block(), and bm::deseriaizer_base< DEC, BV::block_idx_type >::read_id_list().

## ◆ get_bits()

template<class TDecoder >

unsigned bm::bit_in< TDecoder >::get_bits | ( | unsigned | count | ) |

read number of bits out of the stream

Definition at line 1817 of file encoding.h.

References BM_ASSERT.

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

- encoding.h