{"name":"bufferutil","version":"2.0.1","description":"WebSocket buffer utils","main":"index.js","scripts":{"install":"prebuild-install || node-gyp rebuild","test":"echo \"Only testing builds, tests have to be extraced from ws\" && prebuild-ci"},"repository":{"type":"git","url":"git+https://github.com/websockets/bufferutil.git"},"keywords":["bufferutil"],"author":{"name":"Einar Otto Stangvik","email":"einaros@gmail.com","url":"http://2x.io"},"license":"MIT","bugs":{"url":"https://github.com/websockets/bufferutil/issues"},"homepage":"https://github.com/websockets/bufferutil","dependencies":{"bindings":"~1.2.1","nan":"~2.5.0","prebuild-install":"~2.1.0"},"devDependencies":{"prebuild":"~6.0.2","prebuild-ci":"~2.0.0"},"gitHead":"4ef41fc84d9bf72f2bd965baa207f3addfab6bdc","_id":"bufferutil@2.0.1","_shasum":"8de37f5a300730c305fc3edd9f93348ee8a46288","_from":".","_npmVersion":"4.1.2","_nodeVersion":"7.5.0","_npmUser":{"name":"lpinca","email":"luigipinca@gmail.com"},"dist":{"shasum":"8de37f5a300730c305fc3edd9f93348ee8a46288","tarball":"http://registry-npm.ywwl.com/bufferutil/download/bufferutil-2.0.1.tgz","integrity":"sha512-zJyJIq02mddcR+yqkDrw9oPQfvl55FUxpWhNca2LiCRfXTWIOOcPKieXAljTa2HuRdkqIv21lOdprakybYuC6A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBsNEB7AkuCCTJormmF6DavqstvEd1EJItM8Miw1StFGAiB9UTP2w+Fx5b+3eNmkx6/jHp3mupWKnHdgIINMURTHrA=="}],"size":3427,"noattachment":false,"key":"/bufferutil/-/bufferutil-2.0.1.tgz"},"maintainers":[{"name":"3rdeden","email":"npm@3rd-Eden.com"},{"name":"einaros","email":"einaros@gmail.com"},{"name":"lpinca","email":"luigipinca@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/bufferutil-2.0.1.tgz_1486489476054_0.8282803113106638"},"directories":{},"readme":"# bufferutil\n\n[![Version npm](https://img.shields.io/npm/v/bufferutil.svg?logo=npm)](https://www.npmjs.com/package/bufferutil)\n[![Linux/macOS/Windows Build](https://img.shields.io/github/actions/workflow/status/websockets/bufferutil/ci.yml?branch=master&label=build&logo=github)](https://github.com/websockets/bufferutil/actions?query=workflow%3ACI+branch%3Amaster)\n\n`bufferutil` is what makes `ws` fast. It provides some utilities to efficiently\nperform some operations such as masking and unmasking the data payload of\nWebSocket frames.\n\n## Installation\n\n```\nnpm install bufferutil --save-optional\n```\n\nThe `--save-optional` flag tells npm to save the package in your package.json\nunder the\n[`optionalDependencies`](https://docs.npmjs.com/files/package.json#optionaldependencies)\nkey.\n\n## API\n\nThe module exports two functions.\n\n### `bufferUtil.mask(source, mask, output, offset, length)`\n\nMasks a buffer using the given masking-key as specified by the WebSocket\nprotocol.\n\n#### Arguments\n\n- `source` - The buffer to mask.\n- `mask` - A buffer representing the masking-key.\n- `output` - The buffer where to store the result.\n- `offset` - The offset at which to start writing.\n- `length` - The number of bytes to mask.\n\n#### Example\n\n```js\n'use strict';\n\nconst bufferUtil = require('bufferutil');\nconst crypto = require('crypto');\n\nconst source = crypto.randomBytes(10);\nconst mask = crypto.randomBytes(4);\n\nbufferUtil.mask(source, mask, source, 0, source.length);\n```\n\n### `bufferUtil.unmask(buffer, mask)`\n\nUnmasks a buffer using the given masking-key as specified by the WebSocket\nprotocol.\n\n#### Arguments\n\n- `buffer` - The buffer to unmask.\n- `mask` - A buffer representing the masking-key.\n\n#### Example\n\n```js\n'use strict';\n\nconst bufferUtil = require('bufferutil');\nconst crypto = require('crypto');\n\nconst buffer = crypto.randomBytes(10);\nconst mask = crypto.randomBytes(4);\n\nbufferUtil.unmask(buffer, mask);\n```\n\n## License\n\n[MIT](LICENSE)\n","publish_time":1486489476648,"_cnpm_publish_time":1486489476648,"dist-tags":{"latest":"4.1.0","n-api":"3.0.3-napi"}}