static long encode_zigzag(long x) {
        return ((x << 1) ^ (x >> 63)); // note ASR
    }
Class for serializing Slime data into binary format, or deserializing
the binary format into a Slime object.
vespajlib/src/main/java/com/yahoo/slime/BinaryFormat.java