/// <summary> /// 从压缩的字节数组转换到Object对象 /// </summary> /// <param name="byteArray">待解压缩的字节数据</param> /// <returns>对象</returns> public static object GZipToObject(byte[] byteArray) { byte[] byteTempArray = GZipUtil.Decompress(byteArray); return(ByteArrayToObject(byteTempArray)); }
/// <summary> /// 压缩Object对象到字节数组 /// </summary> /// <param name="obj">待压缩对象</param> /// <returns>压缩后的字节数组</returns> public static byte[] ObjectToGZip(object obj) { byte[] byteTempArray = ObjectToByteArray(obj); return(GZipUtil.Compress(byteTempArray)); }