Skip to content

Node.js http server compression helper that supports Brotli, Gzip, and deflate.

License

Notifications You must be signed in to change notification settings

nicksrandall/compression

Repository files navigation

@nicksrandall/compression

Build Status codecov

HTTP Compression library for Node.js (v10+)

Supports Brotli, Gzip, and Deflate

Example

const http = require('http');
const Compression = require('@nicksrandall/compression');
const compression = Compression({ /* optional zlib settings */ });
const server = http.createServer(compression((req, res) => {
  // your request listener
}));

server.listen(3000);

Acknowledgements

This library is basically a typescript re-write of the very popular compression library on NPM maintained by the Express.js team. I couldn't have done this without their work.

About

Node.js http server compression helper that supports Brotli, Gzip, and deflate.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors