private void encodeTrimmedData(final RLPOutput rlpOutput, final Bytes data) {
    rlpOutput.startList();
    final Bytes shortData = data.trimLeadingZeros();
    final int zeroLeadDataSize = data.size() - shortData.size();
    rlpOutput.writeIntScalar(zeroLeadDataSize);
    rlpOutput.writeBytes(shortData);
    rlpOutput.endList();
  }
Writes the log entry to the provided RLP output.

@param out the output in which to encode the log entry.
@param compacted whether to compact the rlp log entry by trimming leading zeros on topics and
    data.
evm/src/main/java/org/hyperledger/besu/evm/log/Log.java