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

`#include <bit_stream.h>`

## Public Types

typedef const unsigned char * | const_iterator

## Public Member Functions

| bit_stream ()
| Default constructor.
| bit_stream (void *begin_, void *end_)
| Construct from range.
| bit_stream (void *begin_, size_t length_)
| Construct from begin and length.
void | set_stream (void *begin_, size_t length_)
| Construct from begin and length.
void | set_stream (void *begin_, void *end_)
| Construct from range.
void | restart ()
| Sets the indexes back to the beginning of the stream.
bool | at_end () const
| Returns true if the bitsteam indexes have reached the end.
bool | put (bool value)
| Writes a boolean to the stream.
template<typename T>
etl::enable_if< etl::is_integral< T >::value, bool >::type | put (T value, uint_least8_t nbits=CHAR_BIT *sizeof(T))
| For integral types.
bool | put (int64_t value, uint_least8_t nbits=CHAR_BIT *sizeof(int64_t))
| For 64bit integral types.
bool | put (uint64_t value, uint_least8_t nbits=CHAR_BIT *sizeof(uint64_t))
| For 64bit integral types.
template<typename T>
etl::enable_if< etl::is_floating_point< T >::value, bool >::type | put (T value)
| For floating point types.
bool | get (bool &value)
| For bool types.
template<typename T>
etl::enable_if< etl::is_integral< T >::value, bool >::type | get (T &value, uint_least8_t nbits=CHAR_BIT *sizeof(T))
| For integral types.
template<typename T>
etl::enable_if< etl::is_floating_point< T >::value, bool >::type | get (T &value)
| For floating point types.
size_t | size () const
| Returns the number of bytes used in the stream.
size_t | bits () const
| Returns the number of bits used in the stream.
const_iterator | begin () const
| Returns start of the stream.
const_iterator | end () const
| Returns end of the stream.

## Detailed Description

Encodes and decodes bitstreams. Data must be stored in the stream in network order.

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

- include/etl/bit_stream.h