public bool PeekBool() { ThrowIfOverflow(1); ulong dummy = m_Cursor; return(BitReader.ReadUIntBits(m_Data, ref dummy, 1) == 1); }
public uint ReadUInt(byte bits = 32) { if (bits < 1 || bits > 32) { throw new ArgumentOutOfRangeException(nameof(bits)); } ThrowIfOverflow(bits); return((uint)BitReader.ReadUIntBits(m_Data, ref m_Cursor, bits)); }
public byte ReadByte(byte bits = 8) { if (bits < 1 || bits > 8) { throw new ArgumentOutOfRangeException(nameof(bits)); } ThrowIfOverflow(bits); return((byte)BitReader.ReadUIntBits(m_Data, ref m_Cursor, bits)); }
public ulong ReadULong(byte bits = 64) { if (bits < 1 || bits > 64) { throw new ArgumentOutOfRangeException(nameof(bits)); } ThrowIfOverflow(bits); return(BitReader.ReadUIntBits(m_Data, ref m_Cursor, bits)); }
public bool ReadBool() { ThrowIfOverflow(1); return(BitReader.ReadUIntBits(m_Data, ref m_Cursor, 1) == 1); }