Added size_bits() to bit_stream reader

This commit is contained in:
John Wellbelove 2022-06-21 09:00:20 +01:00
parent ad2f95ac79
commit 08d76a9d56

View File

@ -1198,13 +1198,21 @@ namespace etl
}
//***************************************************************************
/// Returns the number of bytes used in the stream.
/// Returns the number of bytes in the stream buffer.
//***************************************************************************
size_t size_bytes() const
{
return length_chars;
}
//***************************************************************************
/// Returns the number of bits in the stream buffer.
//***************************************************************************
size_t size_bits() const
{
return length_chars * CHAR_BIT;
}
//***************************************************************************
/// Returns start of the stream.
//***************************************************************************