io.netty.handler.codec.compression.ZlibUtil类的使用及代码示例

x33g5p2x  于2022-02-05 转载在 其他  
字(6.1k)|赞(0)|评价(0)|浏览(115)

本文整理了Java中io.netty.handler.codec.compression.ZlibUtil类的一些代码示例,展示了ZlibUtil类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZlibUtil类的具体详情如下:
包路径:io.netty.handler.codec.compression.ZlibUtil
类名称:ZlibUtil

ZlibUtil介绍

[英]Utility methods used by JZlibEncoder and JZlibDecoder.
[中]JZlibEncoder和JZlibDecoder使用的实用方法。

代码示例

代码示例来源:origin: netty/netty

ZlibUtil.convertWrapperType(wrapper));
if (resultCode != JZlib.Z_OK) {
  ZlibUtil.fail(z, "initialization failure", resultCode);
wrapperOverhead = ZlibUtil.wrapperOverhead(wrapper);

代码示例来源:origin: netty/netty

static void fail(Deflater z, String message, int resultCode) {
  throw deflaterException(z, message, resultCode);
}

代码示例来源:origin: netty/netty

static void fail(Inflater z, String message, int resultCode) {
  throw inflaterException(z, message, resultCode);
}

代码示例来源:origin: netty/netty

/**
 * Creates a new instance with the specified wrapper.
 *
 * @throws DecompressionException if failed to initialize zlib
 */
public JZlibDecoder(ZlibWrapper wrapper) {
  if (wrapper == null) {
    throw new NullPointerException("wrapper");
  }
  int resultCode = z.init(ZlibUtil.convertWrapperType(wrapper));
  if (resultCode != JZlib.Z_OK) {
    ZlibUtil.fail(z, "initialization failure", resultCode);
  }
}

代码示例来源:origin: netty/netty

ZlibUtil.fail(z, "initialization failure", resultCode);
} else {
  resultCode = z.deflateSetDictionary(dictionary, dictionary.length);
  if (resultCode != JZlib.Z_OK) {
    ZlibUtil.fail(z, "failed to set the dictionary", resultCode);
wrapperOverhead = ZlibUtil.wrapperOverhead(ZlibWrapper.ZLIB);

代码示例来源:origin: netty/netty

/**
 * Creates a new instance with the specified preset dictionary. The wrapper
 * is always {@link ZlibWrapper#ZLIB} because it is the only format that
 * supports the preset dictionary.
 *
 * @throws DecompressionException if failed to initialize zlib
 */
public JZlibDecoder(byte[] dictionary) {
  if (dictionary == null) {
    throw new NullPointerException("dictionary");
  }
  this.dictionary = dictionary;
  int resultCode;
  resultCode = z.inflateInit(JZlib.W_ZLIB);
  if (resultCode != JZlib.Z_OK) {
    ZlibUtil.fail(z, "initialization failure", resultCode);
  }
}

代码示例来源:origin: redisson/redisson

/**
 * Creates a new instance with the specified wrapper.
 *
 * @throws DecompressionException if failed to initialize zlib
 */
public JZlibDecoder(ZlibWrapper wrapper) {
  if (wrapper == null) {
    throw new NullPointerException("wrapper");
  }
  int resultCode = z.init(ZlibUtil.convertWrapperType(wrapper));
  if (resultCode != JZlib.Z_OK) {
    ZlibUtil.fail(z, "initialization failure", resultCode);
  }
}

代码示例来源:origin: redisson/redisson

ZlibUtil.fail(z, "initialization failure", resultCode);
} else {
  resultCode = z.deflateSetDictionary(dictionary, dictionary.length);
  if (resultCode != JZlib.Z_OK) {
    ZlibUtil.fail(z, "failed to set the dictionary", resultCode);
wrapperOverhead = ZlibUtil.wrapperOverhead(ZlibWrapper.ZLIB);

代码示例来源:origin: redisson/redisson

/**
 * Creates a new instance with the specified preset dictionary. The wrapper
 * is always {@link ZlibWrapper#ZLIB} because it is the only format that
 * supports the preset dictionary.
 *
 * @throws DecompressionException if failed to initialize zlib
 */
public JZlibDecoder(byte[] dictionary) {
  if (dictionary == null) {
    throw new NullPointerException("dictionary");
  }
  this.dictionary = dictionary;
  int resultCode;
  resultCode = z.inflateInit(JZlib.W_ZLIB);
  if (resultCode != JZlib.Z_OK) {
    ZlibUtil.fail(z, "initialization failure", resultCode);
  }
}

代码示例来源:origin: redisson/redisson

ZlibUtil.convertWrapperType(wrapper));
if (resultCode != JZlib.Z_OK) {
  ZlibUtil.fail(z, "initialization failure", resultCode);
wrapperOverhead = ZlibUtil.wrapperOverhead(wrapper);

代码示例来源:origin: wildfly/wildfly

/**
 * Creates a new instance with the specified wrapper.
 *
 * @throws DecompressionException if failed to initialize zlib
 */
public JZlibDecoder(ZlibWrapper wrapper) {
  if (wrapper == null) {
    throw new NullPointerException("wrapper");
  }
  int resultCode = z.init(ZlibUtil.convertWrapperType(wrapper));
  if (resultCode != JZlib.Z_OK) {
    ZlibUtil.fail(z, "initialization failure", resultCode);
  }
}

代码示例来源:origin: wildfly/wildfly

ZlibUtil.fail(z, "initialization failure", resultCode);
} else {
  resultCode = z.deflateSetDictionary(dictionary, dictionary.length);
  if (resultCode != JZlib.Z_OK) {
    ZlibUtil.fail(z, "failed to set the dictionary", resultCode);
wrapperOverhead = ZlibUtil.wrapperOverhead(ZlibWrapper.ZLIB);

代码示例来源:origin: wildfly/wildfly

/**
 * Creates a new instance with the specified preset dictionary. The wrapper
 * is always {@link ZlibWrapper#ZLIB} because it is the only format that
 * supports the preset dictionary.
 *
 * @throws DecompressionException if failed to initialize zlib
 */
public JZlibDecoder(byte[] dictionary) {
  if (dictionary == null) {
    throw new NullPointerException("dictionary");
  }
  this.dictionary = dictionary;
  int resultCode;
  resultCode = z.inflateInit(JZlib.W_ZLIB);
  if (resultCode != JZlib.Z_OK) {
    ZlibUtil.fail(z, "initialization failure", resultCode);
  }
}

代码示例来源:origin: redisson/redisson

static void fail(Deflater z, String message, int resultCode) {
  throw deflaterException(z, message, resultCode);
}

代码示例来源:origin: redisson/redisson

static void fail(Inflater z, String message, int resultCode) {
  throw inflaterException(z, message, resultCode);
}

代码示例来源:origin: wildfly/wildfly

ZlibUtil.convertWrapperType(wrapper));
if (resultCode != JZlib.Z_OK) {
  ZlibUtil.fail(z, "initialization failure", resultCode);
wrapperOverhead = ZlibUtil.wrapperOverhead(wrapper);

代码示例来源:origin: org.jboss.eap/wildfly-client-all

/**
 * Creates a new instance with the specified wrapper.
 *
 * @throws DecompressionException if failed to initialize zlib
 */
public JZlibDecoder(ZlibWrapper wrapper) {
  if (wrapper == null) {
    throw new NullPointerException("wrapper");
  }
  int resultCode = z.init(ZlibUtil.convertWrapperType(wrapper));
  if (resultCode != JZlib.Z_OK) {
    ZlibUtil.fail(z, "initialization failure", resultCode);
  }
}

代码示例来源:origin: io.netty/netty-codec

ZlibUtil.fail(z, "initialization failure", resultCode);
} else {
  resultCode = z.deflateSetDictionary(dictionary, dictionary.length);
  if (resultCode != JZlib.Z_OK) {
    ZlibUtil.fail(z, "failed to set the dictionary", resultCode);
wrapperOverhead = ZlibUtil.wrapperOverhead(ZlibWrapper.ZLIB);

代码示例来源:origin: netty/netty

ZlibUtil.fail(z, "compression failure", resultCode);

代码示例来源:origin: wildfly/wildfly

static void fail(Deflater z, String message, int resultCode) {
  throw deflaterException(z, message, resultCode);
}

相关文章