36 lines
636 B
C++
36 lines
636 B
C++
#include "OutputBitStream.h"
|
|
|
|
OutputBitStream::OutputBitStream(std::basic_ostream<char>* stream)
|
|
: BitStream(),
|
|
mStream(stream)
|
|
{
|
|
|
|
}
|
|
|
|
bool OutputBitStream::isFinished() const
|
|
{
|
|
return true;
|
|
}
|
|
|
|
std::vector<unsigned char> OutputBitStream::peekNextNBytes(unsigned n) const
|
|
{
|
|
return {};
|
|
}
|
|
|
|
std::optional<unsigned char> OutputBitStream::readNextByte()
|
|
{
|
|
return std::nullopt;
|
|
}
|
|
|
|
void OutputBitStream::writeByte(unsigned char data, bool checkOverflow )
|
|
{
|
|
(*mStream) << data;
|
|
}
|
|
|
|
void OutputBitStream::writeBytes(const std::vector<unsigned char> data)
|
|
{
|
|
for(auto byte : data)
|
|
{
|
|
writeByte(byte);
|
|
}
|
|
}
|