接口 Zip

所有已知实现类:
BaseZip, GzipImpl, ZipImpl, ZlibImpl

public interface Zip
压缩与解压接口
作者:
WD
  • 方法详细资料

    • compress

      byte[] compress(byte[] b)
      压缩数据
      参数:
      b - 字节数组
      返回:
      压缩后的字节数组
    • extract

      byte[] extract(byte[] b)
      解压数据
      参数:
      b - 压缩字节
      返回:
      解压后数据
    • compress

      压缩数据
      参数:
      in - 要压缩的输入流
      返回:
      压缩后的字节输出流
    • extract

      解压数据
      参数:
      in - 要解压的输入流
      返回:
      解压后的字节输出流
    • compress

      <E extends OutputStream> E compress(InputStream in, E out)
      压缩数据
      参数:
      in - 要压缩的输入流
      out - 压缩的输出流
    • extract

      <E extends OutputStream> E extract(InputStream in, E out)
      解压数据
      参数:
      in - 要解缩的输入流
      out - 解压的输出流