{"library":"micro-compress","title":"micro-compress","description":"Middleware to add gzip/brotli compression to HTTP microservices built with the Micro framework (from ZEIT/Now). Version 1.0.0 is stable and wraps the popular compression npm package, passing all options through. It is designed specifically for Micro's async request handler pattern, not Express or other frameworks. The package is minimal (no dependencies beyond compression and micro) and follows the same promise-based flow as Micro itself. It is released under MIT license and has not seen updates since 2017, indicating maintenance status.","language":"javascript","status":"maintenance","last_verified":"Sat Apr 25","install":{"commands":["npm install micro-compress"],"cli":null},"imports":["const compress = require('micro-compress');","const compress = require('micro-compress');\nmodule.exports = compress({ level: 9 }, handler);","import compress = require('micro-compress');"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"const { send, json } = require('micro');\nconst compress = require('micro-compress');\nconst handler = async (req, res) => {\n  const body = await json(req);\n  send(res, 200, body);\n};\nmodule.exports = compress(handler);","lang":"javascript","description":"Wraps a Micro request handler with compression middleware. The handler remains async, and the response is gzip-compressed if accepted.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}