public static BeatmapEntry ReadFromReader(SerializationReader r, bool readLength = true, int version = 20160729) { BeatmapEntry e = new BeatmapEntry(); int length = 0; if (readLength) { length = r.ReadInt32(); } int startPosition = (int)r.BaseStream.Position; r.ReadString(); r.ReadString(); r.ReadString(); r.ReadString(); r.ReadString(); r.ReadString(); r.ReadString(); e.BeatmapChecksum = r.ReadString(); e.BeatmapFileName = r.ReadString(); r.ReadByte(); r.ReadUInt16(); r.ReadUInt16(); r.ReadUInt16(); r.ReadDateTime(); if (version >= 20140609) { r.ReadSingle(); r.ReadSingle(); r.ReadSingle(); r.ReadSingle(); } else { r.ReadByte(); r.ReadByte(); r.ReadByte(); r.ReadByte(); } r.ReadDouble(); if (version >= 20140609) { r.ReadDictionary <Mods, double>(); r.ReadDictionary <Mods, double>(); r.ReadDictionary <Mods, double>(); r.ReadDictionary <Mods, double>(); } r.ReadInt32(); r.ReadInt32(); r.ReadInt32(); r.ReadSerializableList <TimingPoint>(); r.ReadInt32(); r.ReadInt32(); r.ReadInt32(); r.ReadByte(); r.ReadByte(); r.ReadByte(); r.ReadByte(); r.ReadInt16(); r.ReadSingle(); r.ReadByte(); r.ReadString(); r.ReadString(); r.ReadInt16(); r.ReadString(); r.ReadBoolean(); r.ReadDateTime(); r.ReadBoolean(); e.FolderName = r.ReadString(); r.ReadDateTime(); r.ReadBoolean(); r.ReadBoolean(); r.ReadBoolean(); r.ReadBoolean(); r.ReadBoolean(); if (version < 20140609) { r.ReadInt16(); } r.ReadInt32(); r.ReadByte(); int endPosition = (int)r.BaseStream.Position; Debug.Assert(!readLength || length == endPosition - startPosition); return(e); }