if (level == -1) level = Deflater.DEFAULT_COMPRESSION;
Deflater deflater = new Deflater(level, true);
  public Value gzdeflate(InputStream is,                         @Optional("-1") int level)   throws DataFormatException, IOException  {    if (level == -1)      level = Deflater.DEFAULT_COMPRESSION;    TempStream ts = new TempStream();    OutputStream os = new StreamImplOutputStream(ts);    //Deflater deflater = new Deflater(level, true);    //DeflaterOutputStream out = new DeflaterOutputStream(os, deflater);    DeflaterOutputStream out = new DeflaterOutputStream(os);    TempBuffer temp = TempBuffer.allocate();    byte []buf = temp.getBuffer();    int len;    while ((len = is.read(buf, 0, buf.length)) > 0) {      out.write(buf, 0, len);    }    out.close();    TempBuffer.free(temp);    return new TempBufferStringValue(ts.getHead());  }