- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中com.jcraft.jzlib.ZStream.deflate()
方法的一些代码示例,展示了ZStream.deflate()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZStream.deflate()
方法的具体详情如下:
包路径:com.jcraft.jzlib.ZStream
类名称:ZStream
方法名:deflate
暂无
代码示例来源:origin: com.jcraft/jzlib
int deflateParams(int _level, int _strategy){
int err=Z_OK;
if(_level == Z_DEFAULT_COMPRESSION){
_level = 6;
}
if(_level < 0 || _level > 9 ||
_strategy < 0 || _strategy > Z_HUFFMAN_ONLY) {
return Z_STREAM_ERROR;
}
if(config_table[level].func!=config_table[_level].func &&
strm.total_in != 0) {
// Flush the last buffer:
err = strm.deflate(Z_PARTIAL_FLUSH);
}
if(level != _level) {
level = _level;
max_lazy_match = config_table[level].max_lazy;
good_match = config_table[level].good_length;
nice_match = config_table[level].nice_length;
max_chain_length = config_table[level].max_chain;
}
strategy = _strategy;
return err;
}
代码示例来源:origin: google/sagetv
int deflateParams(ZStream strm, int _level, int _strategy){
int err=Z_OK;
if(_level == Z_DEFAULT_COMPRESSION){
_level = 6;
}
if(_level < 0 || _level > 9 ||
_strategy < 0 || _strategy > Z_HUFFMAN_ONLY) {
return Z_STREAM_ERROR;
}
if(config_table[level].func!=config_table[_level].func &&
strm.total_in != 0) {
// Flush the last buffer:
err = strm.deflate(Z_PARTIAL_FLUSH);
}
if(level != _level) {
level = _level;
max_lazy_match = config_table[level].max_lazy;
good_match = config_table[level].good_length;
nice_match = config_table[level].nice_length;
max_chain_length = config_table[level].max_chain;
}
strategy = _strategy;
return err;
}
代码示例来源:origin: ymnk/jzlib
int deflateParams(int _level, int _strategy){
int err=Z_OK;
if(_level == Z_DEFAULT_COMPRESSION){
_level = 6;
}
if(_level < 0 || _level > 9 ||
_strategy < 0 || _strategy > Z_HUFFMAN_ONLY) {
return Z_STREAM_ERROR;
}
if(config_table[level].func!=config_table[_level].func &&
strm.total_in != 0) {
// Flush the last buffer:
err = strm.deflate(Z_PARTIAL_FLUSH);
}
if(level != _level) {
level = _level;
max_lazy_match = config_table[level].max_lazy;
good_match = config_table[level].good_length;
nice_match = config_table[level].nice_length;
max_chain_length = config_table[level].max_chain;
}
strategy = _strategy;
return err;
}
代码示例来源:origin: jzlib/jzlib
int deflateParams(ZStream strm, int _level, int _strategy){
int err=Z_OK;
if(_level == Z_DEFAULT_COMPRESSION){
_level = 6;
}
if(_level < 0 || _level > 9 ||
_strategy < 0 || _strategy > Z_HUFFMAN_ONLY) {
return Z_STREAM_ERROR;
}
if(config_table[level].func!=config_table[_level].func &&
strm.total_in != 0) {
// Flush the last buffer:
err = strm.deflate(Z_PARTIAL_FLUSH);
}
if(level != _level) {
level = _level;
max_lazy_match = config_table[level].max_lazy;
good_match = config_table[level].good_length;
nice_match = config_table[level].nice_length;
max_chain_length = config_table[level].max_chain;
}
strategy = _strategy;
return err;
}
代码示例来源:origin: com.jcraft.jzlib/com.springsource.com.jcraft.jzlib
int deflateParams(ZStream strm, int _level, int _strategy){
int err=Z_OK;
if(_level == Z_DEFAULT_COMPRESSION){
_level = 6;
}
if(_level < 0 || _level > 9 ||
_strategy < 0 || _strategy > Z_HUFFMAN_ONLY) {
return Z_STREAM_ERROR;
}
if(config_table[level].func!=config_table[_level].func &&
strm.total_in != 0) {
// Flush the last buffer:
err = strm.deflate(Z_PARTIAL_FLUSH);
}
if(level != _level) {
level = _level;
max_lazy_match = config_table[level].max_lazy;
good_match = config_table[level].good_length;
nice_match = config_table[level].nice_length;
max_chain_length = config_table[level].max_chain;
}
strategy = _strategy;
return err;
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.jzlib
int deflateParams(int _level, int _strategy){
int err=Z_OK;
if(_level == Z_DEFAULT_COMPRESSION){
_level = 6;
}
if(_level < 0 || _level > 9 ||
_strategy < 0 || _strategy > Z_HUFFMAN_ONLY) {
return Z_STREAM_ERROR;
}
if(config_table[level].func!=config_table[_level].func &&
strm.total_in != 0) {
// Flush the last buffer:
err = strm.deflate(Z_PARTIAL_FLUSH);
}
if(level != _level) {
level = _level;
max_lazy_match = config_table[level].max_lazy;
good_match = config_table[level].good_length;
nice_match = config_table[level].nice_length;
max_chain_length = config_table[level].max_chain;
}
strategy = _strategy;
return err;
}
代码示例来源:origin: vngx/vngx-jsch
@Override
public int compress(byte[] buffer, int offset, int length) {
_zstream.next_in = buffer;
_zstream.next_in_index = offset;
_zstream.avail_in = length - offset;
int status, outputLen = offset;
do {
_zstream.next_out = _tmp;
_zstream.next_out_index = 0;
_zstream.avail_out = BUF_SIZE;
status = _zstream.deflate(JZlib.Z_PARTIAL_FLUSH);
switch( status ) {
case JZlib.Z_OK:
System.arraycopy(_tmp, 0, buffer, outputLen, BUF_SIZE - _zstream.avail_out);
outputLen += (BUF_SIZE - _zstream.avail_out);
break;
default:
// TODO Error handling?
System.err.println("compress: deflate returned " + status);
}
} while( _zstream.avail_out == 0 );
return outputLen;
}
代码示例来源:origin: com.sshtools/maverick-common
public byte[] compress(byte[] buf, int start, int len) throws IOException {
compressOut.reset();
stream.next_in = buf;
stream.next_in_index = start;
stream.avail_in = len - start;
int status;
do {
stream.next_out = tmpbuf;
stream.next_out_index = 0;
stream.avail_out = BUF_SIZE;
status = stream.deflate(JZlib.Z_PARTIAL_FLUSH);
switch(status) {
case JZlib.Z_OK:
compressOut.write(tmpbuf, 0, BUF_SIZE - stream.avail_out);
break;
default:
throw new IOException("compress: deflate returnd " + status);
}
}
while(stream.avail_out == 0);
return compressOut.toByteArray();
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.jsch
stream.next_out_index=0;
stream.avail_out=BUF_SIZE;
status=stream.deflate(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;
status=stream.deflate(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);
代码示例来源:origin: jzlib/jzlib
err=z.deflate(flush);
else
err=z.inflate(flush);
代码示例来源:origin: google/sagetv
err=z.deflate(flush);
else
err=z.inflate(flush);
代码示例来源: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: net.schmizz/sshj
@Override
public void compress(Buffer buffer) {
stream.next_in = buffer.array();
stream.next_in_index = buffer.rpos();
stream.avail_in = buffer.available();
buffer.wpos(buffer.rpos());
do {
stream.next_out = tempBuf;
stream.next_out_index = 0;
stream.avail_out = BUF_SIZE;
final int status = stream.deflate(JZlib.Z_PARTIAL_FLUSH);
if (status == JZlib.Z_OK) {
buffer.putRawBytes(tempBuf, 0, BUF_SIZE - stream.avail_out);
} else {
throw new SSHRuntimeException("compress: deflate returned " + status);
}
} while (stream.avail_out == 0);
}
GerritTrigger插件以前工作得很好,但从一个我无法确定的时间点来看,连接永远无法建立,错误消息如下:。Gerit触发器版本:2.39.0。SSH密钥是通过ssh-keygen生成的。我注意到
我正在尝试连接到我的一个 unix 服务器,但由于上述错误而失败,请有人帮忙。 JSch jsch = new JSch(); java.util.Properties configuration =
本文整理了Java中com.jcraft.jzlib.ZOutputStream类的一些代码示例,展示了ZOutputStream类的具体用法。这些代码示例主要来源于Github/Stackoverf
本文整理了Java中com.jcraft.jzlib.ZStream类的一些代码示例,展示了ZStream类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台
我最近尝试了 ssh lib jsch。我尝试了此处找到的示例: http://www.jcraft.com/jsch/examples/ScpTo.java 有没有办法以编程方式进行身份验证,而不是
我们正在使用 JCraft/Jsch 进行 sftp 文件传输。 http://www.jcraft.com/jsch 多年来,这在 Java6 和 Java 7 中运行良好。但后来我们升级到 Jav
我在 Linux 机器上运行一个使用 jcraft.jsch 库连接到外部 sftp 服务器的 Java 程序。代码如下: JSch jsch = new JSch(); Session sessio
在基于 JCraft 的 SFTP 通信中,我的项目使用 JSch 库建立。它运行良好,但我的疑问是为什么我们必须像下面这样共享私钥? JSch jsch=new JSch(); jsch.addId
本文整理了Java中com.jcraft.jzlib.ZOutputStream.write()方法的一些代码示例,展示了ZOutputStream.write()的具体用法。这些代码示例主要来源于G
本文整理了Java中com.jcraft.jzlib.ZOutputStream.setFlushMode()方法的一些代码示例,展示了ZOutputStream.setFlushMode()的具体用
本文整理了Java中com.jcraft.jzlib.ZOutputStream.()方法的一些代码示例,展示了ZOutputStream.()的具体用法。这些代码示例主要来源于Github/Stac
本文整理了Java中com.jcraft.jzlib.ZOutputStream.finish()方法的一些代码示例,展示了ZOutputStream.finish()的具体用法。这些代码示例主要来源
本文整理了Java中com.jcraft.jzlib.ZOutputStream.flush()方法的一些代码示例,展示了ZOutputStream.flush()的具体用法。这些代码示例主要来源于G
本文整理了Java中com.jcraft.jzlib.ZOutputStream.end()方法的一些代码示例,展示了ZOutputStream.end()的具体用法。这些代码示例主要来源于Githu
本文整理了Java中com.jcraft.jzlib.ZStream.free()方法的一些代码示例,展示了ZStream.free()的具体用法。这些代码示例主要来源于Github/Stackove
本文整理了Java中com.jcraft.jzlib.ZStream.inflate()方法的一些代码示例,展示了ZStream.inflate()的具体用法。这些代码示例主要来源于Github/St
本文整理了Java中com.jcraft.jzlib.ZStream.deflateInit()方法的一些代码示例,展示了ZStream.deflateInit()的具体用法。这些代码示例主要来源于G
本文整理了Java中com.jcraft.jzlib.ZStream.inflateEnd()方法的一些代码示例,展示了ZStream.inflateEnd()的具体用法。这些代码示例主要来源于Git
本文整理了Java中com.jcraft.jzlib.ZStream.setInput()方法的一些代码示例,展示了ZStream.setInput()的具体用法。这些代码示例主要来源于Github/
本文整理了Java中com.jcraft.jzlib.ZStream.setOutput()方法的一些代码示例,展示了ZStream.setOutput()的具体用法。这些代码示例主要来源于Githu
我是一名优秀的程序员,十分优秀!