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