internal static HomophoneUnit Deserialize(BinaryReader binaryReader) { var homophoneUnit = new HomophoneUnit { Count = binaryReader.ReadInt16() }; homophoneUnit.HomophoneList = new char[homophoneUnit.Count]; for (var i = 0; i < homophoneUnit.Count; i++) { homophoneUnit.HomophoneList[i] = binaryReader.ReadChar(); } return(homophoneUnit); }
internal static HomophoneDictionary Deserialize(BinaryReader binaryReader) { var homophoneDictionary = new HomophoneDictionary(); binaryReader.ReadInt32(); homophoneDictionary.Length = binaryReader.ReadInt32(); homophoneDictionary.Count = binaryReader.ReadInt16(); homophoneDictionary.Offset = binaryReader.ReadInt16(); binaryReader.ReadBytes(8); homophoneDictionary.HomophoneUnitTable = new List <HomophoneUnit>(); for (var i = 0; i < homophoneDictionary.Count; i++) { homophoneDictionary.HomophoneUnitTable.Add(HomophoneUnit.Deserialize(binaryReader)); } binaryReader.ReadInt16(); return(homophoneDictionary); }