{"_id":"protocol-buffers-stream","_rev":"4646835","name":"protocol-buffers-stream","description":"Streaming protocol buffers for Node.js","dist-tags":{"latest":"1.3.1"},"maintainers":[{"name":"mafintosh","email":""}],"time":{"modified":"2026-04-10T20:19:50.000Z","created":"2014-08-05T18:39:16.355Z","1.3.1":"2016-01-23T18:31:09.361Z","1.3.0":"2015-10-18T14:54:39.863Z","1.2.0":"2014-08-09T06:44:43.269Z","1.1.1":"2014-08-05T19:23:44.923Z","1.1.0":"2014-08-05T19:08:04.349Z","1.0.0":"2014-08-05T18:46:01.716Z","0.0.0":"2014-08-05T18:39:16.355Z"},"users":{},"author":{"name":"Mathias Buus"},"repository":{"type":"git","url":"https://github.com/mafintosh/protocol-buffers-stream"},"versions":{"1.3.1":{"name":"protocol-buffers-stream","version":"1.3.1","description":"Streaming protocol buffers for Node.js","main":"index.js","directories":{"test":"test"},"dependencies":{"debug":"^2.2.0","protocol-buffers":"^2.3.0","readable-stream":"^2.0.2","varint":"^3.0.0"},"devDependencies":{"standard":"^5.3.1","tape":"^2.14.0","through2":"^0.5.1"},"scripts":{"test":"standard && tape test"},"repository":{"type":"git","url":"https://github.com/mafintosh/protocol-buffers-stream"},"keywords":["protobuf","protocol","buffers","stream","streaming"],"author":{"name":"Mathias Buus"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/protocol-buffers-stream/issues"},"homepage":"https://github.com/mafintosh/protocol-buffers-stream","gitHead":"b93fc4e6086e566f1b2be461fef4fbcfd648b515","_id":"protocol-buffers-stream@1.3.1","_shasum":"edbfd1bda7aa17644e7d0d6ab3ca3c322273540f","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.3","_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"dist":{"shasum":"edbfd1bda7aa17644e7d0d6ab3ca3c322273540f","size":3928,"noattachment":false,"key":"/protocol-buffers-stream/-/protocol-buffers-stream-1.3.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/protocol-buffers-stream/download/protocol-buffers-stream-1.3.1.tgz"},"maintainers":[{"name":"mafintosh","email":""}],"_cnpmcore_publish_time":"2021-12-19T18:30:43.898Z","publish_time":1453573869361,"_cnpm_publish_time":1453573869361},"1.3.0":{"name":"protocol-buffers-stream","version":"1.3.0","description":"Streaming protocol buffers for Node.js","main":"index.js","directories":{"test":"test"},"dependencies":{"debug":"^1.0.4","protocol-buffers":"^2.3.0","readable-stream":"^2.0.2","varint":"^3.0.0"},"devDependencies":{"standard":"^5.3.1","tape":"^2.14.0","through2":"^0.5.1"},"scripts":{"test":"standard && tape test"},"repository":{"type":"git","url":"https://github.com/mafintosh/protocol-buffers-stream"},"keywords":["protobuf","protocol","buffers","stream","streaming"],"author":{"name":"Mathias Buus"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/protocol-buffers-stream/issues"},"homepage":"https://github.com/mafintosh/protocol-buffers-stream","gitHead":"beab6b1214521dc1eb0fdc0b44848607e5c43ca5","_id":"protocol-buffers-stream@1.3.0","_shasum":"8126394dfa4787d2272b511b3916e838aa295407","_from":".","_npmVersion":"2.14.4","_nodeVersion":"4.1.1","_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"dist":{"shasum":"8126394dfa4787d2272b511b3916e838aa295407","size":3928,"noattachment":false,"key":"/protocol-buffers-stream/-/protocol-buffers-stream-1.3.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/protocol-buffers-stream/download/protocol-buffers-stream-1.3.0.tgz"},"maintainers":[{"name":"mafintosh","email":""}],"_cnpmcore_publish_time":"2021-12-19T18:30:43.037Z","publish_time":1445180079863,"_cnpm_publish_time":1445180079863},"1.2.0":{"name":"protocol-buffers-stream","version":"1.2.0","description":"Streaming protocol buffers for Node.js","main":"index.js","directories":{"test":"test"},"dependencies":{"debug":"^1.0.4","protocol-buffers":"^2.3.0","varint":"^3.0.0"},"devDependencies":{"tape":"^2.14.0","through2":"^0.5.1"},"scripts":{"test":"tape test"},"repository":{"type":"git","url":"https://github.com/mafintosh/protocol-buffers-stream"},"keywords":["protobuf","protocol","buffers","stream","streaming"],"author":{"name":"Mathias Buus"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/protocol-buffers-stream/issues"},"homepage":"https://github.com/mafintosh/protocol-buffers-stream","gitHead":"e0edfb49316b9645908f16bb24f03482b38f4ce5","_id":"protocol-buffers-stream@1.2.0","_shasum":"20c15853c4134e18c7314f362922aaea36c2af87","_from":".","_npmVersion":"1.4.23","_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"maintainers":[{"name":"mafintosh","email":""}],"dist":{"shasum":"20c15853c4134e18c7314f362922aaea36c2af87","size":3264,"noattachment":false,"key":"/protocol-buffers-stream/-/protocol-buffers-stream-1.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/protocol-buffers-stream/download/protocol-buffers-stream-1.2.0.tgz"},"_cnpmcore_publish_time":"2021-12-19T18:30:42.152Z","publish_time":1407566683269,"_cnpm_publish_time":1407566683269},"1.1.1":{"name":"protocol-buffers-stream","version":"1.1.1","description":"Streaming protocol buffers for Node.js","main":"index.js","directories":{"test":"test"},"dependencies":{"debug":"^1.0.4","protocol-buffers":"^2.3.0","varint":"^3.0.0"},"devDependencies":{"tape":"^2.14.0","through2":"^0.5.1"},"scripts":{"test":"tape test"},"repository":{"type":"git","url":"https://github.com/mafintosh/protocol-buffers-stream"},"keywords":["protobuf","protocol","buffers","stream","streaming"],"author":{"name":"Mathias Buus"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/protocol-buffers-stream/issues"},"homepage":"https://github.com/mafintosh/protocol-buffers-stream","gitHead":"2f4b0ccca4efeefa1197e9b1aa520d64838994e8","_id":"protocol-buffers-stream@1.1.1","_shasum":"aca5ce2086687539a3acddafddb2b3c0deae33e8","_from":".","_npmVersion":"1.4.21","_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"maintainers":[{"name":"mafintosh","email":""}],"dist":{"shasum":"aca5ce2086687539a3acddafddb2b3c0deae33e8","size":3139,"noattachment":false,"key":"/protocol-buffers-stream/-/protocol-buffers-stream-1.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/protocol-buffers-stream/download/protocol-buffers-stream-1.1.1.tgz"},"_cnpmcore_publish_time":"2021-12-19T18:30:41.241Z","publish_time":1407266624923,"_cnpm_publish_time":1407266624923},"1.1.0":{"name":"protocol-buffers-stream","version":"1.1.0","description":"Streaming protocol buffers for Node.js","main":"index.js","directories":{"test":"test"},"dependencies":{"debug":"^1.0.4","protocol-buffers":"^2.3.0","varint":"^3.0.0"},"devDependencies":{"tape":"^2.14.0","through2":"^0.5.1"},"scripts":{"test":"tape test"},"repository":{"type":"git","url":"https://github.com/mafintosh/protocol-buffers-stream"},"keywords":["protobuf","protocol","buffers","stream","streaming"],"author":{"name":"Mathias Buus"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/protocol-buffers-stream/issues"},"homepage":"https://github.com/mafintosh/protocol-buffers-stream","gitHead":"18a8c4430d92d00a72fcbdd7b838e1c80ed5aeb6","_id":"protocol-buffers-stream@1.1.0","_shasum":"7d795dac97c13e3eb5a2609d8c8bb1a1664b1349","_from":".","_npmVersion":"1.4.21","_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"maintainers":[{"name":"mafintosh","email":""}],"dist":{"shasum":"7d795dac97c13e3eb5a2609d8c8bb1a1664b1349","size":3077,"noattachment":false,"key":"/protocol-buffers-stream/-/protocol-buffers-stream-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/protocol-buffers-stream/download/protocol-buffers-stream-1.1.0.tgz"},"_cnpmcore_publish_time":"2021-12-19T18:30:40.381Z","publish_time":1407265684349,"_cnpm_publish_time":1407265684349},"1.0.0":{"name":"protocol-buffers-stream","version":"1.0.0","description":"Streaming protocol buffers for Node.js","main":"index.js","directories":{"test":"test"},"dependencies":{"debug":"^1.0.4","protocol-buffers":"^2.3.0","varint":"^3.0.0"},"devDependencies":{"tape":"^2.14.0","through2":"^0.5.1"},"scripts":{"test":"tape test"},"repository":{"type":"git","url":"https://github.com/mafintosh/protocol-buffers-stream"},"keywords":["protobuf","protocol","buffers","stream","streaming"],"author":{"name":"Mathias Buus"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/protocol-buffers-stream/issues"},"homepage":"https://github.com/mafintosh/protocol-buffers-stream","gitHead":"87d75c0baa70bf2a96a17866cb31fd5291311631","_id":"protocol-buffers-stream@1.0.0","_shasum":"a3c8667fafc829b94ca6d830894d83b99b9ce70f","_from":".","_npmVersion":"1.4.21","_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"maintainers":[{"name":"mafintosh","email":""}],"dist":{"shasum":"a3c8667fafc829b94ca6d830894d83b99b9ce70f","size":3009,"noattachment":false,"key":"/protocol-buffers-stream/-/protocol-buffers-stream-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/protocol-buffers-stream/download/protocol-buffers-stream-1.0.0.tgz"},"_cnpmcore_publish_time":"2021-12-19T18:30:39.504Z","publish_time":1407264361716,"_cnpm_publish_time":1407264361716},"0.0.0":{"name":"protocol-buffers-stream","version":"0.0.0","description":"Streaming protocol buffers for Node.js","main":"index.js","directories":{"test":"test"},"dependencies":{"debug":"^1.0.4","protocol-buffers":"^2.3.0","varint":"^3.0.0"},"devDependencies":{"tape":"^2.14.0","through2":"^0.5.1"},"scripts":{"test":"tape test"},"repository":{"type":"git","url":"https://github.com/mafintosh/protocol-buffers-stream"},"keywords":["protobuf","protocol","buffers","stream","streaming"],"author":{"name":"Mathias Buus"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/protocol-buffers-stream/issues"},"homepage":"https://github.com/mafintosh/protocol-buffers-stream","gitHead":"1e7e616c6dd789519c05787fab54a23bba42e098","_id":"protocol-buffers-stream@0.0.0","_shasum":"c6fa93416cad103eb26ed9d4045755caf9f8eae1","_from":".","_npmVersion":"1.4.21","_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"maintainers":[{"name":"mafintosh","email":""}],"dist":{"shasum":"c6fa93416cad103eb26ed9d4045755caf9f8eae1","size":2891,"noattachment":false,"key":"/protocol-buffers-stream/-/protocol-buffers-stream-0.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/protocol-buffers-stream/download/protocol-buffers-stream-0.0.0.tgz"},"_cnpmcore_publish_time":"2021-12-19T18:30:37.183Z","publish_time":1407263956355,"_cnpm_publish_time":1407263956355}},"readme":"# protocol-buffers-stream\n\nStreaming protocol buffers for Node.js\n\n```\nnpm install protocol-buffers-stream\n```\n\n[![build status](http://img.shields.io/travis/mafintosh/protocol-buffers-stream.svg?style=flat)](http://travis-ci.org/mafintosh/protocol-buffers-stream)\n\n## Usage\n\nAssuming you have the following schema\n\n```\nmessage Test {\n  required string hello = 1;\n}\n```\n\nRun the following example\n\n``` js\nvar protobufs = require('protocol-buffers-stream')\nvar fs = require('fs')\n\nvar schema = fs.readFileSync('schema.proto')\nvar createStream = protobufs(schema)\n\nvar stream = createStream()\n\n// send a test message\n// if your schema message was named example this method would be called example\nstream.test({\n  hello: 'world'\n})\n\n// receive a test message\nstream.on('test', function(m) {\n  console.log(m)\n})\n\n// just pipe to ourselves for testing\nstream.pipe(stream)\n```\n\n## Encoding\n\nEach buffer is sent using the following encoding\n\n```\n----------------------------------------------\n| frame length | message id | message buffer |\n----------------------------------------------\n```\n\nThe first message sent is a handshake message that contains the message\nids of the following messages\n\nIf you know that your schema won't change you can pass `{handshake:false}` to `createStream`\nto disable handshaking\n\n## License\n\nMIT","_attachments":{},"homepage":"https://github.com/mafintosh/protocol-buffers-stream","bugs":{"url":"https://github.com/mafintosh/protocol-buffers-stream/issues"},"license":"MIT"}