code: func DecodeComparableVarint(b []byte) ([]byte, int64, error) {
  	if len(b) == 0 {
  		return nil, 0, errors.Trace(errDecodeInsufficient)
  	}
  	first := b[0]
  	if first >= negativeTagEnd && first <= positiveTagStart {
  		return b, int64(first) - negativeTagEnd, nil
  	}
  	b = b[1:]
  	var length int
  	var v uint64
  	if first < negativeTagEnd {
  		length = negativeTagEnd - int(first)
  		v = math.MaxUint64 // negative value has all bits on by default.
  	} else {
  		length = int(first) - positiveTagStart
  	}
  	if len(b) < length {
  		return nil, 0, errors.Trace(errDecodeInsufficient)
  	}
  	for _, c := range b[:length] {
  		v = (v << 8) | uint64(c)
  	}
  	if first > positiveTagStart && v > math.MaxInt64 {
  		return nil, 0, errors.Trace(errDecodeInvalid)
  	} else if first < negativeTagEnd && v <= math.MaxInt64 {
  		return nil, 0, errors.Trace(errDecodeInvalid)
  	}
  	return b[length:], int64(v), nil
  }
docs: // DecodeComparableVarint decodes mem-comparable varint.