private int findCommonTimestampPrefix(byte[] curTsBuf, byte[] prevTsBuf) {
    int commonPrefix = 0;
    while (
      commonPrefix < (KeyValue.TIMESTAMP_SIZE - 1)
        && curTsBuf[commonPrefix] == prevTsBuf[commonPrefix]
    ) {
      commonPrefix++;
    }
    return commonPrefix; // has to be at most 7 bytes
  }
Copies the first key/value from the given stream, and initializes decompression state based
on it. Assumes that we have already read key and value lengths. Does not set
{@link #qualifierLength} (not used by decompression) or {@link #prevOffset} (set by the calle
afterwards).
hbase-common/src/main/java/org/apache/hadoop/hbase/io/encoding/FastDiffDeltaEncoder.java