pomelonode / pomelo-protobuf Goto Github PK
View Code? Open in Web Editor NEWpomelo-protobuf
License: MIT License
pomelo-protobuf
License: MIT License
like { "tag"; []}, then will not encoded by protobuf, not quite right
test/rootMsgTest.js:25
TypeError: Cannot read property 'length' of null
{"users":[[1,"name"],[2,"name"],[3,"name"]]}.
{"users":[{"id":1,"name":"name"},{"id":2,"name":"name"},{"id":3,"name":"name"}]}
to use the promelo-protobuf?
Thanks for help.
https://github.com/pomelonode/pomelo-protobuf/blob/master/test/codecTest.js
as the code for uInt64
codec test:
var limit = 0x7fffffffffffffff;
Why use a 0~1 random number to multiple 0x7FFF FFFF FFFF FFFF as a limitation? (63bits)
WHY NOT using 0xFFFF FFFF FFFF FFFF? (64bits)
AND otherwise ...
the code for sInt64
codec test:
var limit = 0xfffffffffffff;
It's 54bits.
But for signed int 64bit, because it's been multiple 2 inside the encode function, the limit should be 0x3FFF FFFF FFFF FFFF. (62bits, the head bit for sign, second bit for *2).
So, is there any limitation on UInt64 / SInt64 codec?
I've tested on my Objective-C codec. 0xFFFF...(64bits) works fine on UInt64, and 0x3FFF...(62bits) works find on SInt64.
See this:
Unhandled rejection TypeError: "string" must be a string, Buffer, or ArrayBuffer
like protoc command line toos, compile .proto into .cpp/.h.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.