public void TestDecompressPhpGeneratedData() { var data = "H4sIAAAAAAAAAyvJSFVIzUvOT8nMS1dILChILErMK8mpVCjPL8pOTQEAw6AGlB4AAAA="; var decoded = GzipCompressionHandler.DecodeBase64AndDecompress(data); decoded.Should().Be.EqualTo("the encoding apparantly worked"); }
public void TestCompression() { foreach (var lorum in lorums) { var e = GzipCompressionHandler.CompressAndConvertToBase64(lorum); var d = GzipCompressionHandler.DecodeBase64AndDecompress(e); Debug.Assert(d.Equals(lorum)); } }
//[TestMethod] public void TestDecompressPhpGeneratedData123() { foreach (var data in lorums) { var urlEncoded = HttpUtility.UrlEncode(data); using (WebClient client = new WebClient()) { var url = UrlBuddyServer + "/test_encode_with_data?data=" + urlEncoded; var result = client.DownloadString(url); var decoded = GzipCompressionHandler.DecodeBase64AndDecompress(result); decoded.Should().Be.EqualTo(data); } } }