public static FileFormat.FAT.VolumeGameIndex LoadFAT(string file) { const int MAX_VOLUME_LEN = 13; FileFormat.FAT.VolumeGameIndex VGIndex = null; BinaryReader bin = new BinaryReader(new MemoryStream(File.ReadAllBytes(file))); uint hashRoot; ushort countVolume, countIndexes; string nameVolume = string.Empty; using (bin) { hashRoot = bin.ReadUInt32(); countVolume = bin.ReadUInt16(); VGIndex = new FileFormat.FAT.VolumeGameIndex( file, hashRoot); for (int i = 0; i < countVolume; i++) { nameVolume = Lib.Toolkit.ClearChar(bin.ReadChars(MAX_VOLUME_LEN)); countIndexes = bin.ReadUInt16(); VGIndex.AddVolumeIndex(nameVolume); for (int j = 0; j < countIndexes; j++) { VGIndex.VolumeIndexes[i].AddIndex( bin.ReadInt32(), bin.ReadUInt32()); } } } bin.Close(); return(VGIndex); }