#pragma once

#include <cstddef>
#include <cstdint>

namespace blitz {

class DataBuffer;

class VarInt {
  private:
	std::uint64_t m_Value;

  public:
	VarInt() : m_Value(0) {}
	VarInt(std::uint64_t value) : m_Value(value) {}

	std::uint64_t GetValue() const {
		return m_Value;
	}

	std::size_t GetSerializedLength() const;

	friend DataBuffer& operator<<(DataBuffer& out, const VarInt& var);
	friend DataBuffer& operator>>(DataBuffer& in, VarInt& var);
};

}  // namespace blitz
