{"name":"iobuffer","version":"2.1.0","author":{"name":"Michaël Zasso"},"license":"MIT","_id":"iobuffer@2.1.0","maintainers":[{"name":"targos","email":"targos@live.com"}],"homepage":"https://github.com/image-js/iobuffer#readme","bugs":{"url":"https://github.com/image-js/iobuffer/issues"},"dist":{"shasum":"074882d24020a85db6a5042a0418ef9b6b2e616a","tarball":"http://registry-npm.ywwl.com/iobuffer/download/iobuffer-2.1.0.tgz","integrity":"sha512-0XZfU0STJ6NVHBZdMRPjF7jtkDEC5f4AxM/n5DSZOu11SQ+7tAl1csuEnEPoSPYWdaGZ/HOfn5Q837IEHddL2w==","signatures":[{"sig":"MEUCIQDwI5t9/0QjXoPVuXVqxe2D/s16y8hk4Hf4l3g+usyySwIgP4g+RTTt4U9bBSY85HEZVeBwExMYguXjnEoBLo6j2Eo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"size":3118,"noattachment":false,"key":"/iobuffer/-/iobuffer-2.1.0.tgz"},"main":"./IOBuffer.js","_from":".","files":["IOBuffer.js"],"_shasum":"074882d24020a85db6a5042a0418ef9b6b2e616a","gitHead":"f1f010d1f55a9a39484f6aff21b3dc3dc50152e4","scripts":{"test":"mocha --require should --reporter mocha-better-spec-reporter --recursive","test-cov":"istanbul cover node_modules/.bin/_mocha -- --require should --reporter dot --recursive","test-travis":"istanbul cover node_modules/.bin/_mocha --report lcovonly -- --require should --reporter mocha-better-spec-reporter --recursive"},"_npmUser":{"name":"targos","email":"targos@live.com"},"repository":{"url":"git+https://github.com/image-js/iobuffer.git","type":"git"},"_npmVersion":"3.10.3","description":"Read and write binary data on ArrayBuffers","directories":{},"_nodeVersion":"6.6.0","devDependencies":{"mocha":"^3.0.2","should":"^11.1.0","istanbul":"^0.4.5","mocha-better-spec-reporter":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/iobuffer-2.1.0.tgz_1474360688455_0.5193294119089842","host":"packages-12-west.internal.npmjs.com"},"readme":"<h3 align=\"center\">\n  <a href=\"https://www.zakodium.com\">\n    <img src=\"https://www.zakodium.com/brand/zakodium-logo-white.svg\" width=\"50\" alt=\"Zakodium logo\" />\n  </a>\n  <p>\n    Maintained by <a href=\"https://www.zakodium.com\">Zakodium</a>\n  </p>\n</h3>\n\n# iobuffer\n\n[![NPM version](https://img.shields.io/npm/v/iobuffer.svg)](https://www.npmjs.com/package/iobuffer)\n[![npm download](https://img.shields.io/npm/dm/iobuffer.svg)](https://www.npmjs.com/package/iobuffer)\n[![test coverage](https://img.shields.io/codecov/c/github/image-js/iobuffer.svg)](https://codecov.io/gh/image-js/iobuffer)\n[![license](https://img.shields.io/npm/l/iobuffer.svg)](https://github.com/image-js/iobuffer/blob/main/LICENSE)\n\nRead and write binary data in ArrayBuffers.\n\n## Installation\n\n```console\nnpm install iobuffer\n```\n\n## API\n\n### [Complete API documentation](https://image-js.github.io/iobuffer/)\n\n### Usage example\n\n```js\nconst { IOBuffer } = require('iobuffer');\n\nconst io = new IOBuffer();\n// Pointer offset is 0\nio.writeChars('Hello world') // Write 11 chars, pointer offset now 11\n  .writeUint32(42) // Write 32-bit int (default is little-endian), pointer offset now 15\n  .setBigEndian() // Switch to big-endian mode\n  .writeUint32(24) // Write another 32-bit int, but big-endian, pointer offset now 19\n  .mark() // Bookmark current pointer offset (19)\n  .skip(2) // Pointer offset now 21\n  .writeBoolean(true) // Write 0xff, pointer offset now 22\n  .reset() // Go to bookmarked pointer offset, pointer offset now 19\n  .setLittleEndian() // Go back to little endian mode\n  .writeUint16(18) // Write 16-bit unsigned integer in the previously skipped 2 bytes, pointer offset now 21\n  .rewind() // Pointer offset back to 0\n  .toArray(); // Get a Uint8Array over the written part [0-21] of the internal ArrayBuffer\n```\n\n## License\n\n[MIT](./LICENSE)\n","publish_time":1474360690145,"_cnpm_publish_time":1474360690145,"dist-tags":{"latest":"6.0.1"}}