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