Added ReadOnly BitStream

This commit is contained in:
Gliniak 2023-06-02 21:34:18 +02:00
parent ee267a1d12
commit f1c8f5e5bc
2 changed files with 4 additions and 0 deletions

View File

@ -20,6 +20,9 @@ namespace xe {
BitStream::BitStream(uint8_t* buffer, size_t size_in_bits)
: buffer_(buffer), size_bits_(size_in_bits) {}
BitStream::BitStream(const uint8_t* buffer, size_t size_in_bits)
: buffer_(const_cast<uint8_t*>(buffer)), size_bits_(size_in_bits) {}
BitStream::~BitStream() = default;
void BitStream::SetOffset(size_t offset_bits) {

View File

@ -18,6 +18,7 @@ namespace xe {
class BitStream {
public:
BitStream(uint8_t* buffer, size_t size_in_bits);
BitStream(const uint8_t* buffer, size_t size_in_bits);
~BitStream();
const uint8_t* buffer() const { return buffer_; }