internal static string ReadString(Stream s)
{
int len = ReadInt32(s);
char[] chars = new char[len];
for (int i = 0; i < len; i++)
{
int hi, lo;
lo = s.ReadByte();
hi = s.ReadByte();
if (lo == -1 || hi == -1)
throw new IOException("Unexpected EOF encountered");
chars[i] = (char) (lo | (hi << 8));
}
return new string(chars);
}