Thrill
0.1
|
Definition at line 27 of file bit_stream.hpp.
#include <bit_stream.hpp>
Public Member Functions | |
BitStreamWriter (BlockWriter &block_writer) | |
BitStreamWriter (const BitStreamWriter &)=delete | |
non-copyable: delete copy-constructor More... | |
BitStreamWriter (BitStreamWriter &&)=default | |
move-constructor: default More... | |
~BitStreamWriter () | |
void | FlushBits () |
Flush out buffered bits. More... | |
BitStreamWriter & | operator= (const BitStreamWriter &)=delete |
non-copyable: delete assignment operator More... | |
BitStreamWriter & | operator= (BitStreamWriter &&)=default |
move-assignment operator: default More... | |
void | PutBits (const size_t &value, unsigned bits) |
Append k bits to the data array. More... | |
Protected Types | |
enum | : size_t { buffer_bits_ = sizeof(size_t) * 8 } |
number of bits in buffer_ More... | |
enum | : size_t { mask = buffer_bits_ - 1 } |
modulo mask of number of bits in buffer for pos_ counter More... | |
Protected Attributes | |
BlockWriter & | block_writer_ |
Output BlockWriter. More... | |
size_t | buffer_ = 0 |
current buffer of 32/64 bits More... | |
size_t | pos_ = 0 |
currently filled number of bits More... | |
|
protected |
|
protected |
modulo mask of number of bits in buffer for pos_ counter
Enumerator | |
---|---|
mask |
Definition at line 34 of file bit_stream.hpp.
|
inlineexplicit |
Definition at line 37 of file bit_stream.hpp.
References die_unless, and BitStreamWriter< BlockWriter >::operator=().
|
delete |
non-copyable: delete copy-constructor
|
default |
move-constructor: default
|
inline |
Definition at line 51 of file bit_stream.hpp.
References BitStreamWriter< BlockWriter >::FlushBits().
|
inline |
Flush out buffered bits.
Definition at line 94 of file bit_stream.hpp.
References BitStreamWriter< BlockWriter >::block_writer_, BitStreamWriter< BlockWriter >::buffer_, and BitStreamWriter< BlockWriter >::pos_.
Referenced by BitStreamWriter< BlockWriter >::~BitStreamWriter().
|
delete |
non-copyable: delete assignment operator
Referenced by BitStreamReader< BlockReader >::BitStreamReader(), and BitStreamWriter< BlockWriter >::BitStreamWriter().
|
default |
move-assignment operator: default
|
inline |
Append k bits to the data array.
value | new value |
bits | k = size of the new value in bits |
Definition at line 61 of file bit_stream.hpp.
References BitStreamWriter< BlockWriter >::block_writer_, BitStreamWriter< BlockWriter >::buffer_, BitStreamWriter< BlockWriter >::buffer_bits_, BitStreamWriter< BlockWriter >::mask, BitStreamWriter< BlockWriter >::pos_, and gen_data::value.
Referenced by GolombBitStreamWriter< BlockWriter >::PutGolomb(), and GolombBitStreamWriter< BlockWriter >::~GolombBitStreamWriter().
|
protected |
Output BlockWriter.
Definition at line 104 of file bit_stream.hpp.
Referenced by BitStreamWriter< BlockWriter >::FlushBits(), BitStreamWriter< BlockWriter >::PutBits(), and GolombBitStreamWriter< BlockWriter >::PutGolomb().
|
protected |
current buffer of 32/64 bits
Definition at line 107 of file bit_stream.hpp.
Referenced by BitStreamWriter< BlockWriter >::FlushBits(), BitStreamReader< BlockReader >::GetBits(), BitStreamReader< BlockReader >::GetNumberOfOnesUntilNextZero(), BitStreamReader< BlockReader >::HasNextZeroTest(), and BitStreamWriter< BlockWriter >::PutBits().
|
protected |
currently filled number of bits
Definition at line 110 of file bit_stream.hpp.
Referenced by BitStreamWriter< BlockWriter >::FlushBits(), BitStreamReader< BlockReader >::GetBits(), BitStreamReader< BlockReader >::GetNumberOfOnesUntilNextZero(), BitStreamReader< BlockReader >::HasNextZeroTest(), BitStreamWriter< BlockWriter >::PutBits(), and GolombBitStreamWriter< BlockWriter >::~GolombBitStreamWriter().