{"library":"compression","type":"library","category":null,"description":"The `compression` package provides middleware for Node.js, primarily designed for Express applications, to automatically compress HTTP responses. It supports common compression algorithms including gzip, deflate, and brotli. The current stable version is 1.8.1. Releases occur on an as-needed basis, typically for dependency updates, minor bug fixes, or to incorporate newer Node.js features, indicating an active maintenance status rather than rapid feature development. Key differentiators include its seamless integration into the Express middleware stack, configurable compression options (like level, chunk size, and memory level), and a flexible `filter` function to control which responses are compressed. It leverages Node.js's built-in `zlib` module for compression capabilities and ensures compliance with HTTP standards by respecting `Cache-Control: no-transform` directives.","language":"javascript","status":"active","version":"1.8.1","tags":["javascript","compression","gzip","deflate","middleware","express","brotli","http","stream"],"last_verified":"Wed May 27","install":[{"cmd":"npm install compression","imports":["import compression from 'compression';","const compression = require('compression');","import type { CompressionOptions } from 'compression';"]},{"cmd":"yarn add compression","imports":[]},{"cmd":"pnpm add compression","imports":[]}],"homepage":null,"github":"https://github.com/expressjs/compression","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/compression","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/compression/compatibility"}}