protocol-buffers / 3.1.6 last updated 2 months ago created on May 5th 2014
Install
npm install --save protocol-buffers
Clone
git clone git@github.com:mafintosh/protocol-buffers.git
dependencies
show all 53
| main |
|
generate-function | 2.0.0 | MIT |
|
|
generate-object-property | 1.2.0 | MIT | |
|
|
signed-varint | 2.0.0 | MIT | |
|
|
brfs | 1.4.3 | MIT | |
|
|
varint | 4.0.0 | MIT |
maintainers
versions
50 total
| 3.1.6 | 2 months ago | mafintosh |
| 3.1.5 | 3 months ago | mafintosh |
| 3.1.4 | 5 months ago | mafintosh |
| 3.1.3 | 8 months ago | mafintosh |
| 3.1.2 | a year ago | mafintosh |
| 3.1.1 | a year ago | mafintosh |
| 3.1.0 | a year ago | mafintosh |
| 3.0.0 | a year ago | mafintosh |
| 2.7.0 | a year ago | mafintosh |
| 2.6.1 | a year ago | mafintosh |
| 2.6.0 | a year ago | mafintosh |
| 2.5.1 | a year ago | mafintosh |
| 2.5.0 | a year ago | mafintosh |
| 2.4.7 | a year ago | mafintosh |
| 2.4.6 | a year ago | mafintosh |
| 2.4.5 | a year ago | mafintosh |
| 2.4.4 | a year ago | mafintosh |
| 2.4.3 | a year ago | mafintosh |
| 2.4.2 | a year ago | mafintosh |
| 2.4.1 | a year ago | mafintosh |
| 2.4.0 | 2 years ago | mafintosh |
| 2.3.6 | 2 years ago | mafintosh |
| 2.3.4 | 2 years ago | mafintosh |
| 2.3.3 | 2 years ago | mafintosh |
| 2.3.2 | 2 years ago | mafintosh |
| 2.3.1 | 2 years ago | mafintosh |
| 2.3.0 | 2 years ago | mafintosh |
| 2.2.1 | 2 years ago | mafintosh |
| 2.2.0 | 2 years ago | mafintosh |
| 2.1.4 | 2 years ago | mafintosh |
| 2.1.3 | 2 years ago | mafintosh |
| 2.1.2 | 2 years ago | mafintosh |
| 2.1.1 | 2 years ago | mafintosh |
| 2.1.0 | 2 years ago | mafintosh |
| 2.0.4 | 2 years ago | mafintosh |
| 2.0.3 | 2 years ago | mafintosh |
| 2.0.2 | 2 years ago | mafintosh |
| 2.0.1 | 2 years ago | mafintosh |
| 2.0.0 | 2 years ago | mafintosh |
| 1.0.1 | 2 years ago | mafintosh |
| 1.0.0 | 2 years ago | mafintosh |
| 0.4.2 | 2 years ago | mafintosh |
| 0.4.1 | 2 years ago | mafintosh |
| 0.4.0 | 2 years ago | mafintosh |
| 0.3.0 | 2 years ago | mafintosh |
| 0.2.3 | 2 years ago | mafintosh |
| 0.2.2 | 2 years ago | mafintosh |
| 0.2.1 | 2 years ago | mafintosh |
| 0.2.0 | 2 years ago | mafintosh |
| 0.1.0 | 2 years ago | mafintosh |
readme
protocol-buffers
Protocol Buffers for Node.js
Usage
Assuming the following test.proto file exists
Use the above proto file to encode/decode messages by doing
To decode a message use Test.decode
Enums are accessed in the same way as messages
Nested emums are accessed as properties on the corresponding message
See the Google Protocol Buffers docs for more information about the available types etc.
Performance
This module is fast.
It uses code generation to build as fast as possible encoders/decoders for the protobuf schema.
You can run the benchmarks yourself by doing npm run bench.
On my Macbook Air it gives the following results
Note that JSON parsing/serialization in node is a native function that is really fast.
Leveldb encoding compatibility
Compiled protocol buffers messages are valid levelup encodings.
This means you can pass them as valueEncoding and keyEncoding.
License
MIT