{"name":"iobuffer","version":"2.0.0","author":{"name":"Michaël Zasso"},"license":"MIT","_id":"iobuffer@2.0.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":"500f40b73540189f239a90edd3b759aaee277184","tarball":"http://registry-npm.ywwl.com/iobuffer/download/iobuffer-2.0.0.tgz","integrity":"sha512-ry0B+on75fkx4eK5RbIuEYRHgnv6gsHuvD2A6gSIpglISZavEo10khnqo4YPWGKlBCiSAl+ckCL+KE8LyDcWzQ==","signatures":[{"sig":"MEQCIAJRFlGdMD92qJxn9KqBN5CfdDFY33EeKlr9rYPB6sJeAiAld4O3YmGyzTZDg+POKD/zBKt0H0SzP52lN9RWqq0Gpw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"size":3067,"noattachment":false,"key":"/iobuffer/-/iobuffer-2.0.0.tgz"},"main":"./IOBuffer.js","_from":".","files":["IOBuffer.js"],"_shasum":"500f40b73540189f239a90edd3b759aaee277184","gitHead":"def369577cdfeab5bddbce96a078e43a82aaf0b9","scripts":{"test":"mocha --require should --reporter mocha-better-spec-reporter --recursive","test-cov":"babel-istanbul cover node_modules/.bin/_mocha -- --require should --reporter dot --recursive","test-travis":"babel-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.4.1","description":"Read and write binary data on ArrayBuffers","directories":{},"_nodeVersion":"5.1.0","devDependencies":{"mocha":"^2.3.3","should":"^7.1.0","babel-istanbul":"^0.4.0","mocha-better-spec-reporter":"^3.0.0"},"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":1448276073333,"_cnpm_publish_time":1448276073333,"dist-tags":{"latest":"6.0.1"}}