How to decode multiple objects in a single buffer?
See original GitHub issueFor example, currently the library behaves this way.
const buf = new Uint8Array([1, 2]);
console.log(unpack(buf)); // 1
console.log(unpack(buf)); // 1
But we would like it to behave the following way.
const buf = new Uint8Array([1, 2]);
console.log(unpack(buf)); // 1
console.log(unpack(buf)); // 2
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Decode an array of messages in protobuf.js - Stack Overflow
Object '); const message = Object.decode(byteData); //this creates one object but the buffer contains multiple objects.
Read more >Using Buffers in Node.js - DigitalOcean
There are many ways we can modify an existing buffer object. Similar to reading, we can modify buffer bytes individually using the array...
Read more >Techniques | Protocol Buffers - Google Developers
Even though Protocol Buffers cannot handle the entire set at once, using Protocol Buffers to encode each piece greatly simplifies your problem: now...
Read more >OpenGL Multiple Objects in One Buffer - YouTube
Shows storing multiple objects into one OpenGL vertex buffer object (VBO).
Read more >Buffer | Node.js v19.3.0 Documentation
Converting a Buffer into a string using one of the above is referred to as decoding, and converting a string into a Buffer...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ok, published in v1.2.1
Yes, I believe so. Thanks!