#pragma once

#include "BitStream.h"

#include <istream>

class InputBitStream : public BitStream
{
    InputBitStream(std::basic_istream<unsigned char>* stream);

    bool isFinished() const override;

    std::vector<unsigned char> peekNextNBytes(unsigned n) const override;

    std::optional<unsigned char> readNextByte() override;

    void writeByte(unsigned char data, bool checkOverflow = true) override;

    void writeBytes(const std::vector<unsigned char>) override
    {

    }

private:
    std::basic_istream<unsigned char>* mStream{nullptr};
};
