Deflaterクラスで圧縮した情報を格納したbyte[] inputを引数として受け取って
Inflaterクラスで解凍し、Stringとして返す関数を作っているのですが
Inflater.inflateメソッドで解凍された情報を確保する為のbyte配列(byte []result)は
あらかじめ適当なサイズで初期化して確保しておくしかないのでしょうか?
できれば動的にサイズを確保したいのですが・・・。
以下が現在のソースです。

final int maxBufSize = 100000;
public String decompressString(byte[] input)
{
 //Decompress the bytes
 Inflater inf = new Inflater();
 inf.setInput(input);
 byte[] result = new byte[maxBufSize];
 int resultLength;
 try{
  resultLength = inf.inflate(result);
 }catch(Exception e){
  return null; }
 inf.end();

 //Decode the bytes into a String
 String outputString;
 try{
  outputString = new String(result,0,resultLength,"UTF-8");
 }catch(Exception e){
  return null; }

 return outputString;
}