#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) const
{
    return {};
}

std::optional<unsigned char> OutputBitStream::readNextByte()
{
    return std::nullopt;
}

void OutputBitStream::writeByte(unsigned char data, bool)
{
    (*mStream) << data;
}

void OutputBitStream::writeBytes(const std::vector<unsigned char> data)
{
    for(auto byte : data)
    {
        writeByte(byte);
    }
}
