Example #1
0
 @JRubyMethod(name = "deflate", required = 1, optional = 1, meta = true)
 public static IRubyObject s_deflate(IRubyObject recv, IRubyObject[] args) throws Exception {
   args = Arity.scanArgs(recv.getRuntime(), args, 1, 1);
   int level = -1;
   if (!args[1].isNil()) {
     level = RubyNumeric.fix2int(args[1]);
   }
   return ZlibDeflate.s_deflate(recv, args[0].convertToString().getByteList(), level);
 }