{"name":"bops","version":"1.0.0","description":"buffer operations","main":"index.js","scripts":{"test":"node test/index.js"},"browser":{"./copy.js":"./typedarray/copy.js","./create.js":"./typedarray/create.js","./from.js":"./typedarray/from.js","./join.js":"./typedarray/join.js","./mapped.js":"./typedarray/mapped.js","./read.js":"./typedarray/read.js","./subarray.js":"./typedarray/subarray.js","./to.js":"./typedarray/to.js","./is.js":"./typedarray/is.js","./write.js":"./typedarray/write.js"},"repository":{"type":"git","url":"git://github.com/chrisdickinson/bops.git"},"keywords":["buffer","operations","binary"],"author":{"name":"Chris Dickinson","email":"chris@neversaw.us"},"license":"MIT","gitHead":"11f41e69b1ab4507027ac162981913b268445b4a","devDependencies":{"tape":"~2.0.0"},"dependencies":{"base64-js":"1.0.2","to-utf8":"0.0.1"},"testling":{"files":"test/index.js","browsers":["firefox/15..nightly","chrome/20..canary","opera/11.6..latest","safari/4..latest","iphone/6","ipad/6"]},"bugs":{"url":"https://github.com/chrisdickinson/bops/issues"},"homepage":"https://github.com/chrisdickinson/bops#readme","_id":"bops@1.0.0","_shasum":"631a8928f1178417eb6f706cf69acdb5e5a4eaad","_from":".","_npmVersion":"3.3.12","_nodeVersion":"5.1.0","_npmUser":{"name":"chrisdickinson","email":"chris@neversaw.us"},"dist":{"shasum":"631a8928f1178417eb6f706cf69acdb5e5a4eaad","tarball":"http://registry-npm.ywwl.com/bops/download/bops-1.0.0.tgz","integrity":"sha512-vVai54aP4LqbM+KNB1giwMo9nHvlV7pc7+iUNHYDTQe6WWI9L/jeSPBC89kUz3xA8qD7sZLldHxOXip1npWbmw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDoqOKsZwC525JDKfCC/Al+Sq548Vd4tMO77HBdZUZZJAiAT3JDLa39Q5xmI9iRPqAs1z7YO4LJA6VxJ9XNnecy3NA=="}],"size":8914,"noattachment":false,"key":"/bops/-/bops-1.0.0.tgz"},"maintainers":[{"name":"chrisdickinson","email":"chris@neversaw.us"}],"directories":{},"readme":"# bops\n\n[![Build Status](https://travis-ci.org/chrisdickinson/tar-parse.png)](https://travis-ci.org/chrisdickinson/tar-parse)\n[![TESTLING](https://ci.testling.com/chrisdickinson/bops.png)](https://ci.testling.com/chrisdickinson/bops)\n[![NPM](https://nodei.co/npm/bops.png?downloads=true&stars=true)](https://nodei.co/npm/bops/)\n\nbuffer/typed array agnostic buffer operations.\n\n`bops` presents a JavaScript API for working with binary data that will work exactly the same in supported browsers and in node. due to the way that `Buffer` is implemented in node it is impossible to take code written against the `Buffer` API and make it work on top of binary data structures (Array Buffers and Typed Arrays) in the browser.\n\ninstead you have to fake the API on top of `Object`, but `Object` isn't designed for holding raw binary data and will be really slow/memory inefficient for many common binary use cases (parsing files, writing files, etc).\n\nuse `bops` in place of `Buffer` or `Uint8Array` to make your binary JS code fast + portable.\n\n```javascript\nvar binary = require('bops')\n\nbinary.readUInt8(new Buffer(10), 0) // === 10\n\n```\n\nin browser, will default to using `Uint8Array` instances.\nin node, will default to using `Buffer` instances.\n\n## API\n\n> ## supported encodings\n> * utf8\n> * hex\n> * base64\n\n#### bops.from(str, encoding=\"utf8\") -> buf\n\ngiven a string (and optional encoding) return a native buffer instance.\nalso accepts arrays.\n\n#### bops.to(buf, encoding=\"utf8\") -> str\n\ngiven a native buffer (and optional encoding) return a string.\n\n#### bops.is(buf) -> bool\n\ngiven a native buffer returns true.  Returns false for other values.\n\n#### bops.subarray(buf, start[, end]) -> buf\n\nreturn a view onto the original buffer.\n\n#### bops.join([buf, buf, buf]) -> buf\n\ncompile several buffers into a single buffer.\n\n#### bops.create(size) -> buf\n\ncreate a native buffer instance of `size`.\n\n#### bops.copy(source, target, target_start, source_start, source_end)\n\nperform a fast copy from one native buffer to another.\n\n#### readUInt8(buf, at)\n#### readInt8(buf, at)\n#### readUInt16LE(buf, at)\n#### readUInt32LE(buf, at)\n#### readInt8(buf, at)\n#### readInt16LE(buf, at)\n#### readInt32LE(buf, at)\n#### readFloatLE(buf, at)\n#### readDoubleLE(buf, at)\n#### readUInt16BE(buf, at)\n#### readUInt32BE(buf, at)\n#### readInt16BE(buf, at)\n#### readInt32BE(buf, at)\n#### readFloatBE(buf, at)\n#### readDoubleBE(buf, at)\n\nread a value from a buffer at a given byte offset.\n\n#### writeUInt8(buf, value, at)\n#### writeInt8(buf, value, at)\n#### writeUInt16LE(buf, value, at)\n#### writeUInt32LE(buf, value, at)\n#### writeInt8(buf, value, at)\n#### writeInt16LE(buf, value, at)\n#### writeInt32LE(buf, value, at)\n#### writeFloatLE(buf, value, at)\n#### writeDoubleLE(buf, value, at)\n#### writeUInt16BE(buf, value, at)\n#### writeUInt32BE(buf, value, at)\n#### writeInt16BE(buf, value, at)\n#### writeInt32BE(buf, value, at)\n#### writeFloatBE(buf, value, at)\n#### writeDoubleBE(buf, value, at)\n\nwrite a value to a buffer at a given byte offset.\n\n# License\n\nMIT\n","publish_time":1453076927194,"_cnpm_publish_time":1453076927194,"dist-tags":{"latest":"1.0.1"}}