Express 3.0 now has compress() support:
var app = express();
// gzip
app.use(express.compress());
// static
app.use("/public", express.static(__dirname + '/public'));
// listen
app.listen(80);
EDIT
for Express 4.0, compress become the separate middleware. So you have to install and import to use it:
var compress = require('compression');
app.use(compress());
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…