title: Closure Compiler options
body: <p>I want to use Closure Compiler to minify/compress JS code.</p>
  
  <p>the problem is that it doesn't minify as well as I expect it to.  consider the code below.  when I pass the string </p>
  
  <pre><code>var func = function ( someArgument ) {
    alert ( someArgument ); 
    return someArgument; 
  }
  </code></pre>
  
  <p>I expect the minified code to rename "someArgument" to something much shorter, like "a".</p>
  
  <p>is that the way it is or am I doing something wrong?  TIA</p>
  
  <pre><code>public static void Compress( String src ) {
  
      ByteArrayOutputStream err = new ByteArrayOutputStream();
  
      CompilerOptions opt = new CompilerOptions();
  
      CompilationLevel.ADVANCED_OPTIMIZATIONS.setDebugOptionsForCompilationLevel( opt );
  
      Compiler.setLoggingLevel( Level.OFF );
      Compiler compiler = new Compiler( new PrintStream( err ) );
      compiler.disableThreads();
  
      List&lt;SourceFile&gt; externs = Collections.emptyList();
      List&lt;SourceFile&gt; inputs = Arrays.asList( SourceFile.fromCode( "javascript-code.js", src) );
  
      Result result = compiler.compile( externs, inputs, opt );
  
      System.out.println( "source: " + compiler.toSource() );
  }
  </code></pre>