{
  "name": "buffers",
  "description": "Treat a collection of Buffers as a single contiguous partially mutable Buffer.",
  "version": "0.1.1",
  "repository": {
    "type": "git",
    "url": "http://github.com/substack/node-buffers.git"
  },
  "author": {
    "name": "James Halliday",
    "email": "mail@substack.net",
    "url": "http://substack.net"
  },
  "main": "./index",
  "scripts": {
    "test": "expresso"
  },
  "engines": {
    "node": ">=0.2.0"
  },
  "readme": "buffers\n=======\n\nTreat a collection of Buffers as a single contiguous partially mutable Buffer.\n\nWhere possible, operations execute without creating a new Buffer and copying\neverything over.\n\nThis is a cleaner more Buffery rehash of\n[bufferlist](http://github.com/substack/node-bufferlist).\n\nexample\n=======\n\nslice\n-----\n\n    var Buffers = require('buffers');\n    var bufs = Buffers();\n    bufs.push(new Buffer([1,2,3]));\n    bufs.push(new Buffer([4,5,6,7]));\n    bufs.push(new Buffer([8,9,10]));\n    \n    console.dir(bufs.slice(2,8))\n\noutput:\n\n    $ node examples/slice.js \n    <Buffer 03 04 05 06 07 08>\n\nsplice\n------\n\n    var Buffers = require('buffers');\n    var bufs = Buffers([\n        new Buffer([1,2,3]),\n        new Buffer([4,5,6,7]),\n        new Buffer([8,9,10]),\n    ]);\n    \n    var removed = bufs.splice(2, 4);\n    console.dir({\n        removed : removed.slice(),\n        bufs : bufs.slice(),\n    });\n    \noutput:\n\n    $ node examples/splice.js\n    { removed: <Buffer 03 04 05 06>,\n      bufs: <Buffer 01 02 07 08 09 0a> }\n\nmethods\n=======\n\nBuffers(buffers)\n----------------\n\nCreate a Buffers with an array of `Buffer`s if specified, else `[]`.\n\n.push(buf1, buf2...)\n--------------------\n\nPush buffers onto the end. Just like `Array.prototype.push`.\n\n.unshift(buf1, buf2...)\n-----------------------\n\nUnshift buffers onto the head. Just like `Array.prototype.unshift`.\n\n.slice(i, j)\n------------\n\nSlice a range out of the buffer collection as if it were contiguous.\nWorks just like the `Array.prototype.slice` version.\n\n.splice(i, howMany, replacements)\n---------------------------------\n\nSplice the buffer collection as if it were contiguous.\nWorks just like `Array.prototype.splice`, even the replacement part!\n\n.copy(dst, dstStart, start, end)\n--------------------------------\n\nCopy the buffer collection as if it were contiguous to the `dst` Buffer with the\nspecified bounds.\nWorks just like `Buffer.prototype.copy`.\n\n.get(i)\n-------\n\nGet a single element at index `i`.\n\n.set(i, x)\n----------\n\nSet a single element's value at index `i`.\n\n.indexOf(needle, offset)\n----------\n\nFind a string or buffer `needle` inside the buffer collection. Returns\nthe position of the search string or -1 if the search string was not\nfound.\n\nProvide an `offset` to skip that number of characters at the beginning\nof the search. This can be used to find additional matches.\n\nThis function will return the correct result even if the search string\nis spread out over multiple internal buffers.\n\n.toBuffer()\n-----------\n\nConvert the buffer collection to a single buffer, equivalent with `.slice(0, buffers.length)`;\n\n.toString(encoding, start, end)\n-----------\n\nDecodes and returns a string from the buffer collection.\nWorks just like `Buffer.prototype.toString`\n",
  "readmeFilename": "README.markdown",
  "bugs": {
    "url": "https://github.com/substack/node-buffers/issues"
  },
  "_id": "buffers@0.1.1",
  "_from": "buffers@~0.1.1"
}
