/// <summary> /// 对字符串进行解压缩 /// </summary> /// <param name="str">待解压缩的字符串</param> /// <returns>解压缩后的字符串</returns> public static string DecompressString(string str) { string decompressString = str; try { byte[] decompressBeforeByte = Convert.FromBase64String(str); byte[] decompressAfterByte = Utils.Decompress(decompressBeforeByte); return(Encoding.UTF8.GetString(decompressAfterByte, 0, decompressAfterByte.Length)); } catch (Exception ex) { System.Diagnostics.Debug.WriteLine(ex); return(decompressString); } }