1 4 5 9 10 package org.openlaszlo.test; 11 12 import java.io.*; 13 import org.openlaszlo.utils.FileUtils; 14 15 public class gzip { 16 static public void main (String args[]) { 17 try { 18 File src = new File (args[0]); 19 String out = args[0] + ".gz"; 20 File dest = new File (out); 21 long then = System.currentTimeMillis(); 22 FileUtils.encode(src, dest, "gzip"); 23 long now = System.currentTimeMillis(); 24 System.out.println("wrote " + out + " in " + (now - then) + " msecs"); 25 } catch (Exception e) { 26 e.printStackTrace(); 27 } 28 } 29 } 30 | Popular Tags |