make action be command line parameter
remove redundant compress function, use library