private static int sizeLength(final int size) {
    final int zeros = Integer.numberOfLeadingZeros(size);
    return 4 - (zeros / 8);
  }
Writes the encoded header of a list provided its encoded payload size to the provided
destination (which must be big enough).
ethereum/rlp/src/main/java/org/hyperledger/besu/ethereum/rlp/RLPEncodingHelpers.java