Even if you're not using express, you can still use their middleware. The compression module is what I'm using:
var http = require('http')
var fs = require('fs')
var compress = require("compression")
http.createServer(function(request, response) {
var noop = function(){}, useDefaultOptions = {}
compress(useDefaultOptions)(request,response,noop) // mutates the response object
response.writeHead(200)
fs.createReadStream('index.html').pipe(response)
}).listen(1337)