bin-protocol
Advanced tools
Comparing version 2.0.7 to 2.0.8
@@ -9,3 +9,3 @@ { | ||
}, | ||
"version": "2.0.7", | ||
"version": "2.0.8", | ||
"main": "./lib/index.js", | ||
@@ -12,0 +12,0 @@ "keywords": ["buffer", "raw", "binary", "protocol", "parser", "reader", "builder"], |
@@ -151,2 +151,13 @@ # bin-protocol | ||
Give a buffer where first 32bit integer is a number (3) of further 32bit integers (2,3 and 4): | ||
```javascript | ||
var buffer = new Buffer(16); | ||
buffer.writeInt32BE(3, 0); | ||
buffer.writeInt32BE(2, 4); | ||
buffer.writeInt32BE(3, 8); | ||
buffer.writeInt32BE(4, 12); | ||
``` | ||
All next 3 examples are essentialy identical: | ||
@@ -168,2 +179,4 @@ | ||
}); | ||
protocol.read(buffer).customArray('items').result; // => { items: [2, 3, 4] } | ||
``` | ||
@@ -181,2 +194,4 @@ | ||
}); | ||
protocol.read(buffer).loopArray('items').result; // => { items: [2, 3, 4] } | ||
``` | ||
@@ -200,2 +215,4 @@ | ||
}); | ||
protocol.read(buffer).loopArrayEnd('items').result; // => { items: [2, 3, 4] } | ||
``` | ||
@@ -207,3 +224,3 @@ | ||
test.proto: | ||
Given a test.proto: | ||
@@ -210,0 +227,0 @@ ```proto |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
135700
276