void copyFrom(CompressionState state) {
    keyLength = state.keyLength;
    valueLength = state.valueLength;

    rowLength = state.rowLength;
    prevOffset = state.prevOffset;
    familyLength = state.familyLength;
    qualifierLength = state.qualifierLength;
    type = state.type;
  }
Analyze the key and fill the state assuming we know previous state. Uses mark() and reset() in
ByteBuffer to avoid moving the position.
<p>
This method overrides all the fields of this instance, except {@link #prevOffset}, which is
usually manipulated directly by encoders and decoders.
@param in            Buffer at the position where key starts
@param keyLength     Length of key in bytes
@param valueLength   Length of values in bytes
@param commonPrefix  how many first bytes are common with previous KeyValue
@param previousState State from previous KeyValue
hbase-common/src/main/java/org/apache/hadoop/hbase/io/encoding/CompressionState.java