public bool GetBoolean() { if (ReadBytes + sizeof(bool) > WrittenBytes) throw new AegisException(AegisResult.BufferUnderflow, "No more readable buffer."); var val = Buffer[ReadBytes]; ReadBytes += sizeof(bool); return (val == 1); }