Serve: gzip support

Created on 28 Jul 2016  路  3Comments  路  Source: vercel/serve

It would be interesting if it had support gzip compression -z, --gzip
I consider useful for purposes of comparison with the size in production

Most helpful comment

@leo @joakimbeng as far as I understand responses are compressed live.

This works but is not performant for static assets, because a frequently accessed asset would likely get recompressed everytime while it would probably be more efficient to memoize that compression per file.

All 3 comments

I needed this for another Micro microservice as well so I made micro-compress which should be easy to integrate into this module...

@joakimbeng Perfect! Also looks like a great addition to this list.

@leo @joakimbeng as far as I understand responses are compressed live.

This works but is not performant for static assets, because a frequently accessed asset would likely get recompressed everytime while it would probably be more efficient to memoize that compression per file.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Mugen87 picture Mugen87  路  3Comments

leo picture leo  路  5Comments

xiyuyizhi picture xiyuyizhi  路  5Comments

Olexiy665 picture Olexiy665  路  3Comments

Simran-B picture Simran-B  路  4Comments