/// <summary> /// Serializes a number of ErfStrings from the passed array. /// </summary> /// <param name="s">The stream</param> /// <param name="estrings">The ErfString structures to serialize</param> public static void Serialize(Stream s, ErfString[] estrings) { foreach (ErfString estring in estrings) estring.Serialize(s); }
/// <summary> /// Deserializes a number of ErfString objects from the passed stream, /// placing them into an array. /// </summary> /// <param name="s">The stream</param> /// <param name="count">The number of strings to deserialize</param> /// <param name="type">The type of ERF the string is coming from, some ERFs /// have null terminated strings and some do not</param> /// <returns>An ErfString array with the strings</returns> public static ErfString[] Deserialize(Stream s, int count, ErfType type) { ErfString[] estrings = new ErfString[count]; for (int i = 0; i < count; i++) estrings[i] = new ErfString(s, type); return estrings; }