{"name":"bops","version":"0.0.3","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","./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":"~1.0.1"},"dependencies":{"base64-js":"0.0.2","to-utf8":"0.0.1"},"testling":{"files":"test/index.js","browsers":["ie/6..latest","chrome/20..latest","firefox/10..latest","safari/latest","opera/11.0..latest","iphone/6","ipad/6"]},"_id":"bops@0.0.3","dist":{"shasum":"c5cbf6fea8be7401ca5ea6d1679e6c4e8b407c79","tarball":"http://registry-npm.ywwl.com/bops/download/bops-0.0.3.tgz","integrity":"sha512-1khcWD+1vAEnl1GHqJ2KFeR4qG/WCj9yZZ3K/cwdnRUjy6hFOlUuyboy+cHHiFpx0ZqLcjMYouWv0USQsoQ6HA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD5r/+/VlIk/3EYL2oJD3+EhM66GLig4plpAZyabTc5UQIhAMfSXw80UG7KKdxJgUlEuEwDeIpObsNF6n9LAIij2Dwx"}],"size":5367,"noattachment":false,"key":"/bops/-/bops-0.0.3.tgz"},"_from":".","_npmVersion":"1.2.14","_npmUser":{"name":"chrisdickinson","email":"chris@neversaw.us"},"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":1367798353387,"_cnpm_publish_time":1367798353387,"dist-tags":{"latest":"1.0.1"}}