34 lines
491 B
C++
34 lines
491 B
C++
#include "InputBitStream.h"
|
|
|
|
InputBitStream::InputBitStream(InputStream<Byte>* stream)
|
|
: BitStream(),
|
|
mStream(stream)
|
|
{
|
|
|
|
}
|
|
|
|
bool InputBitStream::isFinished() const
|
|
{
|
|
return mStream->good();
|
|
}
|
|
|
|
void InputBitStream::peekNextNBytes(size_t, VecBytes&) const
|
|
{
|
|
}
|
|
|
|
bool InputBitStream::readNextByte(Byte& buffer)
|
|
{
|
|
if (mStream->good())
|
|
{
|
|
return mStream->get(buffer);
|
|
}
|
|
else
|
|
{
|
|
return false;
|
|
}
|
|
}
|
|
|
|
void InputBitStream::writeByte(Byte, bool)
|
|
{
|
|
|
|
}
|