Hallo,
CSS:
https://github.com/GoalSmashers/clean-css
http://goalsmashers.github.io/css-minification-benchmark/
HTML:
https://code.google.com/p/htmlcompressor/
https://github.com/kangax/html-minifier
Das sind zumeist Kommandozeilenprogramme, in JavaScript oder Java geschrieben. Sie lassen sich in übliche Build-Toolchains wie Grunt einbauen.
Letztlich sollte der Code natürlich Gzip-komprimiert übertragen werden. Das ist in der Regel eine Konfiguration des Webservers. Für nginx z.B.
http://nginx.org/en/docs/http/ngx_http_gzip_module.html
http://nginx.org/en/docs/http/ngx_http_gzip_static_module.html
Grüße
Mathias