{"_id":"react-native-buffer","_rev":"5-ade07ae853561136a54bdfb89680f7e7","name":"react-native-buffer","dist-tags":{"latest":"6.0.6"},"versions":{"6.0.3":{"name":"react-native-buffer","version":"6.0.3","keywords":["arraybuffer","browser","browserify","buffer","compatible","dataview","uint8array"],"author":{"url":"https://feross.org","name":"Feross Aboukhadijeh","email":"feross@feross.org"},"license":"MIT","_id":"react-native-buffer@6.0.3","maintainers":[{"name":"tan.do","email":"tan.do@sharering.network"}],"contributors":[{"name":"Romain Beauxis","email":"toots@rastageeks.org"},{"name":"James Halliday","email":"mail@substack.net"},{"name":"Alex Do","email":"alex.donh@gmail.com"}],"homepage":"https://github.com/alexdonh/alexdonh","bugs":{"url":"https://github.com/alexdonh/react-native-buffer/issues"},"dist":{"shasum":"74af81e1ca5fc5e2d539f0242cf57df7e6a645c6","tarball":"https://registry.npmjs.org/react-native-buffer/-/react-native-buffer-6.0.3.tgz","fileCount":6,"integrity":"sha512-zZ0+TytQukFkdq7l9VQ8eypY83qQLMYNNVA+1skHQWcjXWRxsJvR6TAW4/HwD1FTLIySQt7cyvbNYSO30RuNvA==","signatures":[{"sig":"MEUCIHwz6YVORoEyzXnZyhYLENwaaQdfV5+s3KkB2aon9RZvAiEA3t3ZCsMSP7Th5GteJQ/dUvpMnXX6g6wJhVeFZH7G17Q=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":91894,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj9Y3OACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoOyg//bhTZgjivkFFdyIX+pgOv3SmaSAbDdJreEBzN/JA0GK/r5QvP\r\n95cl1iCUVNaF4JwL1EVwDUIhs3YnRn0yxJDuWxLdFIDbXIvN5QUb8dCi9mhb\r\nK4b+vLqHX5PWwNZajyl2JjUznB8I88AMCZfAgddM3Dluc4Ugolc2FYdkPVZR\r\naLYkd2Y875ketadVttgplZ/8jSgiQHxQlwk2a06KLCnKCPDT7DFKRzSsEpDi\r\nmukNQiGnsUjpzEJP1JSmnoAU07TEySRLg56YRBM4OpFmS0g5V5C3WK7GN6q4\r\nsbFXlSS66TCyklft6r/EwH/QJVzirRhP/vGzR+jDos7qYAewgmJ+CINRBiuT\r\nrmQnCIj7uL3e7hrDHK9ocUv4R0U5sowNo6qzLq/Sw37LaWAX4aqGTKxGiTiX\r\nlDnvtotq3+JW7AKJjK5DMawFSJPGEVtCmEvN2M9IjpOO6pcTkQpvcO0G9RZa\r\n7RTlGtq5p8GxBAdiGo9kL7vygQzRmKdaCs4QM2TsJobSNTBaWqdlri+mQXtv\r\n/IRZXcDfCwUKvXOITuHgTs4/37EJADJjEA5Dgz7gj/me/y6XAeK4J/9zVtlU\r\njgW8wLLokmWm5kvLj7pb3QnP/A/g0qr0yLN3iPZkS/NZl1Ki2SV5+IJWXpVo\r\nvyNdKXWnfnJTSZQ8g0vz87PkCxuixSJBeQs=\r\n=u4wB\r\n-----END PGP SIGNATURE-----\r\n"},"jspm":{"map":{"./index.js":{"node":"@node/buffer"}}},"main":"index.js","types":"index.d.ts","funding":[{"url":"https://github.com/sponsors/feross","type":"github"},{"url":"https://www.patreon.com/feross","type":"patreon"},{"url":"https://feross.org/support","type":"consulting"}],"gitHead":"c37725e8b1cce21da789f8d0e9e6a1e68afb3f47","scripts":{"perf":"browserify --debug perf/bracket-notation.js > perf/bundle.js && open perf/index.html","size":"browserify -r ./ | uglifyjs -c -m | gzip | wc -c","test":"standard && node ./bin/test.js","perf-node":"node perf/bracket-notation.js && node perf/concat.js && node perf/copy-big.js && node perf/copy.js && node perf/new-big.js && node perf/new.js && node perf/readDoubleBE.js && node perf/readFloatBE.js && node perf/readUInt32LE.js && node perf/slice.js && node perf/writeFloatBE.js","test-node":"tape test/*.js test/node/*.js","update-authors":"./bin/update-authors.sh","test-browser-new":"airtap -- test/*.js test/node/*.js","test-browser-old":"airtap -- test/*.js","test-browser-new-local":"airtap --local -- test/*.js test/node/*.js","test-browser-old-local":"airtap --local -- test/*.js"},"_npmUser":{"name":"tan.do","email":"tan.do@sharering.network"},"standard":{"ignore":["test/node/**/*.js","test/common.js","test/_polyfill.js","perf/**/*.js"]},"repository":{"url":"git://github.com/alexdonh/react-native-buffer.git","type":"git"},"_npmVersion":"9.2.0","description":"Node.js Buffer API, for React-Native with native Base64","directories":{},"_nodeVersion":"16.18.1","dependencies":{"ieee754":"^1.2.1","react-native-fast-base64":"^0.1.1"},"_hasShrinkwrap":false,"devDependencies":{"tape":"^5.0.1","split":"^1.0.1","airtap":"^3.0.0","is-nan":"^1.3.0","standard":"*","through2":"^4.0.2","benchmark":"^2.1.4","is-buffer":"^2.0.5","uglify-js":"^3.11.5","browserify":"^17.0.0","hyperquest":"^2.1.3","concat-stream":"^2.0.0"},"peerDependencies":{"react":"*","react-native":"*","react-native-fast-base64":"*"},"_npmOperationalInternal":{"tmp":"tmp/react-native-buffer_6.0.3_1677037006510_0.763079689257026","host":"s3://npm-registry-packages"}},"6.0.4":{"name":"react-native-buffer","version":"6.0.4","keywords":["arraybuffer","browser","browserify","buffer","compatible","dataview","uint8array"],"author":{"url":"https://feross.org","name":"Feross Aboukhadijeh","email":"feross@feross.org"},"license":"MIT","_id":"react-native-buffer@6.0.4","maintainers":[{"name":"alexdonh","email":"alex.donh@gmail.com"},{"name":"tan.do","email":"tan.do@sharering.network"}],"contributors":[{"name":"Daniel Cousens"},{"name":"Romain Beauxis","email":"toots@rastageeks.org"},{"name":"James Halliday","email":"mail@substack.net"},{"name":"Alex Do","email":"alex.donh@gmail.com"}],"homepage":"https://github.com/alexdonh/alexdonh","bugs":{"url":"https://github.com/alexdonh/react-native-buffer/issues"},"dist":{"shasum":"c9a65b7f639400d4db72263d01567b22eece9418","tarball":"https://registry.npmjs.org/react-native-buffer/-/react-native-buffer-6.0.4.tgz","fileCount":6,"integrity":"sha512-tUPazFJ20YLCBwYfTDFkCAhLrXFlIjwmTV5wLlQPor7mBriDx8xip/QAxwrcJxzfWsX2/5TLh1LywmMfrTsFSg==","signatures":[{"sig":"MEYCIQDtOalNLT5XcaPRZnFt0rJZZtWWY3HDWiPrHhC7EcDIugIhAIJCPOVbeMbexapuK1H3ASNietnegNSSqLw9X1Z/NMGZ","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":94423},"jspm":{"map":{"./index.js":{"node":"@node/buffer"}}},"main":"index.js","types":"index.d.ts","funding":[{"url":"https://github.com/sponsors/feross","type":"github"},{"url":"https://www.patreon.com/feross","type":"patreon"},{"url":"https://feross.org/support","type":"consulting"}],"gitHead":"45373fb9d23e538804b28a569ed0840a5af6278f","scripts":{"perf":"browserify --debug perf/bracket-notation.js > perf/bundle.js && open perf/index.html","size":"browserify -r ./ | uglifyjs -c -m | gzip | wc -c","test":"tape test/*.js test/node/*.js","standard":"standard","perf-node":"node perf/bracket-notation.js && node perf/concat.js && node perf/copy-big.js && node perf/copy.js && node perf/new-big.js && node perf/new.js && node perf/readDoubleBE.js && node perf/readFloatBE.js && node perf/readUInt32LE.js && node perf/slice.js && node perf/writeFloatBE.js && node perf/write-hex.js","update-authors":"./bin/update-authors.sh","test-browser-new":"airtap -- test/*.js test/node/*.js","test-browser-old":"airtap -- test/*.js","test-browser-new-local":"airtap --local -- test/*.js test/node/*.js","test-browser-old-local":"airtap --local -- test/*.js"},"_npmUser":{"name":"alexdonh","actor":{"name":"alexdonh","type":"user","email":"alex.donh@gmail.com"},"email":"alex.donh@gmail.com"},"standard":{"ignore":["test/node/**/*.js","test/common.js","test/_polyfill.js","perf/**/*.js"]},"repository":{"url":"git://github.com/alexdonh/react-native-buffer.git","type":"git"},"_npmVersion":"10.8.2","description":"Node.js Buffer API, for React-Native with native Base64","directories":{},"_nodeVersion":"20.18.3","dependencies":{"ieee754":"^1.2.1","react-native-fast-base64":"^0.1.4"},"_hasShrinkwrap":false,"devDependencies":{"tape":"^5.0.1","split":"^1.0.1","airtap":"^3.0.0","is-nan":"^1.3.0","standard":"*","through2":"^4.0.2","benchmark":"^2.1.4","is-buffer":"^2.0.5","uglify-js":"^3.11.5","browserify":"^17.0.0","hyperquest":"^2.1.3","concat-stream":"^2.0.0"},"peerDependencies":{"react":"*","react-native":"*","react-native-fast-base64":"*"},"_npmOperationalInternal":{"tmp":"tmp/react-native-buffer_6.0.4_1750669270127_0.5337703587767066","host":"s3://npm-registry-packages-npm-production"}},"6.0.5":{"name":"react-native-buffer","version":"6.0.5","keywords":["arraybuffer","browser","browserify","buffer","compatible","dataview","uint8array"],"author":{"url":"https://feross.org","name":"Feross Aboukhadijeh","email":"feross@feross.org"},"license":"MIT","_id":"react-native-buffer@6.0.5","maintainers":[{"name":"alexdonh","email":"alex.donh@gmail.com"},{"name":"tan.do","email":"tan.do@sharering.network"}],"contributors":[{"name":"Daniel Cousens"},{"name":"Romain Beauxis","email":"toots@rastageeks.org"},{"name":"James Halliday","email":"mail@substack.net"},{"name":"Alex Do","email":"alex.donh@gmail.com"}],"homepage":"https://github.com/alexdonh/alexdonh","bugs":{"url":"https://github.com/alexdonh/react-native-buffer/issues"},"dist":{"shasum":"e8dad1c05d5fd93ba154ef8c5baccf050967d09a","tarball":"https://registry.npmjs.org/react-native-buffer/-/react-native-buffer-6.0.5.tgz","fileCount":7,"integrity":"sha512-/z0/Uz+oVB7UQLXb+4iNIy6PIG5JyH9lhRuGh4XpYkK0WU4Qbj8YbpwzKKVOV+TQX0Z8JS1V7WNLL+R2aPHcYQ==","signatures":[{"sig":"MEYCIQDHXwAakVkK/yY/ay07RNggH0Op1ITTxCyJ82dkFKhm+gIhAJXs12rONM84qrQWFb5ZrKBSQ1jVnyrIWbCeoA7cRkwQ","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":101863},"jspm":{"map":{"./index.js":{"node":"@node/buffer"}}},"main":"index.js","types":"index.d.ts","funding":[{"url":"https://github.com/sponsors/feross","type":"github"},{"url":"https://www.patreon.com/feross","type":"patreon"},{"url":"https://feross.org/support","type":"consulting"}],"gitHead":"63e99418f9bf5504eadc2b6b169cc1a61754885b","scripts":{"perf":"browserify --debug perf/bracket-notation.js > perf/bundle.js && open perf/index.html","size":"browserify -r ./ | uglifyjs -c -m | gzip | wc -c","test":"tape test/*.js test/node/*.js","standard":"standard","perf-node":"node perf/bracket-notation.js && node perf/concat.js && node perf/copy-big.js && node perf/copy.js && node perf/new-big.js && node perf/new.js && node perf/readDoubleBE.js && node perf/readFloatBE.js && node perf/readUInt32LE.js && node perf/slice.js && node perf/writeFloatBE.js && node perf/write-hex.js","update-authors":"./bin/update-authors.sh","test-browser-new":"airtap -- test/*.js test/node/*.js","test-browser-old":"airtap -- test/*.js","test-browser-new-local":"airtap --local -- test/*.js test/node/*.js","test-browser-old-local":"airtap --local -- test/*.js"},"_npmUser":{"name":"alexdonh","email":"alex.donh@gmail.com"},"standard":{"ignore":["test/node/**/*.js","test/common.js","test/_polyfill.js","perf/**/*.js"]},"repository":{"url":"git://github.com/alexdonh/react-native-buffer.git","type":"git"},"_npmVersion":"10.9.8","description":"Node.js Buffer API, for React-Native with native Base64","directories":{},"_nodeVersion":"22.22.3","dependencies":{"ieee754":"^1.2.1","react-native-fast-base64":"^0.2.0"},"_hasShrinkwrap":false,"devDependencies":{"tape":"^5.0.1","split":"^1.0.1","airtap":"^3.0.0","is-nan":"^1.3.0","standard":"*","through2":"^4.0.2","benchmark":"^2.1.4","is-buffer":"^2.0.5","uglify-js":"^3.11.5","browserify":"^17.0.0","hyperquest":"^2.1.3","concat-stream":"^2.0.0"},"peerDependencies":{"react":"*","react-native":"*","react-native-fast-base64":"*"},"_npmOperationalInternal":{"tmp":"tmp/react-native-buffer_6.0.5_1787119436679_0.06998959654897852","host":"s3://npm-registry-packages-npm-production"}},"6.0.6":{"name":"react-native-buffer","description":"Node.js Buffer API, for React-Native with native Base64","version":"6.0.6","author":{"name":"Feross Aboukhadijeh","email":"feross@feross.org","url":"https://feross.org"},"bugs":{"url":"https://github.com/alexdonh/react-native-buffer/issues"},"contributors":[{"name":"Daniel Cousens"},{"name":"Romain Beauxis","email":"toots@rastageeks.org"},{"name":"James Halliday","email":"mail@substack.net"},{"name":"Alex Do","email":"alex.donh@gmail.com"}],"dependencies":{"ieee754":"^1.2.1","react-native-fast-base64":"^0.2.0"},"devDependencies":{"airtap":"^3.0.0","benchmark":"^2.1.4","browserify":"^17.0.0","concat-stream":"^2.0.0","hyperquest":"^2.1.3","is-buffer":"^2.0.5","is-nan":"^1.3.0","split":"^1.0.1","standard":"*","tape":"^5.0.1","through2":"^4.0.2","uglify-js":"^3.11.5"},"peerDependencies":{"react":"*","react-native":"*","react-native-fast-base64":"*"},"homepage":"https://github.com/alexdonh/alexdonh","jspm":{"map":{"./index.js":{"node":"@node/buffer"}}},"keywords":["arraybuffer","browser","browserify","buffer","compatible","dataview","uint8array"],"license":"MIT","main":"index.js","types":"index.d.ts","repository":{"type":"git","url":"git://github.com/alexdonh/react-native-buffer.git"},"scripts":{"perf":"browserify --debug perf/bracket-notation.js > perf/bundle.js && open perf/index.html","perf-node":"node perf/bracket-notation.js && node perf/concat.js && node perf/copy-big.js && node perf/copy.js && node perf/new-big.js && node perf/new.js && node perf/readDoubleBE.js && node perf/readFloatBE.js && node perf/readUInt32LE.js && node perf/slice.js && node perf/writeFloatBE.js && node perf/write-hex.js","size":"browserify -r ./ | uglifyjs -c -m | gzip | wc -c","standard":"standard","test":"tape test/*.js test/node/*.js","test-browser-old":"airtap -- test/*.js","test-browser-old-local":"airtap --local -- test/*.js","test-browser-new":"airtap -- test/*.js test/node/*.js","test-browser-new-local":"airtap --local -- test/*.js test/node/*.js","update-authors":"./bin/update-authors.sh"},"standard":{"ignore":["test/node/**/*.js","test/common.js","test/_polyfill.js","perf/**/*.js"]},"funding":[{"type":"github","url":"https://github.com/sponsors/feross"},{"type":"patreon","url":"https://www.patreon.com/feross"},{"type":"consulting","url":"https://feross.org/support"}],"_id":"react-native-buffer@6.0.6","gitHead":"e5750973920593beab8e934083d58dd93c8a1869","_nodeVersion":"22.22.3","_npmVersion":"10.9.8","dist":{"integrity":"sha512-jPtgU9OZUl3NrpWlGr7dBDZZCWuy0PYcsXqSjy9MStg3IzK4Av6gAR2VMOcELAs2J9aYb/vvkWjJFRyM8WLqCA==","shasum":"40ac5a1499247b46578f53e88eb4841c2feb1778","tarball":"https://registry.npmjs.org/react-native-buffer/-/react-native-buffer-6.0.6.tgz","fileCount":7,"unpackedSize":102115,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIGQseeIjPQt0ZiMHqLxSGlNUMNPPb8fjX2ZiR0so5pS5AiEA62tGz++/cGs6hfAbcBqL2Io+FtSyOad0QegBnLueGOw="}]},"_npmUser":{"name":"alexdonh","email":"alex.donh@gmail.com"},"directories":{},"maintainers":[{"name":"alexdonh","email":"alex.donh@gmail.com"},{"name":"tan.do","email":"tan.do@sharering.network"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/react-native-buffer_6.0.6_1787133870526_0.14162039529937998"},"_hasShrinkwrap":false}},"time":{"created":"2023-02-22T03:36:46.376Z","modified":"2026-08-19T10:04:30.901Z","6.0.3":"2023-02-22T03:36:46.697Z","6.0.4":"2025-06-23T09:01:10.285Z","6.0.5":"2026-08-19T06:03:56.838Z","6.0.6":"2026-08-19T10:04:30.671Z"},"bugs":{"url":"https://github.com/alexdonh/react-native-buffer/issues"},"author":{"name":"Feross Aboukhadijeh","email":"feross@feross.org","url":"https://feross.org"},"license":"MIT","homepage":"https://github.com/alexdonh/alexdonh","keywords":["arraybuffer","browser","browserify","buffer","compatible","dataview","uint8array"],"repository":{"type":"git","url":"git://github.com/alexdonh/react-native-buffer.git"},"description":"Node.js Buffer API, for React-Native with native Base64","contributors":[{"name":"Daniel Cousens"},{"name":"Romain Beauxis","email":"toots@rastageeks.org"},{"name":"James Halliday","email":"mail@substack.net"},{"name":"Alex Do","email":"alex.donh@gmail.com"}],"maintainers":[{"name":"alexdonh","email":"alex.donh@gmail.com"},{"name":"tan.do","email":"tan.do@sharering.network"}],"readme":"# buffer [![ci][ci-image]][ci-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url]\n\n[ci-image]: https://img.shields.io/github/workflow/status/feross/buffer/ci/master\n[ci-url]: https://github.com/feross/buffer/actions\n[npm-image]: https://img.shields.io/npm/v/buffer.svg\n[npm-url]: https://npmjs.org/package/buffer\n[downloads-image]: https://img.shields.io/npm/dm/buffer.svg\n[downloads-url]: https://npmjs.org/package/buffer\n[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg\n[standard-url]: https://standardjs.com\n\n#### The buffer module from [node.js](https://nodejs.org), for React-Native with native Base64. Forked from feross/buffer.\n\n[![saucelabs][saucelabs-image]][saucelabs-url]\n\n[saucelabs-image]: https://saucelabs.com/browser-matrix/buffer.svg\n[saucelabs-url]: https://saucelabs.com/u/buffer\n\nWith [browserify](http://browserify.org), simply `require('buffer')` or use the `Buffer` global and you will get this module.\n\nThe goal is to provide an API that is 100% identical to\n[node's Buffer API](https://nodejs.org/api/buffer.html). Read the\n[official docs](https://nodejs.org/api/buffer.html) for the full list of properties,\ninstance methods, and class methods that are supported.\n\n## features\n\n- Manipulate binary data like a boss, in all browsers!\n- Super fast. Backed by Typed Arrays (`Uint8Array`/`ArrayBuffer`, not `Object`)\n- Extremely small bundle size (**6.75KB minified + gzipped**, 51.9KB with comments)\n- Excellent browser support (Chrome, Firefox, Edge, Safari 11+, iOS 11+, Android, etc.)\n- Preserves Node API exactly\n- Square-bracket `buf[4]` notation works!\n- Does not modify any browser prototypes or put anything on `window`\n- Comprehensive test suite (including all buffer tests from node.js core)\n\n## install\n\nTo use this module directly (without browserify), install it:\n\n```bash\nnpm install react-native-buffer\n```\n\nThis module was previously called **native-buffer-browserify**, but please use **buffer**\nfrom now on.\n\nIf you do not use a bundler, you can use the [standalone script](https://bundle.run/buffer).\n\n## usage\n\nThe module's API is identical to node's `Buffer` API. Read the\n[official docs](https://nodejs.org/api/buffer.html) for the full list of properties,\ninstance methods, and class methods that are supported.\n\nAs mentioned above, `require('buffer')` or use the `Buffer` global with\n[browserify](http://browserify.org) and this module will automatically be included\nin your bundle. Almost any npm module will work in the browser, even if it assumes that\nthe node `Buffer` API will be available.\n\nTo depend on this module explicitly (without browserify), require it like this:\n\n```js\nvar Buffer = require('buffer/').Buffer  // note: the trailing slash is important!\n```\n\nTo require this module explicitly, use `require('buffer/')` which tells the node.js module\nlookup algorithm (also used by browserify) to use the **npm module** named `buffer`\ninstead of the **node.js core** module named `buffer`!\n\n\n## how does it work?\n\nThe Buffer constructor returns instances of `Uint8Array` that have their prototype\nchanged to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of `Uint8Array`,\nso the returned instances will have all the node `Buffer` methods and the\n`Uint8Array` methods. Square bracket notation works as expected -- it returns a\nsingle octet.\n\nThe `Uint8Array` prototype remains unmodified.\n\n\n## tracking the latest node api\n\nThis module tracks the Buffer API in the latest (unstable) version of node.js. The Buffer\nAPI is considered **stable** in the\n[node stability index](https://nodejs.org/docs/latest/api/documentation.html#documentation_stability_index),\nso it is unlikely that there will ever be breaking changes.\nNonetheless, when/if the Buffer API changes in node, this module's API will change\naccordingly.\n\n## related packages\n\n- [`buffer-reverse`](https://www.npmjs.com/package/buffer-reverse) - Reverse a buffer\n- [`buffer-xor`](https://www.npmjs.com/package/buffer-xor) - Bitwise xor a buffer\n- [`is-buffer`](https://www.npmjs.com/package/is-buffer) - Determine if an object is a Buffer without including the whole `Buffer` package\n\n## conversion packages\n\n### convert typed array to buffer\n\nUse [`typedarray-to-buffer`](https://www.npmjs.com/package/typedarray-to-buffer) to convert any kind of typed array to a `Buffer`. Does not perform a copy, so it's super fast.\n\n### convert buffer to typed array\n\n`Buffer` is a subclass of `Uint8Array` (which is a typed array). So there is no need to explicitly convert to typed array. Just use the buffer as a `Uint8Array`.\n\n### convert blob to buffer\n\nUse [`blob-to-buffer`](https://www.npmjs.com/package/blob-to-buffer) to convert a `Blob` to a `Buffer`.\n\n### convert buffer to blob\n\nTo convert a `Buffer` to a `Blob`, use the `Blob` constructor:\n\n```js\nvar blob = new Blob([ buffer ])\n```\n\nOptionally, specify a mimetype:\n\n```js\nvar blob = new Blob([ buffer ], { type: 'text/html' })\n```\n\n### convert arraybuffer to buffer\n\nTo convert an `ArrayBuffer` to a `Buffer`, use the `Buffer.from` function. Does not perform a copy, so it's super fast.\n\n```js\nvar buffer = Buffer.from(arrayBuffer)\n```\n\n### convert buffer to arraybuffer\n\nTo convert a `Buffer` to an `ArrayBuffer`, use the `.buffer` property (which is present on all `Uint8Array` objects):\n\n```js\nvar arrayBuffer = buffer.buffer.slice(\n  buffer.byteOffset, buffer.byteOffset + buffer.byteLength\n)\n```\n\nAlternatively, use the [`to-arraybuffer`](https://www.npmjs.com/package/to-arraybuffer) module.\n\n## performance\n\nSee perf tests in `/perf`.\n\n`BrowserBuffer` is the browser `buffer` module (this repo). `Uint8Array` is included as an\nadditional check (since `BrowserBuffer` uses `Uint8Array` under the hood, `Uint8Array` will\nalways be at least a bit faster). Finally, `NodeBuffer` is the node.js buffer module,\nwhich is included to compare against.\n\nNOTE: Performance has improved since these benchmarks were taken. PR welcome to update the README.\n\n### Chrome 38\n\n| Method | Operations | Accuracy | Sampled | Fastest |\n|:-------|:-----------|:---------|:--------|:-------:|\n| BrowserBuffer#bracket-notation | 11,457,464 ops/sec | ±0.86% | 66 | ✓ |\n| Uint8Array#bracket-notation | 10,824,332 ops/sec | ±0.74% | 65 | |\n| | | | |\n| BrowserBuffer#concat | 450,532 ops/sec | ±0.76% | 68 | |\n| Uint8Array#concat | 1,368,911 ops/sec | ±1.50% | 62 | ✓ |\n| | | | |\n| BrowserBuffer#copy(16000) | 903,001 ops/sec | ±0.96% | 67 | |\n| Uint8Array#copy(16000) | 1,422,441 ops/sec | ±1.04% | 66 | ✓ |\n| | | | |\n| BrowserBuffer#copy(16) | 11,431,358 ops/sec | ±0.46% | 69 | |\n| Uint8Array#copy(16) | 13,944,163 ops/sec | ±1.12% | 68 | ✓ |\n| | | | |\n| BrowserBuffer#new(16000) | 106,329 ops/sec | ±6.70% | 44 | |\n| Uint8Array#new(16000) | 131,001 ops/sec | ±2.85% | 31 | ✓ |\n| | | | |\n| BrowserBuffer#new(16) | 1,554,491 ops/sec | ±1.60% | 65 | |\n| Uint8Array#new(16) | 6,623,930 ops/sec | ±1.66% | 65 | ✓ |\n| | | | |\n| BrowserBuffer#readDoubleBE | 112,830 ops/sec | ±0.51% | 69 | ✓ |\n| DataView#getFloat64 | 93,500 ops/sec | ±0.57% | 68 | |\n| | | | |\n| BrowserBuffer#readFloatBE | 146,678 ops/sec | ±0.95% | 68 | ✓ |\n| DataView#getFloat32 | 99,311 ops/sec | ±0.41% | 67 | |\n| | | | |\n| BrowserBuffer#readUInt32LE | 843,214 ops/sec | ±0.70% | 69 | ✓ |\n| DataView#getUint32 | 103,024 ops/sec | ±0.64% | 67 | |\n| | | | |\n| BrowserBuffer#slice | 1,013,941 ops/sec | ±0.75% | 67 | |\n| Uint8Array#subarray | 1,903,928 ops/sec | ±0.53% | 67 | ✓ |\n| | | | |\n| BrowserBuffer#writeFloatBE | 61,387 ops/sec | ±0.90% | 67 | |\n| DataView#setFloat32 | 141,249 ops/sec | ±0.40% | 66 | ✓ |\n\n\n### Firefox 33\n\n| Method | Operations | Accuracy | Sampled | Fastest |\n|:-------|:-----------|:---------|:--------|:-------:|\n| BrowserBuffer#bracket-notation | 20,800,421 ops/sec | ±1.84% | 60 | |\n| Uint8Array#bracket-notation | 20,826,235 ops/sec | ±2.02% | 61 | ✓ |\n| | | | |\n| BrowserBuffer#concat | 153,076 ops/sec | ±2.32% | 61 | |\n| Uint8Array#concat | 1,255,674 ops/sec | ±8.65% | 52 | ✓ |\n| | | | |\n| BrowserBuffer#copy(16000) | 1,105,312 ops/sec | ±1.16% | 63 | |\n| Uint8Array#copy(16000) | 1,615,911 ops/sec | ±0.55% | 66 | ✓ |\n| | | | |\n| BrowserBuffer#copy(16) | 16,357,599 ops/sec | ±0.73% | 68 | |\n| Uint8Array#copy(16) | 31,436,281 ops/sec | ±1.05% | 68 | ✓ |\n| | | | |\n| BrowserBuffer#new(16000) | 52,995 ops/sec | ±6.01% | 35 | |\n| Uint8Array#new(16000) | 87,686 ops/sec | ±5.68% | 45 | ✓ |\n| | | | |\n| BrowserBuffer#new(16) | 252,031 ops/sec | ±1.61% | 66 | |\n| Uint8Array#new(16) | 8,477,026 ops/sec | ±0.49% | 68 | ✓ |\n| | | | |\n| BrowserBuffer#readDoubleBE | 99,871 ops/sec | ±0.41% | 69 | |\n| DataView#getFloat64 | 285,663 ops/sec | ±0.70% | 68 | ✓ |\n| | | | |\n| BrowserBuffer#readFloatBE | 115,540 ops/sec | ±0.42% | 69 | |\n| DataView#getFloat32 | 288,722 ops/sec | ±0.82% | 68 | ✓ |\n| | | | |\n| BrowserBuffer#readUInt32LE | 633,926 ops/sec | ±1.08% | 67 | ✓ |\n| DataView#getUint32 | 294,808 ops/sec | ±0.79% | 64 | |\n| | | | |\n| BrowserBuffer#slice | 349,425 ops/sec | ±0.46% | 69 | |\n| Uint8Array#subarray | 5,965,819 ops/sec | ±0.60% | 65 | ✓ |\n| | | | |\n| BrowserBuffer#writeFloatBE | 59,980 ops/sec | ±0.41% | 67 | |\n| DataView#setFloat32 | 317,634 ops/sec | ±0.63% | 68 | ✓ |\n\n### Safari 8\n\n| Method | Operations | Accuracy | Sampled | Fastest |\n|:-------|:-----------|:---------|:--------|:-------:|\n| BrowserBuffer#bracket-notation | 10,279,729 ops/sec | ±2.25% | 56 | ✓ |\n| Uint8Array#bracket-notation | 10,030,767 ops/sec | ±2.23% | 59 | |\n| | | | |\n| BrowserBuffer#concat | 144,138 ops/sec | ±1.38% | 65 | |\n| Uint8Array#concat | 4,950,764 ops/sec | ±1.70% | 63 | ✓ |\n| | | | |\n| BrowserBuffer#copy(16000) | 1,058,548 ops/sec | ±1.51% | 64 | |\n| Uint8Array#copy(16000) | 1,409,666 ops/sec | ±1.17% | 65 | ✓ |\n| | | | |\n| BrowserBuffer#copy(16) | 6,282,529 ops/sec | ±1.88% | 58 | |\n| Uint8Array#copy(16) | 11,907,128 ops/sec | ±2.87% | 58 | ✓ |\n| | | | |\n| BrowserBuffer#new(16000) | 101,663 ops/sec | ±3.89% | 57 | |\n| Uint8Array#new(16000) | 22,050,818 ops/sec | ±6.51% | 46 | ✓ |\n| | | | |\n| BrowserBuffer#new(16) | 176,072 ops/sec | ±2.13% | 64 | |\n| Uint8Array#new(16) | 24,385,731 ops/sec | ±5.01% | 51 | ✓ |\n| | | | |\n| BrowserBuffer#readDoubleBE | 41,341 ops/sec | ±1.06% | 67 | |\n| DataView#getFloat64 | 322,280 ops/sec | ±0.84% | 68 | ✓ |\n| | | | |\n| BrowserBuffer#readFloatBE | 46,141 ops/sec | ±1.06% | 65 | |\n| DataView#getFloat32 | 337,025 ops/sec | ±0.43% | 69 | ✓ |\n| | | | |\n| BrowserBuffer#readUInt32LE | 151,551 ops/sec | ±1.02% | 66 | |\n| DataView#getUint32 | 308,278 ops/sec | ±0.94% | 67 | ✓ |\n| | | | |\n| BrowserBuffer#slice | 197,365 ops/sec | ±0.95% | 66 | |\n| Uint8Array#subarray | 9,558,024 ops/sec | ±3.08% | 58 | ✓ |\n| | | | |\n| BrowserBuffer#writeFloatBE | 17,518 ops/sec | ±1.03% | 63 | |\n| DataView#setFloat32 | 319,751 ops/sec | ±0.48% | 68 | ✓ |\n\n\n### Node 0.11.14\n\n| Method | Operations | Accuracy | Sampled | Fastest |\n|:-------|:-----------|:---------|:--------|:-------:|\n| BrowserBuffer#bracket-notation | 10,489,828 ops/sec | ±3.25% | 90 | |\n| Uint8Array#bracket-notation | 10,534,884 ops/sec | ±0.81% | 92 | ✓ |\n| NodeBuffer#bracket-notation | 10,389,910 ops/sec | ±0.97% | 87 | |\n| | | | |\n| BrowserBuffer#concat | 487,830 ops/sec | ±2.58% | 88 | |\n| Uint8Array#concat | 1,814,327 ops/sec | ±1.28% | 88 | ✓ |\n| NodeBuffer#concat | 1,636,523 ops/sec | ±1.88% | 73 | |\n| | | | |\n| BrowserBuffer#copy(16000) | 1,073,665 ops/sec | ±0.77% | 90 | |\n| Uint8Array#copy(16000) | 1,348,517 ops/sec | ±0.84% | 89 | ✓ |\n| NodeBuffer#copy(16000) | 1,289,533 ops/sec | ±0.82% | 93 | |\n| | | | |\n| BrowserBuffer#copy(16) | 12,782,706 ops/sec | ±0.74% | 85 | |\n| Uint8Array#copy(16) | 14,180,427 ops/sec | ±0.93% | 92 | ✓ |\n| NodeBuffer#copy(16) | 11,083,134 ops/sec | ±1.06% | 89 | |\n| | | | |\n| BrowserBuffer#new(16000) | 141,678 ops/sec | ±3.30% | 67 | |\n| Uint8Array#new(16000) | 161,491 ops/sec | ±2.96% | 60 | |\n| NodeBuffer#new(16000) | 292,699 ops/sec | ±3.20% | 55 | ✓ |\n| | | | |\n| BrowserBuffer#new(16) | 1,655,466 ops/sec | ±2.41% | 82 | |\n| Uint8Array#new(16) | 14,399,926 ops/sec | ±0.91% | 94 | ✓ |\n| NodeBuffer#new(16) | 3,894,696 ops/sec | ±0.88% | 92 | |\n| | | | |\n| BrowserBuffer#readDoubleBE | 109,582 ops/sec | ±0.75% | 93 | ✓ |\n| DataView#getFloat64 | 91,235 ops/sec | ±0.81% | 90 | |\n| NodeBuffer#readDoubleBE | 88,593 ops/sec | ±0.96% | 81 | |\n| | | | |\n| BrowserBuffer#readFloatBE | 139,854 ops/sec | ±1.03% | 85 | ✓ |\n| DataView#getFloat32 | 98,744 ops/sec | ±0.80% | 89 | |\n| NodeBuffer#readFloatBE | 92,769 ops/sec | ±0.94% | 93 | |\n| | | | |\n| BrowserBuffer#readUInt32LE | 710,861 ops/sec | ±0.82% | 92 | |\n| DataView#getUint32 | 117,893 ops/sec | ±0.84% | 91 | |\n| NodeBuffer#readUInt32LE | 851,412 ops/sec | ±0.72% | 93 | ✓ |\n| | | | |\n| BrowserBuffer#slice | 1,673,877 ops/sec | ±0.73% | 94 | |\n| Uint8Array#subarray | 6,919,243 ops/sec | ±0.67% | 90 | ✓ |\n| NodeBuffer#slice | 4,617,604 ops/sec | ±0.79% | 93 | |\n| | | | |\n| BrowserBuffer#writeFloatBE | 66,011 ops/sec | ±0.75% | 93 | |\n| DataView#setFloat32 | 127,760 ops/sec | ±0.72% | 93 | ✓ |\n| NodeBuffer#writeFloatBE | 103,352 ops/sec | ±0.83% | 93 | |\n\n### iojs 1.8.1\n\n| Method | Operations | Accuracy | Sampled | Fastest |\n|:-------|:-----------|:---------|:--------|:-------:|\n| BrowserBuffer#bracket-notation | 10,990,488 ops/sec | ±1.11% | 91 | |\n| Uint8Array#bracket-notation | 11,268,757 ops/sec | ±0.65% | 97 | |\n| NodeBuffer#bracket-notation | 11,353,260 ops/sec | ±0.83% | 94 | ✓ |\n| | | | |\n| BrowserBuffer#concat | 378,954 ops/sec | ±0.74% | 94 | |\n| Uint8Array#concat | 1,358,288 ops/sec | ±0.97% | 87 | |\n| NodeBuffer#concat | 1,934,050 ops/sec | ±1.11% | 78 | ✓ |\n| | | | |\n| BrowserBuffer#copy(16000) | 894,538 ops/sec | ±0.56% | 84 | |\n| Uint8Array#copy(16000) | 1,442,656 ops/sec | ±0.71% | 96 | |\n| NodeBuffer#copy(16000) | 1,457,898 ops/sec | ±0.53% | 92 | ✓ |\n| | | | |\n| BrowserBuffer#copy(16) | 12,870,457 ops/sec | ±0.67% | 95 | |\n| Uint8Array#copy(16) | 16,643,989 ops/sec | ±0.61% | 93 | ✓ |\n| NodeBuffer#copy(16) | 14,885,848 ops/sec | ±0.74% | 94 | |\n| | | | |\n| BrowserBuffer#new(16000) | 109,264 ops/sec | ±4.21% | 63 | |\n| Uint8Array#new(16000) | 138,916 ops/sec | ±1.87% | 61 | |\n| NodeBuffer#new(16000) | 281,449 ops/sec | ±3.58% | 51 | ✓ |\n| | | | |\n| BrowserBuffer#new(16) | 1,362,935 ops/sec | ±0.56% | 99 | |\n| Uint8Array#new(16) | 6,193,090 ops/sec | ±0.64% | 95 | ✓ |\n| NodeBuffer#new(16) | 4,745,425 ops/sec | ±1.56% | 90 | |\n| | | | |\n| BrowserBuffer#readDoubleBE | 118,127 ops/sec | ±0.59% | 93 | ✓ |\n| DataView#getFloat64 | 107,332 ops/sec | ±0.65% | 91 | |\n| NodeBuffer#readDoubleBE | 116,274 ops/sec | ±0.94% | 95 | |\n| | | | |\n| BrowserBuffer#readFloatBE | 150,326 ops/sec | ±0.58% | 95 | ✓ |\n| DataView#getFloat32 | 110,541 ops/sec | ±0.57% | 98 | |\n| NodeBuffer#readFloatBE | 121,599 ops/sec | ±0.60% | 87 | |\n| | | | |\n| BrowserBuffer#readUInt32LE | 814,147 ops/sec | ±0.62% | 93 | |\n| DataView#getUint32 | 137,592 ops/sec | ±0.64% | 90 | |\n| NodeBuffer#readUInt32LE | 931,650 ops/sec | ±0.71% | 96 | ✓ |\n| | | | |\n| BrowserBuffer#slice | 878,590 ops/sec | ±0.68% | 93 | |\n| Uint8Array#subarray | 2,843,308 ops/sec | ±1.02% | 90 | |\n| NodeBuffer#slice | 4,998,316 ops/sec | ±0.68% | 90 | ✓ |\n| | | | |\n| BrowserBuffer#writeFloatBE | 65,927 ops/sec | ±0.74% | 93 | |\n| DataView#setFloat32 | 139,823 ops/sec | ±0.97% | 89 | ✓ |\n| NodeBuffer#writeFloatBE | 135,763 ops/sec | ±0.65% | 96 | |\n| | | | |\n\n## Testing the project\n\nFirst, install the project:\n\n    npm install\n\nThen, to run tests in Node.js, run:\n\n    npm run test-node\n\nTo test locally in a browser, you can run:\n\n    npm run test-browser-old-local # For ES5 browsers that don't support ES6\n    npm run test-browser-new-local # For ES6 compliant browsers\n\nThis will print out a URL that you can then open in a browser to run the tests, using [airtap](https://www.npmjs.com/package/airtap).\n\nTo run automated browser tests using Saucelabs, ensure that your `SAUCE_USERNAME` and `SAUCE_ACCESS_KEY` environment variables are set, then run:\n\n    npm test\n\nThis is what's run in Travis, to check against various browsers. The list of browsers is kept in the `bin/airtap-es5.yml` and `bin/airtap-es6.yml` files.\n\n## JavaScript Standard Style\n\nThis module uses [JavaScript Standard Style](https://github.com/feross/standard).\n\n[![JavaScript Style Guide](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard)\n\nTo test that the code conforms to the style, `npm install` and run:\n\n    ./node_modules/.bin/standard\n\n## credit\n\nThis was originally forked from [buffer-browserify](https://github.com/toots/buffer-browserify).\n\n## Security Policies and Procedures\n\nThe `buffer` team and community take all security bugs in `buffer` seriously. Please see our [security policies and procedures](https://github.com/feross/security) document to learn how to report issues.\n\n## license\n\nMIT. Copyright (C) [Feross Aboukhadijeh](http://feross.org), and other contributors. Originally forked from an MIT-licensed module by Romain Beauxis.\n","readmeFilename":"README.md"}