{"name":"brotli","version":"1.3.3","description":"A port of the Brotli compression algorithm as used in WOFF2","main":"index.js","repository":{"type":"git","url":"git+https://github.com/devongovett/brotli.js.git"},"keywords":["compress","decompress","encode","decode"],"author":{"name":"Devon Govett","email":"devongovett@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/devongovett/brotli.js/issues"},"homepage":"https://github.com/devongovett/brotli.js","dependencies":{"base64-js":"^1.1.2"},"devDependencies":{"mocha":"^2.2.1"},"browser":{"./dec/dictionary-data.js":"./dec/dictionary-browser.js"},"scripts":{"test":"mocha","prepublish":"make"},"gitHead":"e36051345f6d27a56e5f39ea70d2f789b8574046","_id":"brotli@1.3.3","_nodeVersion":"16.15.0","_npmVersion":"8.5.5","dist":{"integrity":"sha512-oTKjJdShmDuGW94SyyaoQvAjf30dZaHnjJ8uAF+u2/vGJkJbJPJAT1gDiOJP5v1Zb6f9KEyW/1HpuaWIXtGHPg==","shasum":"7365d8cc00f12cf765d2b2c898716bcf4b604d48","tarball":"http://registry-npm.ywwl.com/brotli/download/brotli-1.3.3.tgz","fileCount":19,"unpackedSize":1503586,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDh4al/LBJxyZTKC5ZAlvdZuNAnmhryVs+1aX4F0ZRXNAIgZlH355V9f8Aa5JylHSzTJkwpkZsVr2dRtgoEaci8qKw="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJioD1cACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp7qxAAjG+mMkjI+JYGZGKJ63BXhNia69ciFW1O/6n8gejtyKkvkM1k\r\n8ny3+hMeJmnF2dLinwkE5ZoSJcjx2Sa3KjMoEvhIBzukcfD2947ihWNENry9\r\nrqdxOXezySAtxtAkbS4yw/5Dmb/d+9AoenzMsgABVLVNJHX4TaM9voQB3f0X\r\nrK7AIATg4iS2vQwT1n86yjP/tobQx8BaofabrUk/8dWs6g1oaI1dcwDZTpQy\r\nQI4L7SO6sxyxh13UhFHSrr+MPV2PMGWJg5kCd2OKmCF1U9omtOXlj5Evh9Hk\r\nYcLT/5fh7mN3W1nN6VvN5tNV1Y0lnSVXCO3crxVeTPgGZSVNsw9yJeMOfqMn\r\nVH3oWqNNDbEw5trVupxct81eJKwpi+b2jjOWivHyIAGOqwvCKEsq0caDxPYR\r\nFQPGj5URNbsKdN/CiQ28CSjLzK8hzi+zFsQCOWI8szPQhyfw4nC672gYi2fL\r\n3RC2VyMOcbSPOBaqrcdEmGwGaJKxXw7+W0/bGmpOYg8apoHoBtc1R/W+M3VT\r\nSOdbIngXkfTi6F2horVq2pRwx7Ei61NEOy4kC6dumUeO6ZlYMsmIKVhWgV8x\r\nwYqfZn3mWdE29g2lrg9SwklEKGTU2ZgLnu9OwlgrGMFGO6EkSR2hlRzqVLat\r\naBAK2IR+yFE0MpoZu1EcUSFHst15p4t7yoI=\r\n=l9Ef\r\n-----END PGP SIGNATURE-----\r\n","size":416657,"noattachment":false,"key":"/brotli/-/brotli-1.3.3.tgz"},"_npmUser":{"name":"devongovett","email":"devongovett@gmail.com"},"directories":{},"maintainers":[{"name":"devongovett","email":"devongovett@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brotli_1.3.3_1654668636143_0.8117438266432813"},"_hasShrinkwrap":false,"readme":"# Brotli.js\n\nBrotli.js is port of the [Brotli](http://tools.ietf.org/html/draft-alakuijala-brotli-01) compression algorithm (as used in the [WOFF2](http://www.w3.org/TR/WOFF2/) font format) to JavaScript. The decompressor is hand ported, and the compressor is ported\nwith Emscripten.  The original C++ source code can be found [here](http://github.com/google/brotli).\n\n## Installation and usage\n\nInstall using npm.\n\n    npm install brotli\n\nIf you want to use brotli in the browser, you should use [Browserify](http://browserify.org/) to build it.\n\nIn node, or in browserify, you can load brotli in the standard way:\n\n```javascript\nvar brotli = require('brotli');\n```\n\nYou can also require just the `decompress` function or just the `compress` function, which is useful for browserify builds.\nFor example, here's how you'd require just the `decompress` function.\n\n```javascript\nvar decompress = require('brotli/decompress');\n```\n\n## API\n\n### brotli.decompress(buffer, [outSize])\n\nDecompresses the given buffer to produce the original input to the compressor.\nThe `outSize` parameter is optional, and will be computed by the decompressor\nif not provided. Inside a WOFF2 file, this can be computed from the WOFF2 directory.\n\n```javascript\n// decode a buffer where the output size is known\nbrotli.decompress(compressedData, uncompressedLength);\n\n// decode a buffer where the output size is not known\nbrotli.decompress(fs.readFileSync('compressed.bin'));\n```\n\n### brotli.compress(buffer, isText = false)\n\nCompresses the given buffer. Pass optional parameters as the second argument.\n\n```javascript\n// encode a buffer of binary data\nbrotli.compress(fs.readFileSync('myfile.bin'));\n\n// encode some data with options (default options shown)\nbrotli.compress(fs.readFileSync('myfile.bin'), {\n  mode: 0, // 0 = generic, 1 = text, 2 = font (WOFF2)\n  quality: 11, // 0 - 11\n  lgwin: 22 // window size\n});\n```\n\n## License\n\nMIT\n","publish_time":1654668636405,"_cnpm_publish_time":1654668636405,"dist-tags":{"latest":"2.1.0"}}