This can be done on your development machine and you then transfer the files to your production environment. Or you let your production environment gzip the dynamic files on the fly just before they get delivered to the client. Apache as well as Nginx can do this for you. Apache uses the mod deflate module, Nginx has a module that is called HttpGzipModule. Gzipped html pages for example can be transferred a lot faster from server to the client.