{"_id":"buffercursor","_rev":"324980","name":"buffercursor","description":"A simple way to traverse a Buffer like a cursor, updating position along the way","dist-tags":{"latest":"0.0.12"},"maintainers":[{"name":"tjfontaine","email":""}],"time":{"modified":"2021-06-04T02:14:54.000Z","created":"2012-07-01T18:23:52.229Z","0.0.12":"2014-04-21T01:38:50.457Z","0.0.11":"2014-04-20T21:38:24.165Z","0.0.10":"2014-04-20T21:27:50.908Z","0.0.9":"2014-02-19T16:51:44.902Z","0.0.8":"2013-05-31T15:25:53.861Z","0.0.7":"2013-05-20T02:01:17.638Z","0.0.6":"2013-03-23T17:00:18.973Z","0.0.5":"2012-12-24T00:22:15.237Z","0.0.4":"2012-08-26T02:36:19.456Z","0.0.3":"2012-07-02T21:52:14.948Z","0.0.2":"2012-07-02T13:53:22.075Z","0.0.1":"2012-07-01T18:23:52.229Z"},"users":{},"author":{"name":"Timothy J Fontaine","email":"tjfontaine@gmail.com","url":"http://atxconsulting.com"},"repository":{"type":"git","url":"http://github.com/tjfontaine/node-buffercursor.git"},"versions":{"0.0.12":{"name":"buffercursor","version":"0.0.12","author":{"name":"Timothy J Fontaine","email":"tjfontaine@gmail.com","url":"http://atxconsulting.com"},"description":"A simple way to traverse a Buffer like a cursor, updating position along the way","keywords":["buffer","cursor","stream"],"homepage":"http://github.com/tjfontaine/node-buffercursor","bugs":{"url":"http://github.com/tjfontaine/node-buffercursor/issues"},"repository":{"type":"git","url":"http://github.com/tjfontaine/node-buffercursor.git"},"main":"buffercursor.js","engines":{"node":">= 0.5.0"},"dependencies":{"verror":"^1.4.0"},"_id":"buffercursor@0.0.12","dist":{"shasum":"78a9a7f4343ae7d820a8999acc80de591e25a779","size":3403,"noattachment":false,"key":"/buffercursor/-/buffercursor-0.0.12.tgz","tarball":"http://registry.cnpm.dingdandao.com/buffercursor/download/buffercursor-0.0.12.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"tjfontaine","email":"tjfontaine@gmail.com"},"maintainers":[{"name":"tjfontaine","email":""}],"directories":{},"publish_time":1398044330457,"_cnpm_publish_time":1398044330457,"_hasShrinkwrap":false},"0.0.11":{"name":"buffercursor","version":"0.0.11","author":{"name":"Timothy J Fontaine","email":"tjfontaine@gmail.com","url":"http://atxconsulting.com"},"description":"A simple way to traverse a Buffer like a cursor, updating position along the way","keywords":["buffer","cursor","stream"],"homepage":"http://github.com/tjfontaine/node-buffercursor","bugs":{"url":"http://github.com/tjfontaine/node-buffercursor/issues"},"repository":{"type":"git","url":"http://github.com/tjfontaine/node-buffercursor.git"},"main":"buffercursor.js","engines":{"node":">= 0.5.0"},"dependencies":{"verror":"^1.4.0"},"_id":"buffercursor@0.0.11","dist":{"shasum":"b3df2576f03f3512358f724c568a46966ed040b6","size":3181,"noattachment":false,"key":"/buffercursor/-/buffercursor-0.0.11.tgz","tarball":"http://registry.cnpm.dingdandao.com/buffercursor/download/buffercursor-0.0.11.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"tjfontaine","email":"tjfontaine@gmail.com"},"maintainers":[{"name":"tjfontaine","email":""}],"directories":{},"publish_time":1398029904165,"_cnpm_publish_time":1398029904165,"_hasShrinkwrap":false},"0.0.10":{"name":"buffercursor","version":"0.0.10","author":{"name":"Timothy J Fontaine","email":"tjfontaine@gmail.com","url":"http://atxconsulting.com"},"description":"A simple way to traverse a Buffer like a cursor, updating position along the way","keywords":["buffer","cursor","stream"],"homepage":"http://github.com/tjfontaine/node-buffercursor","bugs":{"url":"http://github.com/tjfontaine/node-buffercursor/issues"},"repository":{"type":"git","url":"http://github.com/tjfontaine/node-buffercursor.git"},"main":"buffercursor.js","engines":{"node":">= 0.5.0"},"dependencies":{"verror":"^1.4.0"},"_id":"buffercursor@0.0.10","dist":{"shasum":"8d5cdd23ac58824f84b85c59c17ae70b52a7d12a","size":3193,"noattachment":false,"key":"/buffercursor/-/buffercursor-0.0.10.tgz","tarball":"http://registry.cnpm.dingdandao.com/buffercursor/download/buffercursor-0.0.10.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"tjfontaine","email":"tjfontaine@gmail.com"},"maintainers":[{"name":"tjfontaine","email":""}],"directories":{},"publish_time":1398029270908,"_cnpm_publish_time":1398029270908,"_hasShrinkwrap":false},"0.0.9":{"name":"buffercursor","version":"0.0.9","author":{"name":"Timothy J Fontaine","email":"tjfontaine@gmail.com","url":"http://atxconsulting.com"},"description":"A simple way to traverse a Buffer like a cursor, updating position along the way","keywords":["buffer","cursor","stream"],"homepage":"http://github.com/tjfontaine/node-buffercursor","bugs":{"url":"http://github.com/tjfontaine/node-buffercursor/issues"},"repository":{"type":"git","url":"http://github.com/tjfontaine/node-buffercursor.git"},"main":"buffercursor.js","engines":{"node":">= 0.5.0"},"_id":"buffercursor@0.0.9","dist":{"shasum":"a9f18597b166d698e8206ffd5963d9c49563ff28","size":2892,"noattachment":false,"key":"/buffercursor/-/buffercursor-0.0.9.tgz","tarball":"http://registry.cnpm.dingdandao.com/buffercursor/download/buffercursor-0.0.9.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"tjfontaine","email":"tjfontaine@gmail.com"},"maintainers":[{"name":"tjfontaine","email":""}],"directories":{},"publish_time":1392828704902,"_cnpm_publish_time":1392828704902,"_hasShrinkwrap":false},"0.0.8":{"name":"buffercursor","version":"0.0.8","author":{"name":"Timothy J Fontaine","email":"tjfontaine@gmail.com","url":"http://atxconsulting.com"},"description":"A simple way to traverse a Buffer like a cursor, updating position along the way","keywords":["buffer","cursor","stream"],"homepage":"http://github.com/tjfontaine/node-buffercursor","bugs":{"url":"http://github.com/tjfontaine/node-buffercursor/issues"},"repository":{"type":"git","url":"http://github.com/tjfontaine/node-buffercursor.git"},"main":"buffercursor.js","engines":{"node":">= 0.5.0"},"readmeFilename":"README.md","_id":"buffercursor@0.0.8","dist":{"shasum":"911687a7941b1a7c7176e5228ab59a5e99dd788c","size":2889,"noattachment":false,"key":"/buffercursor/-/buffercursor-0.0.8.tgz","tarball":"http://registry.cnpm.dingdandao.com/buffercursor/download/buffercursor-0.0.8.tgz"},"_from":".","_npmVersion":"1.2.21","_npmUser":{"name":"tjfontaine","email":"tjfontaine@gmail.com"},"maintainers":[{"name":"tjfontaine","email":""}],"directories":{},"publish_time":1370013953861,"_cnpm_publish_time":1370013953861,"_hasShrinkwrap":false},"0.0.7":{"name":"buffercursor","version":"0.0.7","author":{"name":"Timothy J Fontaine","email":"tjfontaine@gmail.com","url":"http://atxconsulting.com"},"description":"A simple way to traverse a Buffer like a cursor, updating position along the way","keywords":["buffer","cursor","stream"],"homepage":"http://github.com/tjfontaine/node-buffercursor","bugs":{"url":"http://github.com/tjfontaine/node-buffercursor/issues"},"repository":{"type":"git","url":"http://github.com/tjfontaine/node-buffercursor.git"},"main":"buffercursor.js","engines":{"node":">= 0.5.0"},"readmeFilename":"README.md","_id":"buffercursor@0.0.7","dist":{"shasum":"941277859cd02e52d6dbf8f353a0446d65ed14ae","size":2876,"noattachment":false,"key":"/buffercursor/-/buffercursor-0.0.7.tgz","tarball":"http://registry.cnpm.dingdandao.com/buffercursor/download/buffercursor-0.0.7.tgz"},"_from":".","_npmVersion":"1.2.21","_npmUser":{"name":"tjfontaine","email":"tjfontaine@gmail.com"},"maintainers":[{"name":"tjfontaine","email":""}],"directories":{},"publish_time":1369015277638,"_cnpm_publish_time":1369015277638,"_hasShrinkwrap":false},"0.0.6":{"name":"buffercursor","version":"0.0.6","author":{"name":"Timothy J Fontaine","email":"tjfontaine@gmail.com","url":"http://atxconsulting.com"},"description":"A simple way to traverse a Buffer like a cursor, updating position along the way","keywords":["buffer","cursor","stream"],"homepage":"http://github.com/tjfontaine/node-buffercursor","bugs":{"url":"http://github.com/tjfontaine/node-buffercursor/issues"},"repository":{"type":"git","url":"http://github.com/tjfontaine/node-buffercursor.git"},"main":"buffercursor.js","engines":{"node":">= 0.5.0"},"readmeFilename":"README.md","_id":"buffercursor@0.0.6","dist":{"shasum":"bd905b80cf5b3b588cdf278308a4e95c0409dcb4","size":2824,"noattachment":false,"key":"/buffercursor/-/buffercursor-0.0.6.tgz","tarball":"http://registry.cnpm.dingdandao.com/buffercursor/download/buffercursor-0.0.6.tgz"},"_from":".","_npmVersion":"1.2.14","_npmUser":{"name":"tjfontaine","email":"tjfontaine@gmail.com"},"maintainers":[{"name":"tjfontaine","email":""}],"directories":{},"publish_time":1364058018973,"_cnpm_publish_time":1364058018973,"_hasShrinkwrap":false},"0.0.5":{"name":"buffercursor","version":"0.0.5","author":{"name":"Timothy J Fontaine","email":"tjfontaine@gmail.com","url":"http://atxconsulting.com"},"description":"A simple way to traverse a Buffer like a cursor, updating position along the way","keywords":["buffer","cursor","stream"],"homepage":"http://github.com/tjfontaine/node-buffercursor","bugs":{"url":"http://github.com/tjfontaine/node-buffercursor/issues"},"repository":{"type":"git","url":"http://github.com/tjfontaine/node-buffercursor.git"},"main":"buffercursor.js","engines":{"node":">= 0.5.0"},"readmeFilename":"README.md","_id":"buffercursor@0.0.5","dist":{"shasum":"3348b37693ad7460bf5584437ec45af76566c5c7","size":3069,"noattachment":false,"key":"/buffercursor/-/buffercursor-0.0.5.tgz","tarball":"http://registry.cnpm.dingdandao.com/buffercursor/download/buffercursor-0.0.5.tgz"},"_npmVersion":"1.1.70","_npmUser":{"name":"tjfontaine","email":"tjfontaine@gmail.com"},"maintainers":[{"name":"tjfontaine","email":""}],"directories":{},"publish_time":1356308535237,"_cnpm_publish_time":1356308535237,"_hasShrinkwrap":false},"0.0.4":{"name":"buffercursor","version":"0.0.4","author":{"name":"Timothy J Fontaine","email":"tjfontaine@gmail.com","url":"http://atxconsulting.com"},"description":"A simple way to traverse a Buffer like a cursor, updating position along the way","keywords":["buffer","cursor","stream"],"homepage":"http://github.com/tjfontaine/node-buffercursor","bugs":{"url":"http://github.com/tjfontaine/node-buffercursor/issues"},"repository":{"type":"git","url":"http://github.com/tjfontaine/node-buffercursor.git"},"main":"buffercursor.js","engines":{"node":">= 0.5.0"},"_id":"buffercursor@0.0.4","dist":{"shasum":"aed6440e12f40636bb5f541d9b3711626fbb52f6","size":2808,"noattachment":false,"key":"/buffercursor/-/buffercursor-0.0.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/buffercursor/download/buffercursor-0.0.4.tgz"},"_npmVersion":"1.1.59","_npmUser":{"name":"tjfontaine","email":"tjfontaine@gmail.com"},"maintainers":[{"name":"tjfontaine","email":""}],"directories":{},"publish_time":1345948579456,"_cnpm_publish_time":1345948579456,"_hasShrinkwrap":false},"0.0.3":{"name":"buffercursor","version":"0.0.3","author":{"name":"Timothy J Fontaine","email":"tjfontaine@gmail.com","url":"http://atxconsulting.com"},"description":"A simple way to traverse a Buffer like a cursor, updating position along the way","keywords":["buffer","cursor","stream"],"homepage":"http://github.com/tjfontaine/node-buffercursor","bugs":{"url":"http://github.com/tjfontaine/node-buffercursor/issues"},"repository":{"type":"git","url":"http://github.com/tjfontaine/node-buffercursor.git"},"main":"buffercursor.js","engines":{"node":">= 0.5.0"},"_id":"buffercursor@0.0.3","dist":{"shasum":"ff1f474ee6aaa095f5d5baaa75190d71d3da4bff","size":2714,"noattachment":false,"key":"/buffercursor/-/buffercursor-0.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/buffercursor/download/buffercursor-0.0.3.tgz"},"maintainers":[{"name":"tjfontaine","email":""}],"directories":{},"publish_time":1341265934948,"_cnpm_publish_time":1341265934948,"_hasShrinkwrap":false},"0.0.2":{"name":"buffercursor","version":"0.0.2","author":{"name":"Timothy J Fontaine","email":"tjfontaine@gmail.com","url":"http://atxconsulting.com"},"description":"A simple way to traverse a Buffer like a cursor, updating position along the way","keywords":["buffer","cursor","stream"],"homepage":"http://github.com/tjfontaine/node-buffercursor","bugs":{"url":"http://github.com/tjfontaine/node-buffercursor/issues"},"repository":{"type":"git","url":"http://github.com/tjfontaine/node-buffercursor.git"},"main":"buffercursor.js","engines":{"node":">= 0.5.0"},"_id":"buffercursor@0.0.2","dist":{"shasum":"31815f9919830fcac1f025c8c4df2e9b571f6ae2","size":2726,"noattachment":false,"key":"/buffercursor/-/buffercursor-0.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/buffercursor/download/buffercursor-0.0.2.tgz"},"maintainers":[{"name":"tjfontaine","email":""}],"directories":{},"publish_time":1341237202075,"_cnpm_publish_time":1341237202075,"_hasShrinkwrap":false},"0.0.1":{"name":"buffercursor","version":"0.0.1","author":{"name":"Timothy J Fontaine","email":"tjfontaine@gmail.com","url":"http://atxconsulting.com"},"description":"A simple way to traverse a Buffer like a cursor, updating position along the way","keywords":["buffer","cursor","stream"],"homepage":"http://github.com/tjfontaine/node-buffercursor","bugs":{"url":"http://github.com/tjfontaine/node-buffercursor/issues"},"repository":{"type":"git","url":"http://github.com/tjfontaine/node-buffercursor.git"},"main":"buffercursor.js","engines":{"node":">= 0.5.0"},"_id":"buffercursor@0.0.1","dist":{"shasum":"6536d6c4986b05b90745b991d7a3565defb9b4f7","size":2720,"noattachment":false,"key":"/buffercursor/-/buffercursor-0.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/buffercursor/download/buffercursor-0.0.1.tgz"},"maintainers":[{"name":"tjfontaine","email":""}],"directories":{},"publish_time":1341167032229,"_cnpm_publish_time":1341167032229,"_hasShrinkwrap":false}},"readme":"BufferCursor\n============\n\nThis is a simple module that allows you to traverse a Buffer iteratively. You\ncan read and write different types and the cursor's position will update with\nthe proper size, which you can see through `.tell()` you can also\n`.seek()`\n\n```javascript\nvar bc = new BufferCursor(buffer);\nbc.readUInt16BE();\nbc.readUInt8();\nbc.readUInt32BE();\nconsole.log(bc.tell());\n```\n\nWill output `7`\n\nMethods\n-------\n\nFor the most part `BufferCursor` and `Buffer` share the same methods, there's\njust a slight alteration in method signature, none of the methods take an\noffset.\n\nSo `.readUInt16LE(10)` in `Buffer` is equivalent to `bs.seek(10); bs.readUInt16LE();`\n\nAll `read[U]Int` and `write[U]Int` methods are reproduced, as are `toString`,\n`write`, `fill`, and `slice`. All of these methods will move the cursor through\nthe stream and do not take an offset parameter, where an `end` parameter would\nnormaly be used, here you supply a `length`.\n\nThe following are additional methods:\n\n * `seek(value)` -- Seek to an arbitrary position in the stream\n * `tell()` -- Return the current location in the stream\n * `eof()` -- Return true if at the end of the stream\n * `toByteArray([method])` -- This is a special helper method which will return\nthe *entire* stream (i.e. from the start) as an array of numbers.\n  - By default it will use `readUInt8` but you can pass in any\n`read[U]Int[8,16,32][LE,BE]` to change what the array is made of\n\nProperties\n----------\n\n * `.buffer` -- Access to the raw buffer\n * `.length` -- The size of the buffer\n","_attachments":{},"homepage":"http://github.com/tjfontaine/node-buffercursor","bugs":{"url":"http://github.com/tjfontaine/node-buffercursor/issues"}}