Add compression function for main.js