Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add gzip support #18

Open
deelowe opened this issue May 12, 2012 · 4 comments
Open

Add gzip support #18

deelowe opened this issue May 12, 2012 · 4 comments

Comments

@deelowe
Copy link

deelowe commented May 12, 2012

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
Copy link
Owner

mikeal commented May 12, 2012

i'd take a patch, i'll need it eventually and write it myself :)

@deelowe
Copy link
Author

deelowe commented May 12, 2012

Shouldn't be too hard. I'll see what I can do. :-)

@ghost
Copy link

ghost commented Aug 28, 2012

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
Copy link

Any updates on this request ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants