I don't know if it's by design or if it's by oversight that the data types aren't part of the binary protocol specification. I had to reverse engineer how to encode and decode all of them for the Ruby driver. There were definitely a few bugs in the first few versions that could have been avoided if there was a specification available.
T# On Mon, Feb 24, 2014 at 8:43 PM, Paul "LeoNerd" Evans < leon...@leonerd.org.uk> wrote: > On Mon, 24 Feb 2014 19:14:48 +0000 > Ben Hood <0x6e6...@gmail.com> wrote: > > > So I have a question about the encoding of 0: \x00\x00\x00\x00\x00. > > The first four octets are the decimal shift (0), and the remaining ones > (one in this case) encode a varint - 0 in this case. So it's > > 0 * 10**0 > > literally zero. > > Technically the decimal shift matters not for zero - any four bytes > could be given as the shift, ending in \x00, but 0 is the simplest. > > -- > Paul "LeoNerd" Evans > > leon...@leonerd.org.uk > ICQ# 4135350 | Registered Linux# 179460 > http://www.leonerd.org.uk/ >