예제 #1
0
 /// <summary>
 /// Set the CompressionStrategy and CompressionLevel for a deflation session.
 /// </summary>
 /// <param name="level">the level of compression to use.</param>
 /// <param name="strategy">the strategy to use for compression.</param>
 /// <returns>Z_OK if all goes well.</returns>
 public int SetDeflateParams(CompressionLevel level, CompressionStrategy strategy)
 {
     if (dstate == null)
     {
         throw new ZlibException("No Deflate State!");
     }
     return(dstate.SetParams(level, strategy));
 }
예제 #2
0
파일: ZlibCodec.cs 프로젝트: tvrjcf/Demo
 /// <summary>
 /// 设置解压参数。
 /// </summary>
 /// <param name="level">压缩等级。</param>
 /// <param name="strategy">压缩策略。</param>
 /// <returns>如果正常返回 ZlibState.Success 。</returns>
 public ZlibState SetDeflateParams(CompressionLevel level, CompressionStrategy strategy)
 {
     Thrower.ThrowZlibExceptionIf(DState == null, "没有初始化 Deflate 状态。");
     return(DState.SetParams(level, strategy));
 }