public byte[] Compress() { string data = String.Empty; data += this.requestName + "~"; foreach (KeyValuePair <string, object> p in dataList) { data += p.Key + "#" + p.Value + "_"; } data = data.TrimEnd('_'); data += "~" + eventParams.Compress(); byte[] bytes = System.Text.Encoding.UTF8.GetBytes(data); return(bytes); }