Esempio n. 1
0
 /// <summary>
 /// 自动压缩
 /// </summary>
 /// <param name="buffer"></param>
 /// <returns>返回压缩后的字节</returns>
 public byte[] CompressBuffer(byte[] buffer)
 {
     if (buffer.Length > EnableGzipMinByte)
     {
         return(GzipUtils.EnCompress(buffer, 0, buffer.Length));
     }
     return(buffer);
 }
Esempio n. 2
0
 private static byte[] CompressGzipBuffer(byte[] data)
 {
     return(GzipUtils.EnCompress(data, 0, data.Length));
 }