Loading...
Searching...
No Matches
etl::bit_stream_reader Class Reference

Reads bit streams. More...

`#include <bit_stream.h>`

## Public Types

typedef char | value_type
typedef const char * | const_iterator

## Public Member Functions

template<size_t Length>
| bit_stream_reader (const etl::span< char, Length > &span_, etl::bit_order bit_order_, etl::endian byte_order_=etl::endian::big)
| Construct from span.
template<size_t Length>
| bit_stream_reader (const etl::span< unsigned char, Length > &span_, etl::bit_order bit_order_, etl::endian byte_order_=etl::endian::big)
| Construct from span.
template<size_t Length>
| bit_stream_reader (const etl::span< const char, Length > &span_, etl::bit_order bit_order_, etl::endian byte_order_=etl::endian::big)
| Construct from span.
template<size_t Length>
| bit_stream_reader (const etl::span< const unsigned char, Length > &span_, etl::bit_order bit_order_, etl::endian byte_order_=etl::endian::big)
| Construct from span.
| bit_stream_reader (const void *begin_, const void *end_, etl::bit_order bit_order_, etl::endian byte_order_=etl::endian::big)
| Construct from range.
| bit_stream_reader (const void *begin_, size_t length_, etl::bit_order bit_order_, etl::endian byte_order_=etl::endian::big)
| Construct from begin and length.
void | restart ()
| Sets the indexes back to the beginning of the stream.
template<typename T>
etl::enable_if< etl::is_same< bool, T >::value, bool >::type | read_unchecked ()
| For bool types.
template<typename T>
etl::enable_if< etl::is_same< bool, T >::value, etl::optional< bool > >::type | read ()
| For bool types.
template<typename T>
etl::enable_if< etl::is_integral< T >::value &&!etl::is_same< bool, T >::value, T >::type | read_unchecked (uint_least8_t nbits=CHAR_BIT *sizeof(T))
| For integral types.
template<typename T>
etl::enable_if< etl::is_integral< T >::value &&!etl::is_same< bool, T >::value, etl::optional< T > >::type | read (uint_least8_t nbits=CHAR_BIT *sizeof(T))
| For integral types.
size_t | size_bytes () const
| Returns the number of bytes in the stream buffer.
size_t | size_bits () const
| Returns the number of bits in the stream buffer.
const_iterator | begin () const
| Returns start of the stream.
const_iterator | cbegin () const
| Returns start of the stream.
const_iterator | end () const
| Returns end of the stream.
const_iterator | cend () const
| Returns end of the stream.
etl::span< const char > | data () const
| Returns a span of whole the stream.
bool | skip (size_t nbits)

## Detailed Description

Reads bit streams.

## Member Function Documentation

## skip()

bool etl::bit_stream_reader::skip | ( | size_t | nbits | ) |

inline

Skip n bits, up to the maximum space available. Returns true if the skip was possible. Returns false if the full skip size was not possible.

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

- include/etl/bit_stream.h