public static int calculateSize(final Bytes value) {
    return RLPDecodingHelpers.rlpElementMetadata((index) -> value.get((int) index), value.size(), 0)
        .getEncodedSize();
  }
Given a {@link Bytes} containing rlp-encoded data, determines the full length of the encoded
value (including the prefix) by inspecting the prefixed metadata.

@param value the rlp-encoded byte string
@return the length of the encoded data, according to the prefixed metadata
ethereum/rlp/src/main/java/org/hyperledger/besu/ethereum/rlp/RLP.java