public static byte[] decodeBlobCopy(PositionedByteRange src) {
    byte header = src.get();
    if (header == NULL || header == DESCENDING.apply(NULL)) {
      return null;
    }
    assert header == BLOB_COPY || header == DESCENDING.apply(BLOB_COPY);
    Order ord = header == BLOB_COPY ? ASCENDING : DESCENDING;
    final int length = src.getRemaining() - (ASCENDING == ord ? 0 : 1);
    byte[] ret = new byte[length];
    src.get(ret);
    ord.apply(ret, 0, ret.length);
    // DESCENDING ordered BlobCopy requires a termination bit to preserve
    // sort-order semantics of null values.
    if (DESCENDING == ord) src.get();
    return ret;
  }
Decode a Blob value, byte-for-byte copy.
@see #encodeBlobCopy(PositionedByteRange, byte[], int, int, Order)
hbase-common/src/main/java/org/apache/hadoop/hbase/util/OrderedBytes.java