internal ulong ReadVarInt() { var varint = new VarInt(Bytes, Cursor); Cursor += varint.SizeInBytes; return varint.Value; }
internal string ReadStr() { var varInt = new VarInt(Bytes, Cursor); if (varInt.Value == 0) { Cursor += 1; return ""; } var characters = new byte[varInt.Value]; Array.Copy(Bytes, Cursor, characters, 0, characters.Length); Cursor += varInt.SizeInBytes; return Encoding.UTF8.GetString(characters, 0, characters.Length); }