// lexiographic sort puts big negatives below small negatives
bits ^= 0xFFFFFFFFFFFFFFFFL;
} else {
bits ^= 0x8000000000000000L;
}
return new ArrayBytes(new byte[] {
'n',
(byte)((bits >>> 8 * 7) & 0xFF),
(byte)((bits >>> 8 * 6) & 0xFF),
(byte)((bits >>> 8 * 5) & 0xFF),
(byte)((bits >>> 8 * 4) & 0xFF),
(byte)((bits >>> 8 * 3) & 0xFF),
(byte)((bits >>> 8 * 2) & 0xFF),
(byte)((bits >>> 8 * 1) & 0xFF),
(byte)((bits) & 0xFF)});
} else if (val instanceof String) {
try {
Bytes valBytes = new ArrayBytes(((String)val).getBytes("utf-8"));
return new CompoundBytes(HEADER_BYTE_S, valBytes);
} catch (UnsupportedEncodingException e) {
throw new RuntimeException(e);
}
} else if (val == null) {