{"_id":"@bbkkbkk/koa-compress","_rev":"3-5bb63b619dc696a6297496fc2e91ab64","name":"@bbkkbkk/koa-compress","dist-tags":{"latest":"3.1.1"},"versions":{"3.0.0":{"name":"@bbkkbkk/koa-compress","description":"Compress middleware for koa","version":"3.0.0","author":{"name":"Jonathan Ong","email":"me@jongleberry.com","url":"http://jongleberry.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/koajs/compress.git"},"dependencies":{"bytes":"^3.1.0","compressible":"^2.0.17","iltorb":"^2.4.3","koa-is-json":"^1.0.0","statuses":"^1.5.0"},"devDependencies":{"@sweet-milktea/milktea-cli":"^0.0.1","@sweet-milktea/util-tools":"^0.0.1","eslint":"^5.16.0","eslint-config-standard":"^12.0.0","eslint-plugin-import":"^2.17.3","eslint-plugin-node":"^9.1.0","eslint-plugin-promise":"^4.1.1","eslint-plugin-standard":"^4.0.0","jest":"^24.8.0","koa":"^2.7.0","supertest":"^4.0.2"},"scripts":{"eslint":"eslint --ignore-path .gitignore .","test":"jest --forceExit","update":"milktea update"},"jest":{"testEnvironment":"node"},"engines":{"node":">= 8.0.0"},"gitHead":"629c33916909cb2355743f19ffc459208ac8a4e6","bugs":{"url":"https://github.com/koajs/compress/issues"},"homepage":"https://github.com/koajs/compress#readme","_id":"@bbkkbkk/koa-compress@3.0.0","_nodeVersion":"11.9.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-Xd03T0XDbRtK7NJm+W1HzFRuwnDR0t4oeCOnOF8odHZKDKsRlH4auEb2Q0p3L/HW0ays9IRSZpVEXG/Vpty2sw==","shasum":"30b72a3d8713fa6c27fbf0452522b5b9627d8f07","tarball":"https://registry.npmjs.org/@bbkkbkk/koa-compress/-/koa-compress-3.0.0.tgz","fileCount":5,"unpackedSize":6788,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc/6CTCRA9TVsSAnZWagAA3FMP/3qvnBSTnL7KaUZFZq2C\nZVmgs/4X3a/AyZ9kvDZIvAMgyyileydcYBlmJpEouCAaIsLocFLTFAsEnXNq\nkQlXcZGyMfMX7VfUAN8FZKfvtjDS5p/P5mzY6/qjxaRHEssGgYVLXzwzC0GQ\neZdXDr16Gg5YOJmSu8kgc/jKygPmwb9r6ZEvRJNDQAsAYO3UsZAZ9sVOiFdX\nwVlg35Yeg+2zT6bH+9tWcrPeFiQaCs+06tcgpG31MVhtQLP6m9lE+NU0zRcp\nqSLvw8EYiQqbBlJcpvZsIPGXjHfCUufT8s83auKkT8u8pc7KivsUqOIP28b/\nlU8K8wYd0dbvzTD1CC0xMEJFxBE05vFHZ8V5xoVKEGxlbngyQCvLL3/3xiwJ\n664RvTm1xmS+U9c5knsFEB7+lM/mOuSrRWR7WTzV1oNSJpjjaMKUvXndPary\n1YXn9hk7jQ3sQJJHNfmImYk8z39FqLLB3oq94oSRG/cycj+u/37saIxeYlSo\nNZdpdAVWFQdWAIjZTBiYSO+zxpoLDcup9Leps8zZrvxaZSl5v/5LywzzKMRt\n1DoPzZ7BUg3climG0hJsUId9BimnjuHeE4eYeb4sM5SYFdx92Bx8fEb4qRtI\n8zZbWB+V6VtBRoDwpqm74gSvjn+mOib698OYRRChoxhYkxx1cWnN8o5RPGQP\nNnGz\r\n=ay3Y\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHmIrMcxPTBGLH8T6NTbrmYI0ta6qhcw6SgcjMscty3AAiAixif7kCphbX3AUzXr6Cyr23lm1peKYPMzFgLw1FkXVw=="}]},"maintainers":[{"name":"duan602728596","email":"duanhaochen@126.com"}],"_npmUser":{"name":"duan602728596","email":"duanhaochen@126.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/koa-compress_3.0.0_1560256658615_0.9768493072662237"},"_hasShrinkwrap":false},"3.1.0":{"name":"@bbkkbkk/koa-compress","description":"Compress middleware for koa","version":"3.1.0","author":{"name":"Jonathan Ong","email":"me@jongleberry.com","url":"http://jongleberry.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/koajs/compress.git"},"dependencies":{"bytes":"^3.1.0","compressible":"^2.0.17","koa-is-json":"^1.0.0","statuses":"^1.5.0"},"devDependencies":{"eslint":"^5.16.0","eslint-config-standard":"^12.0.0","eslint-plugin-import":"^2.17.3","eslint-plugin-node":"^9.1.0","eslint-plugin-promise":"^4.1.1","eslint-plugin-standard":"^4.0.0","jest":"^24.8.0","koa":"^2.7.0","supertest":"^4.0.2"},"peerDependencies":{"iltorb":"^2.4.4"},"scripts":{"eslint":"eslint --ignore-path .gitignore .","test":"jest --forceExit"},"jest":{"testEnvironment":"node"},"engines":{"node":">= 11.7.0"},"gitHead":"27afb6b83f829812601f0aa24ada5042ad6864ca","bugs":{"url":"https://github.com/koajs/compress/issues"},"homepage":"https://github.com/koajs/compress#readme","_id":"@bbkkbkk/koa-compress@3.1.0","_nodeVersion":"12.14.1","_npmVersion":"6.13.4","dist":{"integrity":"sha512-Qao8Tf6Q2mgKW0UmAlEwNff3evuwgzgs6hyyKRh/ue4wXJRQYj2CSPSAydd0/uZzX3z5K3AKCRPO/RN9nsEK2A==","shasum":"3a39a5e813549a5def796121145214875b42021f","tarball":"https://registry.npmjs.org/@bbkkbkk/koa-compress/-/koa-compress-3.1.0.tgz","fileCount":5,"unpackedSize":7602,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeHWTnCRA9TVsSAnZWagAARgQP/iMroaqnvKEA1t/BYxwV\nZWvXDWbNWXzggSULSk5IYZ39MERZg4lR364P+uUQO9G5NZIuDXiJUM8FpXi8\nvE87vvkiiDecRo4U2eybXK6vNlCZOI9ct3C/SMnVdJGQENq1hxjDXRMgyL+d\ng+UDIeS6NaeLgHeOADgIm0gUm0nhSLN1NyG/MtFYV24DEOMaTe8H/nMR06vZ\n9HFQMXAYrYcrhSDrg3Qr6MvWE1AAG13OdvwUgH/kB+773CEbZrGhP9O7S5Jd\naB1j3HhuLfn5lBJGoWAo428GBXeB2oooT3U8E1OCVk71JR6kPzxRGbt21ByJ\nyrCiocLUuSe5VuROr3fH8wb8qFt3eZLClMVLjnqa84BSamqPFNOBQDfVAQMB\nVG7VDfc8ii/EHMld/aOgpmv+3h7xsqDF4pcL3YpT3yaYVI6TOoCHH3A11+Hj\nbby/ObzqnNXqautGTd5n9VPCE1aMI2lh8hGBo0LeCDOJ39PYZ5Csott2tImH\nBzLIc+wBtFwEu14awUe1WpCIoNTlaM4fSQ1RhBoqh0TvtWVsW/SFfwCQ0n2T\nNUPpYOJEc4a+yZTwL7VksXOWBX4bzsfjWP9JfuxluhyDeye41iGquwPtMrXD\nzFquEb4xDPpM6ykfaRLOJE/e8Qv00i8guOPWYZuN5w29OVWjaatjnibXbSFR\nT1BU\r\n=2TTE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICBAtPnedb8VZAwmUeTzPlLRUKUEWumIPGi4+2qUUtcfAiAoUFgyrGuaP1hmM6gf8MVnMGmblM2E0JDF35EbrryhQw=="}]},"maintainers":[{"name":"duan602728596","email":"duanhaochen@126.com"}],"_npmUser":{"name":"duan602728596","email":"duanhaochen@126.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/koa-compress_3.1.0_1578984678919_0.42779976375456874"},"_hasShrinkwrap":false},"3.1.1":{"name":"@bbkkbkk/koa-compress","description":"Compress middleware for koa","version":"3.1.1","author":{"name":"Jonathan Ong","email":"me@jongleberry.com","url":"http://jongleberry.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/koajs/compress.git"},"dependencies":{"bytes":"^3.1.0","compressible":"^2.0.17","koa-is-json":"^1.0.0","statuses":"^1.5.0"},"devDependencies":{"eslint":"^5.16.0","eslint-config-standard":"^12.0.0","eslint-plugin-import":"^2.17.3","eslint-plugin-node":"^9.1.0","eslint-plugin-promise":"^4.1.1","eslint-plugin-standard":"^4.0.0","jest":"^24.8.0","koa":"^2.7.0","supertest":"^4.0.2"},"peerDependencies":{"iltorb":"^2.4.4"},"scripts":{"eslint":"eslint --ignore-path .gitignore .","test":"jest --forceExit"},"jest":{"testEnvironment":"node"},"engines":{"node":">= 11.7.0"},"gitHead":"61b1f3bc7340c59530d9053579d1c9d006b752fe","bugs":{"url":"https://github.com/koajs/compress/issues"},"homepage":"https://github.com/koajs/compress#readme","_id":"@bbkkbkk/koa-compress@3.1.1","_nodeVersion":"12.14.1","_npmVersion":"6.13.4","dist":{"integrity":"sha512-izFxaBfS8eW/l7WfnZzPsQ/seCkYlCNC95fOLoFhcQ8IHv6jbuKwLt1PQsMgbYJzSoaA7wefD6MHoNLPt7X7uA==","shasum":"dab778c7c726aeafdc6d8931ff229665c6c9f1e3","tarball":"https://registry.npmjs.org/@bbkkbkk/koa-compress/-/koa-compress-3.1.1.tgz","fileCount":5,"unpackedSize":7675,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJejBgnCRA9TVsSAnZWagAA/+cQAJa/9KxHvlvzpH4KNVm0\ne2q55Pp3roL7n9lyiINAWcaPDnVz8ACR8PU347N6C25LmWBqWsCsJkw3KJE6\nGlQLkwUN/yTiFmP7u96SSRsdFis821yocpoh9VtjDSKPLhWdKS+bvAuc6vCy\nT/sK00lAFJEn9J20/5SH3nYvne1Qf0SxmYzFBxRxsiiE93N+uycS93bxAEAG\nWD5OCrlCXP7PRju105K0ieclNtGTATu3q0UseblHuCJ+pi5t5/gp11HRXY1I\noxYkz+HVlpFilUHmWBJbW2jHxwlLGqSXgD6izEOqd0fF8KqxhIduYCxHVDr8\ns1vm4weKbjoq0BNY2TpIQrgT3vtBbChK7pD5vEaw6PAijCilwujrvh9Xk6gx\nCHjGstxTReIRJSDKVnxQ2iz+3Z5x0IDqtDKRE0sjgAZX/G45xNKGs2M0M51G\nqUNW3m/Keih3HpNMZoQ5t9Un1183aAlsg0I1C4muo9PQmwKz6xTAr+ljViSW\nAAhRDxFlfQHkJtBAIQqtxeLNBE0Fk9vIjEiih+aZAusQduMKzZJal62h/Vf9\nCglop44kylm2emlylGB1WTwaG0YoGzCBgU2uyiO2MtH0hH0PxIj8qdbyV2ZI\n6KOfwsCAk727z+q9vIJ6chbjvkjjnhGz8ZRI3STgq4uXetXhSd1xBQv94Nms\n3NAr\r\n=9oob\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH8txeesOkCNM3KtDdbn/ROOaV9Wf+lvxS1BELLxYrpEAiA5DgAOJulRTCckmLM7DzphX/kA4cT989F4TIGehx7DXw=="}]},"maintainers":[{"name":"duan602728596","email":"duanhaochen@126.com"}],"_npmUser":{"name":"duan602728596","email":"duanhaochen@126.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/koa-compress_3.1.1_1586239526423_0.8141887673872208"},"_hasShrinkwrap":false}},"time":{"created":"2019-06-11T12:37:38.409Z","3.0.0":"2019-06-11T12:37:38.785Z","modified":"2022-04-04T18:00:25.151Z","3.1.0":"2020-01-14T06:51:19.034Z","3.1.1":"2020-04-07T06:05:26.809Z"},"maintainers":[{"name":"duan602728596","email":"duanhaochen@126.com"}],"description":"Compress middleware for koa","homepage":"https://github.com/koajs/compress#readme","repository":{"type":"git","url":"git+https://github.com/koajs/compress.git"},"author":{"name":"Jonathan Ong","email":"me@jongleberry.com","url":"http://jongleberry.com"},"bugs":{"url":"https://github.com/koajs/compress/issues"},"license":"MIT","readme":"# Koa Compress\n\n[![Build Status](https://travis-ci.org/koajs/compress.svg?branch=master)](https://travis-ci.org/koajs/compress)\n[![codecov](https://codecov.io/gh/koajs/compress/branch/master/graph/badge.svg)](https://codecov.io/gh/koajs/compress)\n[![Greenkeeper badge](https://badges.greenkeeper.io/koajs/compress.svg)](https://greenkeeper.io/)\n\nCompress middleware for Koa\n\n> forked from [koa-compress](https://github.com/koajs/compress), support brotli compression.\n\n## Example\n\n```js\nvar compress = require('koa-compress')\nvar Koa = require('koa')\n\nvar app = new Koa()\napp.use(compress(\n  /* compress Options(gzip) */\n  {\n    filter: function (content_type) {\n  \t  return /text/i.test(content_type)\n    },\n    threshold: 2048,\n    flush: require('zlib').Z_SYNC_FLUSH\n  },\n  /* brOptions */\n  { iltorb: true }\n))\n```\n\n## brOptions\n\niltorb: Replace `zlib` with `iltorb` module for br compression (The iltorb module is faster than zlib compression).\nYou must download the `iltorb` module yourself.   \n\nIf you use the `zlib` module: https://nodejs.org/api/zlib.html#zlib_class_brotlioptions   \n\nIf you use the `iltorb` module: https://github.com/nstepien/iltorb\n\n## Options\n\nThe options are passed to `zlib`: https://nodejs.org/api/zlib.html#zlib_class_optionsz\n\n### filter\n\nAn optional function that checks the response content type to decide whether to compress.\nBy default, it uses [compressible](https://github.com/expressjs/compressible).\n\n### threshold\n\nMinimum response size in bytes to compress.\nDefault `1024` bytes or `1kb`.\n\n## Manually turning compression on and off\n\nYou can always enable compression by setting `this.compress = true`.\nYou can always disable compression by setting `this.compress = false`.\nThis bypasses the filter check.\n\n```js\napp.use((ctx, next) => {\n  ctx.compress = true\n  ctx.body = fs.createReadStream(file)\n})\n```\n","readmeFilename":"README.md"}