{"_id":"@pdf-lib/brotli","_rev":"1-5dc50aa2df0f9c3ace59d00d20bd4794","name":"@pdf-lib/brotli","dist-tags":{"latest":"0.0.0"},"versions":{"0.0.0":{"name":"@pdf-lib/brotli","version":"0.0.0","description":"A port of the Brotli compression algorithm as used in WOFF2","main":"index.js","scripts":{"test":"mocha"},"dependencies":{"base64-js":"^1.1.2"},"devDependencies":{"mocha":"^2.2.1"},"repository":{"type":"git","url":"https://github.com/Hopding/brotli.js.git"},"keywords":["compress","decompress","encode","decode"],"author":{"name":"Andrew Dillon","email":"andrew.dillon.j@gmail.com"},"contributors":[{"name":"Devon Govett","email":"devongovett@gmail.com","url":"http://badassjs.com/"}],"bugs":{"url":"https://github.com/Hopding/brotli.js/issues"},"license":"MIT","homepage":"https://github.com/Hopding/brotli.js","_id":"@pdf-lib/brotli@0.0.0","dist":{"shasum":"18a5309649d4574dab97fa65c5b49cf50ed8ddb8","integrity":"sha512-hUQg09XRVvWglv395r36psY6ysNDOfIRTgVMfsA0/ZXwCk/b0bxjQj/QfpwPWQ/NUkQiiyEDTBoS5Rm0amUbhQ==","tarball":"https://registry.npmjs.org/@pdf-lib/brotli/-/brotli-0.0.0.tgz","fileCount":20,"unpackedSize":896754,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcGro8CRA9TVsSAnZWagAAEMwP/RalbJv1esI5rugInUts\nfr9o4LSS4xESFP5FRgYboI7eE5ip4NSJbzZY6z9+EqSUYZqlp1ETU0EQppCa\nZM6hkvm7kdBGv12i/y2ijn5Nj2FZBH3RRmohasn5lHFTEeoCF/Sj/8UCp0H1\ngMlZCsOFMHYzF50BpzIsWo2pZDcTN8xvE+IfmuE5DumzoUo0L8BUSYA+7ww0\nWJhtsr+B6jC+oc1YlGZs0y6B2Z46PZbpwy1lXeL9Y9oPH0G7B4CfLZsPCmnP\nhB16a3cJib9GwxoEmL27vct/KqLCLBchDMZV8O9NrRnVykpn8m/o1Jx7skI+\n+9gp4TOT5/jjnaqx867lfnUtz+6n6OcsdUw95P0Xk3U2GpE9+WulL8BJGyPF\ndiNqoi5lcGY8en7lfW2cN5eCiK+RyyffgbqLyq61cO30Al4gr064M//bj3bx\nWvszPFHyo6pQ7pnZR8diM2LvjQcQYrll2Wg3e9dmpntsBR5GrlI0eJcnZnY0\nyEidANsivl/cpe/f9zEuMVDlK9NKaoSwOiCg8+Uy4R5oJk9Lrqlh/WWmvVeR\nREQs4NscWgH68ADY67E2skpJqH4wi3cQOiv2UwWgrTEPDrrfHnByy2bARABk\nL2sVo1EcI/bua+E0rq60WfwctimLBiBmlLjWKO7m6lPEJFEif3DroiCYX/HQ\nFBfr\r\n=TCXG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDQLlsWmce4buZpZUisD8Cs5t8wwMG6eNX/zacDME43pgIhAKe7eGby0b/k4JzOo43kZ/HSxpf5jVfAYHbeZcVIEcj0"}]},"maintainers":[{"name":"hopding","email":"andrew.dillon.j@gmail.com"}],"_npmUser":{"name":"hopding","email":"andrew.dillon.j@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brotli_0.0.0_1545255483561_0.28638921804086204"},"_hasShrinkwrap":false}},"time":{"created":"2018-12-19T21:38:03.378Z","0.0.0":"2018-12-19T21:38:03.727Z","modified":"2022-04-06T13:40:23.212Z"},"maintainers":[{"name":"hopding","email":"andrew.dillon.j@gmail.com"}],"description":"A port of the Brotli compression algorithm as used in WOFF2","homepage":"https://github.com/Hopding/brotli.js","keywords":["compress","decompress","encode","decode"],"repository":{"type":"git","url":"https://github.com/Hopding/brotli.js.git"},"contributors":[{"name":"Devon Govett","email":"devongovett@gmail.com","url":"http://badassjs.com/"}],"author":{"name":"Andrew Dillon","email":"andrew.dillon.j@gmail.com"},"bugs":{"url":"https://github.com/Hopding/brotli.js/issues"},"license":"MIT","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","readmeFilename":"README.md"}