34 lines
535 B
C++
34 lines
535 B
C++
#include "InputBitStream.h"
|
|
|
|
InputBitStream::InputBitStream(std::basic_istream<unsigned char>* stream)
|
|
: BitStream(),
|
|
mStream(stream)
|
|
{
|
|
|
|
}
|
|
|
|
bool InputBitStream::isFinished() const
|
|
{
|
|
return mStream->good();
|
|
}
|
|
|
|
void InputBitStream::peekNextNBytes(std::size_t, VecBytes&) const
|
|
{
|
|
}
|
|
|
|
std::optional<Byte> InputBitStream::readNextByte()
|
|
{
|
|
if (mStream->good())
|
|
{
|
|
return static_cast<Byte>(mStream->get());
|
|
}
|
|
else
|
|
{
|
|
return std::nullopt;
|
|
}
|
|
}
|
|
|
|
void InputBitStream::writeByte(Byte, bool)
|
|
{
|
|
|
|
}
|