日期:2014-05-16  浏览次数:20382 次

js简单压缩记录下
InputStreamReader in = new InputStreamReader(new FileInputStream(fe), "utf-8");
JavaScriptCompressor  jsc= new  JavaScriptCompressor(in,null);
OutputStreamWriter out = new OutputStreamWriter(new FileOutputStream(compressedFileName), "utf-8");
//out 压缩后的代码输出到哪里、linebreak 在第几行后面输入一个空行、munge 对代码混淆、verbose 打印详细过程、preserveAllSemiColons 保留所有分号、disableOptimizations 关闭局部优化
jsc.compress(out, -1, true, false, true, true);