cn.hutool.core.util.ZipUtil.inflater()方法的使用及代码示例

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

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

ZipUtil.inflater介绍

[英]将Zlib流解压到out中
[中]将兹利布流解压到出来中

代码示例

代码示例来源:origin: looly/hutool

  1. /**
  2. * 解压缩zlib
  3. *
  4. * @param in 数据流
  5. * @param length 预估长度
  6. * @return 解压后的bytes
  7. * @since 4.1.19
  8. */
  9. public static byte[] unZlib(InputStream in, int length) {
  10. final ByteArrayOutputStream out = new ByteArrayOutputStream(length);
  11. inflater(in, out);
  12. return out.toByteArray();
  13. }

代码示例来源:origin: looly/hutool

  1. /**
  2. * 解压缩zlib
  3. *
  4. * @param in 数据流
  5. * @param length 预估长度
  6. * @return 解压后的bytes
  7. * @since 4.1.19
  8. */
  9. public static byte[] unZlib(InputStream in, int length) {
  10. final ByteArrayOutputStream out = new ByteArrayOutputStream(length);
  11. inflater(in, out);
  12. return out.toByteArray();
  13. }

代码示例来源:origin: cn.hutool/hutool-all

  1. /**
  2. * 解压缩zlib
  3. *
  4. * @param in 数据流
  5. * @param length 预估长度
  6. * @return 解压后的bytes
  7. * @since 4.1.19
  8. */
  9. public static byte[] unZlib(InputStream in, int length) {
  10. final ByteArrayOutputStream out = new ByteArrayOutputStream(length);
  11. inflater(in, out);
  12. return out.toByteArray();
  13. }

相关文章