Add gzip support
Opened this issue · 4 comments
deelowe commented
I love this module, but unfortunately, there's no good way to add zlib support without rewriting it. Would it be possible to add zlib support at some point in the future?
mikeal commented
i'd take a patch, i'll need it eventually and write it myself :)
deelowe commented
Shouldn't be too hard. I'll see what I can do. :-)
Deleted user commented
If #25 gets pulled then you can just pipe the filed stream to
oppressor like this:
var oppressor = require('oppressor');
var filed = require('filed');
var http = require('http');
var server = http.createServer(function (req, res) {
filed(__dirname + '/data.txt')
.pipe(oppressor(req))
.pipe(res)
;
});
server.listen(8000);
Letting other libraries like oppressor handle compression is pretty much what pipes should be all about.
kurteknikk commented
Any updates on this request ?