> > We had previously talked about an even tighter binary protocol, but perhaps > > harder to generalize a parser around. This doesn't seem different > > enough from the existing binary protocol to warrant introducing an > > incompatibility. > > I honestly can't remember what else was removed in our old discussions. > Old man is old. Something about the "reserved bytes" turning into a longer > flag set maybe? This proposal just drops those bytes. > > What I may have mentioned was that uh... size length encoding, similar to > what MySQL uses. So a key length of < 252 bytes would be a 1b length. a > body length of just under 2^16 would be 3 bytes (253 as a flag + 2 bytes), > and over would be 4 bytes (254 as a flag + 3 bytes). > > Could be nice for getting CAS down in size, but you end up inflating an > extra byte for larger values. >
Er duh. didn't explicitly say; this would remove two more bytes from the common case (8 bit keylen, < 65k value size). if you use CAS frequently it'll inflate a byte so you only end up saving.... one byte.
