public static byte[] CtorErrMsg(int error, string msg, NameValueCollection requestParam) { int msgId = Convert.ToInt32(requestParam["msgid"]); int actionid = Convert.ToInt32(requestParam["actionid"]); var ms = new MessageStructure(); var head = new MessageHead(msgId, actionid, "st", error, msg); ms.WriteBuffer(head); return ms.PosGzipBuffer(); }