public static int encodeInt8(PositionedByteRange dst, byte val, Order ord) {
    final int offset = dst.getOffset(), start = dst.getPosition();
    dst.put(FIXED_INT8).put((byte) (val ^ 0x80));
    ord.apply(dst.getBytes(), offset + start, 2);
    return 2;
  }
Encode an {@code int8} value using the fixed-length encoding.
@return the number of bytes written.
@see #encodeInt64(PositionedByteRange, long, Order)
@see #decodeInt8(PositionedByteRange)
hbase-common/src/main/java/org/apache/hadoop/hbase/util/OrderedBytes.java