incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul \"LeoNerd\" Evans" <leon...@leonerd.org.uk>
Subject Re: CQL decimal encoding
Date Mon, 24 Feb 2014 19:43:07 GMT
On Mon, 24 Feb 2014 19:14:48 +0000
Ben Hood <0x6e6562@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

leonerd@leonerd.org.uk
ICQ# 4135350       |  Registered Linux# 179460
http://www.leonerd.org.uk/

Mime
View raw message