Hi,

I'm sorry to say that the compression library you provided (http://www.jcraft.com/jsch/jsch-0.1.45-deflate2.zip) could not resolve the error. I just want to ask if you find a solution for the issue?

------
Vu Linh

From: Atsuhiko Yamanaka <ymnk@jcraft.com>
To: vlsuperman2003@yahoo.com
Cc: xiaoj@us.ibm.com; jsch-users@lists.sourceforge.net; dengstro@us.ibm.com
Sent: Wednesday, February 16, 2011 9:17 AM
Subject: Re: [JSch-users] put large binary file with compression cause java.lang.ArrayIndexOutOfBoundsException, slow performance when doing get with compression

Hi,

  +-From: Nguyen Tran Vu Linh <vlsuperman2003@yahoo.com> --
  |_Date: Mon, 14 Feb 2011 23:31:35 -0800 (PST) ___________
  |
  |Thank you for your update, I got the same exception as Xiao.
  |In my case, file type is .pgp and its size >=100KBs with compression
  |enabled.
  |I downloaded http://www.jcraft.com/jsch/jsch-0.1.45-deflate.zip and
  |apply to my application but exception still occurs.

Thanks to some file sent from Nguyen directly to me,
I could reproduce that problem.  Please try
  http://www.jcraft.com/jsch/jsch-0.1.45-deflate2.zip

I guess that the problem will happen in sending deflated(compressed) data
with the packet compression.

You know that the deflation for deflated data will usually inflate data,
and jsch had not cared for such a case.

In debugging this problem, we have found some bug in JZlib in such situations.
It will not cause the exception, and break data implicitly.
So we suggest you to stop the packet compress mode for a while.
We will working on it.

FYI, you can enable/disable the packet compression dynamically,

    session.connect();
    ...
    session.setConfig("compression.s2c", "none");
    session.setConfig("compression.c2s", "none");
    session.reky()
    ...
    session.setConfig("compression.s2c", "zlib@openssh.com");
    session.setConfig("compression.c2s", "zlib@openssh.com");
    session.reky()


Sincerely,
--
Atsuhiko Yamanaka
JCraft,Inc.
1-14-20 HONCHO AOBA-KU,
SENDAI, MIYAGI 980-0014 Japan.
Tel +81-22-723-2150
    +1-415-578-3454
Skype callto://jcraft/
Twitter: http://twitter.com/ymnk