/// <summary> /// Set the dictionary to be used for either Inflation or Deflation. /// </summary> /// <param name="dictionary">The dictionary bytes to use.</param> /// <returns>Z_OK if all goes well.</returns> public int SetDictionary(byte[] dictionary) { if (istate != null) { return(istate.SetDictionary(this, dictionary)); } throw new ZlibException("No Inflate state!"); }
public int SetDictionary(byte[] dictionary) { if (Istate != null) { return(Istate.SetDictionary(dictionary)); } if (Dstate != null) { return(Dstate.SetDictionary(dictionary)); } throw new ZlibException("No Inflate or Deflate state!"); }
/// <summary> /// 设置压缩时的字典。 /// </summary> /// <param name="dictionary">字典。</param> /// <returns>如果正常返回 ZlibState.Success 。</returns> public ZlibState SetDictionary(byte[] dictionary) { if (IState != null) { return(IState.SetDictionary(dictionary)); } if (DState != null) { return(DState.SetDictionary(dictionary)); } throw new ZlibException("没有初始化 Inflate 或 Deflate 状态 。"); }