public static long decodeInt64(PositionedByteRange src) {
    final byte header = src.get();
    assert header == FIXED_INT64 || header == DESCENDING.apply(FIXED_INT64);
    Order ord = header == FIXED_INT64 ? ASCENDING : DESCENDING;
    long val = (ord.apply(src.get()) ^ 0x80) & 0xff;
    for (int i = 1; i < 8; i++) {
      val = (val << 8) + (ord.apply(src.get()) & 0xff);
    }
    return val;
  }
Decode an {@code int64} value.
@see #encodeInt64(PositionedByteRange, long, Order)
hbase-common/src/main/java/org/apache/hadoop/hbase/util/OrderedBytes.java