Add compression function for main.js

Add compression function for main.js