Пример #1
0
 public static byte[] Decompress(byte[] data)
 {
     return(GZipUtil.Decompress(data, 0, (int)data.Length));
 }
Пример #2
0
 public static string DecompressString(byte[] data)
 {
     byte[] tmp = GZipUtil.Decompress(data, 0, (int)data.Length);
     return(Encoding.UTF8.GetString(tmp));
 }
Пример #3
0
 public static byte[] CompressString(string data)
 {
     byte[] tmp = Encoding.UTF8.GetBytes(data);
     return(GZipUtil.Compress(tmp, 0, (int)tmp.Length));
 }