コード例 #1
0
 public static string CompressGraphData(string input)
 {
     byte[] encoded    = System.Text.Encoding.UTF8.GetBytes(input);
     byte[] compressed = GzipCompression.Compress(encoded);
     return(Convert.ToBase64String(compressed));
 }
コード例 #2
0
 public static string DecompressGraphData(string input)
 {
     byte[] compressed   = Convert.FromBase64String(input);
     byte[] decompressed = GzipCompression.Decompress(compressed);
     return(System.Text.Encoding.UTF8.GetString(decompressed));
 }