Code:
WriteString (string, stream): stream.Write(string.Length), stream.Write(string[0], string.Length);
WriteRec (rec, stream): WriteStrimg(rec.Key, stream), WriteString(rec.Value, stream);
Und auslesen entsprechend andersrum: Länge lesen, SetLength, Lesen am Stück, Länge...