gpt4 book ai didi

com.jcraft.jzlib.ZStream.inflate()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-15 15:34:40 24 4
gpt4 key购买 nike

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

ZStream.inflate介绍

暂无

代码示例

代码示例来源:origin: com.sshtools/maverick-common

public byte[] uncompress(byte[] buffer, int start, int length) throws IOException {

//    int inflated_end = 0;
  uncompressOut.reset();

  stream.next_in = buffer;
  stream.next_in_index = start;
  stream.avail_in = length;

  while(true) {
   stream.next_out = inflated_buf;
   stream.next_out_index = 0;
   stream.avail_out = BUF_SIZE;
   int status = stream.inflate(JZlib.Z_PARTIAL_FLUSH);
   switch(status) {
    case JZlib.Z_OK:
     uncompressOut.write(inflated_buf, 0, BUF_SIZE - stream.avail_out);
     break;
    case JZlib.Z_BUF_ERROR:
     return uncompressOut.toByteArray();
    default:
     throw new IOException("uncompress: inflate returnd " + status);
   }
  }
 }

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.jsch

stream.next_out_index=0;
stream.avail_out=BUF_SIZE;
int status=stream.inflate(JZlib.Z_PARTIAL_FLUSH);
switch(status){
 case JZlib.Z_OK:

代码示例来源:origin: gridkit/nanocloud

stream.next_out_index=0;
stream.avail_out=BUF_SIZE;
int status=stream.inflate(JZlib.Z_PARTIAL_FLUSH);
switch(status){
 case JZlib.Z_OK:

代码示例来源:origin: vngx/vngx-jsch

_zstream.next_out_index = 0;
_zstream.avail_out = BUF_SIZE;
status = _zstream.inflate(JZlib.Z_PARTIAL_FLUSH);
switch( status ) {
  case JZlib.Z_OK:

代码示例来源:origin: org.gridkit.lab/telecontrol-ssh

stream.next_out_index=0;
stream.avail_out=BUF_SIZE;
int status=stream.inflate(JZlib.Z_PARTIAL_FLUSH);
switch(status){
 case JZlib.Z_OK:

代码示例来源:origin: org.mule.jsch/jsch

stream.next_out_index=0;
stream.avail_out=BUF_SIZE;
int status=stream.inflate(JZlib.Z_PARTIAL_FLUSH);
switch(status){
 case JZlib.Z_OK:

代码示例来源:origin: is/jsch

stream.next_out_index=0;
stream.avail_out=BUF_SIZE;
int status=stream.inflate(JZlib.Z_PARTIAL_FLUSH);
switch(status){
 case JZlib.Z_OK:

代码示例来源:origin: com.jcraft.jzlib/com.springsource.com.jcraft.jzlib

public void write(byte b[], int off, int len) throws IOException {
 if(len==0)
  return;
 int err;
 z.next_in=b;
 z.next_in_index=off;
 z.avail_in=len;
 do{
  z.next_out=buf;
  z.next_out_index=0;
  z.avail_out=bufsize;
  if(compress)
   err=z.deflate(flush);
  else
   err=z.inflate(flush);
  if(err!=JZlib.Z_OK)
   throw new ZStreamException((compress?"de":"in")+"flating: "+z.msg);
  out.write(buf, 0, bufsize-z.avail_out);
 } 
 while(z.avail_in>0 || z.avail_out==0);
}

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

public void write(byte b[], int off, int len) throws IOException {
 if(len==0)
  return;
 int err;
 z.next_in=b;
 z.next_in_index=off;
 z.avail_in=len;
 do{
  z.next_out=buf;
  z.next_out_index=0;
  z.avail_out=bufsize;
  if(compress)
   err=z.deflate(flush);
  else
   err=z.inflate(flush);
  if(err!=JZlib.Z_OK)
   throw new ZStreamException((compress?"de":"in")+"flating: "+z.msg);
  out.write(buf, 0, bufsize-z.avail_out);
 } 
 while(z.avail_in>0 || z.avail_out==0);
}

代码示例来源:origin: google/sagetv

public void write(byte b[], int off, int len) throws IOException {
 if(len==0)
  return;
 int err;
 z.next_in=b;
 z.next_in_index=off;
 z.avail_in=len;
 do{
  z.next_out=buf;
  z.next_out_index=0;
  z.avail_out=bufsize;
  if(compress)
   err=z.deflate(flush);
  else
   err=z.inflate(flush);
  if(err!=JZlib.Z_OK)
   throw new ZStreamException((compress?"de":"in")+"flating: "+z.msg);
  out.write(buf, 0, bufsize-z.avail_out);
 } 
 while(z.avail_in>0 || z.avail_out==0);
}

代码示例来源:origin: com.jcraft.jzlib/com.springsource.com.jcraft.jzlib

err=z.deflate(flush);
 else
err=z.inflate(flush);
 if(nomoreinput&&(err==JZlib.Z_BUF_ERROR))
  return(-1);

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

err=z.deflate(flush);
 else
err=z.inflate(flush);
 if(nomoreinput&&(err==JZlib.Z_BUF_ERROR))
  return(-1);

代码示例来源:origin: google/sagetv

err=z.deflate(flush);
 else
err=z.inflate(flush);
 if(nomoreinput&&(err==JZlib.Z_BUF_ERROR))
  return(-1);

代码示例来源:origin: com.jcraft.jzlib/com.springsource.com.jcraft.jzlib

public void finish() throws IOException {
 int err;
 do{
  z.next_out=buf;
  z.next_out_index=0;
  z.avail_out=bufsize;
  if(compress){ err=z.deflate(JZlib.Z_FINISH);  }
  else{ err=z.inflate(JZlib.Z_FINISH); }
  if(err!=JZlib.Z_STREAM_END && err != JZlib.Z_OK)
  throw new ZStreamException((compress?"de":"in")+"flating: "+z.msg);
  if(bufsize-z.avail_out>0){
 out.write(buf, 0, bufsize-z.avail_out);
  }
 }
 while(z.avail_in>0 || z.avail_out==0);
 flush();
}
public void end() {

代码示例来源:origin: google/sagetv

public void finish() throws IOException {
 int err;
 do{
  z.next_out=buf;
  z.next_out_index=0;
  z.avail_out=bufsize;
  if(compress){ err=z.deflate(JZlib.Z_FINISH);  }
  else{ err=z.inflate(JZlib.Z_FINISH); }
  if(err!=JZlib.Z_STREAM_END && err != JZlib.Z_OK)
  throw new ZStreamException((compress?"de":"in")+"flating: "+z.msg);
  if(bufsize-z.avail_out>0){
 out.write(buf, 0, bufsize-z.avail_out);
  }
 }
 while(z.avail_in>0 || z.avail_out==0);
 flush();
}
public void end() {

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

public void finish() throws IOException {
 int err;
 do{
  z.next_out=buf;
  z.next_out_index=0;
  z.avail_out=bufsize;
  if(compress){ err=z.deflate(JZlib.Z_FINISH);  }
  else{ err=z.inflate(JZlib.Z_FINISH); }
  if(err!=JZlib.Z_STREAM_END && err != JZlib.Z_OK)
  throw new ZStreamException((compress?"de":"in")+"flating: "+z.msg);
  if(bufsize-z.avail_out>0){
 out.write(buf, 0, bufsize-z.avail_out);
  }
 }
 while(z.avail_in>0 || z.avail_out==0);
 try { flush(); } 
 catch (IOException ignored) {
 }
}
public void end() throws IOException {

代码示例来源:origin: com.synaptix/SynaptixServer

retval = zStream.inflate(JZlib.Z_SYNC_FLUSH);
switch (retval) {
case JZlib.Z_OK:

代码示例来源:origin: org.apache.mina/mina-filter-compression

retval = zStream.inflate(JZlib.Z_SYNC_FLUSH);
switch (retval) {
case JZlib.Z_OK:

代码示例来源:origin: net.schmizz/sshj

@Override
public void uncompress(Buffer from, Buffer to)
    throws TransportException {
  stream.next_in = from.array();
  stream.next_in_index = from.rpos();
  stream.avail_in = from.available();
  while (true) {
    stream.next_out = tempBuf;
    stream.next_out_index = 0;
    stream.avail_out = BUF_SIZE;
    final int status = stream.inflate(JZlib.Z_PARTIAL_FLUSH);
    switch (status) {
      case JZlib.Z_OK:
        to.putRawBytes(tempBuf, 0, BUF_SIZE - stream.avail_out);
        break;
      case JZlib.Z_BUF_ERROR:
        return;
      default:
        throw new TransportException(DisconnectReason.COMPRESSION_ERROR, "uncompress: inflate returned "
            + status);
    }
  }
}

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com