|
| bit_stream_writer (etl::span< char > span_, etl::endian stream_endianness_, callback_type callback_=callback_type()) |
| Construct from span.
|
|
| bit_stream_writer (etl::span< unsigned char > span_, etl::endian stream_endianness_, callback_type callback_=callback_type()) |
| Construct from span.
|
|
| bit_stream_writer (void *begin_, void *end_, etl::endian stream_endianness_, callback_type callback_=callback_type()) |
| Construct from range.
|
|
| bit_stream_writer (void *begin_, size_t length_chars_, etl::endian stream_endianness_, callback_type callback_=callback_type()) |
| Construct from begin and length.
|
|
void | restart () |
| Sets the indexes back to the beginning of the stream.
|
|
size_t | capacity_bytes () const |
| Returns the maximum capacity in bits.
|
|
size_t | capacity_bits () const |
|
bool | empty () const |
| Returns true if the bitsteam indexes have been reset.
|
|
bool | full () const |
| Returns true if the bitsteam indexes have reached the end.
|
|
void | write_unchecked (bool value) |
| Writes a boolean to the stream.
|
|
bool | write (bool value) |
| Writes a boolean to the stream.
|
|
template<typename T > |
etl::enable_if< etl::is_integral< T >::value, void >::type | write_unchecked (T value, uint_least8_t nbits=CHAR_BIT *sizeof(T)) |
| For integral types.
|
|
template<typename T > |
etl::enable_if< etl::is_integral< T >::value, bool >::type | write (T value, uint_least8_t nbits=CHAR_BIT *sizeof(T)) |
| For integral types.
|
|
bool | skip (size_t nbits) |
|
size_t | size_bytes () const |
| Returns the number of bytes used in the stream.
|
|
size_t | size_bits () const |
| Returns the number of bits used in the stream.
|
|
template<size_t Nbits> |
size_t | available () const |
|
template<typename T > |
size_t | available () const |
|
size_t | available (size_t nbits) const |
|
size_t | available_bits () const |
| The number of bits left in the stream.
|
|
iterator | begin () |
| Returns start of the stream.
|
|
const_iterator | begin () const |
| Returns start of the stream.
|
|
const_iterator | cbegin () const |
| Returns start of the stream.
|
|
iterator | end () |
| Returns end of the stream.
|
|
const_iterator | end () const |
| Returns end of the stream.
|
|
const_iterator | cend () const |
| Returns end of the stream.
|
|
etl::span< char > | used_data () |
| Returns a span of the used portion of the stream.
|
|
etl::span< const char > | used_data () const |
| Returns a span of the used portion of the stream.
|
|
etl::span< char > | data () |
| Returns a span of whole the stream.
|
|
etl::span< const char > | data () const |
| Returns a span of whole the stream.
|
|
void | flush () |
| Flush the last byte, if partially filled, to the callback, if valid.
|
|
void | set_callback (callback_type callback_) |
| Sets the function to call afer every write.
|
|
callback_type | get_callback () const |
| Gets the function to call afer every write.
|
|