public static void Read(this IDictionary <string, short> _this, EndianStream stream) { int count = stream.ReadInt32(); for (int i = 0; i < count; i++) { string key = stream.ReadStringAligned(); short value = stream.ReadInt16(); _this.Add(key, value); } }