public string Stream1(int i) { var persons = BuildModel(); string json = JsonConvert.SerializeObject(persons); var result = GZipHelper.GZipCompressString(json); return(result); }
public void Test() { var temp = "abc123!@#"; var comressed = GZipHelper.GZipCompressString(temp); var decomressed = GZipHelper.GZipDecompressString(comressed); Assert.AreEqual(temp, decomressed); }
public string GzipHelper(string url, string person) { string result = string.Empty; GzipPost gzipPost = new GzipPost(); gzipPost.GzipContent = GZipHelper.GZipCompressString(person); var gzipResult = HttpClientTool.HttpPost <GzipResult>(url, gzipPost); result = JsonConvert.SerializeObject(gzipResult); return(result); }