Hi, I've implemented a binary based protocol in node.js, and I need a Int64 to > present the id of the messages. > > What library should I use to represent unsigned integers as well as > UInt64s? > > I've taken a look at the node-int64 module, but it doesn't support any > calculation which is necessary in my case to decode a compressed int64. >
Have you looked at Protocol Buffers? Javascript isn't one of their officially supported languages but there is an independent implementation for javascript which includes an implementation of their I64 type: https://github.com/sirikata/protojs/blob/master/protobuf.js#L114 They have a variable-length wire encoding (base 128) for these as well. I'm doing someone a bit similar for thrift's int64 type so I'm happy to contribute to a joint effort. What kinds of calculation do you want to do? Paddy -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
