static string GetRootNameInternal([NotNull] Stream stream, bool bigEndian)
{
if (stream == null)
{
throw new ArgumentNullException("stream");
}
NbtBinaryReader reader = new NbtBinaryReader(stream, bigEndian);
if (reader.ReadTagType() != NbtTagType.Compound)
{
throw new NbtFormatException("Given NBT stream does not start with a TAG_Compound");
}
return(reader.ReadString());
}