public static HTTP2SettingsFrame ReadSettings(HTTP2FrameHeaderAndPayload header)
        {
            HTTP2SettingsFrame frame = new HTTP2SettingsFrame(header);

            if (header.PayloadLength > 0)
            {
                int kvpCount = (int)(header.PayloadLength / 6);

                frame.Settings = new List <KeyValuePair <HTTP2Settings, uint> >(kvpCount);
                for (int i = 0; i < kvpCount; ++i)
                {
                    HTTP2Settings key   = (HTTP2Settings)BufferHelper.ReadUInt16(header.Payload, i * 6);
                    UInt32        value = BufferHelper.ReadUInt32(header.Payload, (i * 6) + 2);

                    frame.Settings.Add(new KeyValuePair <HTTP2Settings, uint>(key, value));
                }
            }

            return(frame);
        }