BitMagic-C++
bm::bit_out< TEncoder > Class Template Reference

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

#include <encoding.h>

Inheritance diagram for bm::bit_out< TEncoder >:

Public Member Functions

 bit_out (TEncoder &dest)
 ~bit_out ()
void put_bit (unsigned value) BMNOEXCEPT
 issue single bit into encode bit-stream
void put_bits (unsigned value, unsigned count) BMNOEXCEPT
 issue count bits out of value
void put_zero_bit () BMNOEXCEPT
 issue 0 into output stream
void put_zero_bits (unsigned count) BMNOEXCEPT
 issue specified number of 0s
void gamma (unsigned value) BMNOEXCEPT
 Elias Gamma encode the specified value.
void bic_encode_u16 (const bm::gap_word_t *arr, unsigned sz, bm::gap_word_t lo, bm::gap_word_t hi) BMNOEXCEPT
 Binary Interpolative array decode.
void bic_encode_u16_rg (const bm::gap_word_t *arr, unsigned sz, bm::gap_word_t lo, bm::gap_word_t hi) BMNOEXCEPT
 Binary Interpolative encoding (array of 16-bit ints).
void bic_encode_u16_cm (const bm::gap_word_t *arr, unsigned sz, bm::gap_word_t lo, bm::gap_word_t hi) BMNOEXCEPT
 Binary Interpolative encoding (array of 16-bit ints) cm - "center-minimal".
void bic_encode_u32_cm (const bm::word_t *arr, unsigned sz, bm::word_t lo, bm::word_t hi) BMNOEXCEPT
 Binary Interpolative encoding (array of 32-bit ints) cm - "center-minimal".
void flush () BMNOEXCEPT
 Flush the incomplete 32-bit accumulator word.

Detailed Description

template<class TEncoder>
class bm::bit_out< TEncoder >

Byte based writer for un-aligned bit streaming.

See also
encoder

Definition at line 182 of file encoding.h.

Constructor & Destructor Documentation

◆ bit_out()

template<class TEncoder>
bm::bit_out< TEncoder >::bit_out ( TEncoder & dest)
inline

Definition at line 185 of file encoding.h.

◆ ~bit_out()

template<class TEncoder>
bm::bit_out< TEncoder >::~bit_out ( )
inline

Definition at line 189 of file encoding.h.

Member Function Documentation

◆ bic_encode_u16()

◆ bic_encode_u16_cm()

template<typename TEncoder>
void bm::bit_out< TEncoder >::bic_encode_u16_cm ( const bm::gap_word_t * arr,
unsigned sz,
bm::gap_word_t lo,
bm::gap_word_t hi )

Binary Interpolative encoding (array of 16-bit ints) cm - "center-minimal".

Definition at line 1420 of file encoding.h.

References bic_encode_u16_cm(), bm::bit_scan_reverse32(), BM_ASSERT, BMNOEXCEPT, and put_bits().

Referenced by bic_encode_u16_cm().

◆ bic_encode_u16_rg()

template<typename TEncoder>
void bm::bit_out< TEncoder >::bic_encode_u16_rg ( const bm::gap_word_t * arr,
unsigned sz,
bm::gap_word_t lo,
bm::gap_word_t hi )

Binary Interpolative encoding (array of 16-bit ints).

Definition at line 1259 of file encoding.h.

References bic_encode_u16_rg(), bm::bit_scan_reverse32(), BM_ASSERT, BMNOEXCEPT, and put_bits().

Referenced by bic_encode_u16_rg().

◆ bic_encode_u32_cm()

template<typename TEncoder>
void bm::bit_out< TEncoder >::bic_encode_u32_cm ( const bm::word_t * arr,
unsigned sz,
bm::word_t lo,
bm::word_t hi )

Binary Interpolative encoding (array of 32-bit ints) cm - "center-minimal".

Definition at line 1294 of file encoding.h.

References bic_encode_u32_cm(), bm::bit_scan_reverse32(), BM_ASSERT, BMNOEXCEPT, and put_bits().

Referenced by bic_encode_u32_cm(), bm::serializer< BV >::bienc_arr_sblock(), and bm::sparse_vector_serializer< SV >::serialize().

◆ flush()

◆ gamma()

template<typename TEncoder>
void bm::bit_out< TEncoder >::gamma ( unsigned value)

◆ put_bit()

template<typename TEncoder>
void bm::bit_out< TEncoder >::put_bit ( unsigned value)

issue single bit into encode bit-stream

Definition at line 1095 of file encoding.h.

References BM_ASSERT, and BMNOEXCEPT.

◆ put_bits()

template<typename TEncoder>
void bm::bit_out< TEncoder >::put_bits ( unsigned value,
unsigned count )

issue count bits out of value

Definition at line 1106 of file encoding.h.

References BM_ASSERT, and BMNOEXCEPT.

Referenced by bic_encode_u16_cm(), bic_encode_u16_rg(), and bic_encode_u32_cm().

◆ put_zero_bit()

template<typename TEncoder>
void bm::bit_out< TEncoder >::put_zero_bit ( )

issue 0 into output stream

Definition at line 1148 of file encoding.h.

References BMNOEXCEPT.

◆ put_zero_bits()

template<typename TEncoder>
void bm::bit_out< TEncoder >::put_zero_bits ( unsigned count)

issue specified number of 0s

Definition at line 1157 of file encoding.h.

References BMNOEXCEPT.


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