def max_len_string_encoded(d_rev):
    """
    Calculate maximum length of huffman encodings
    Args:
        d_rev: dict encoded --> element
    Returns:
        maximum number of characters
    """
    maxs = 0
    for x in d_rev:
        len_bit = len(x)
        if(len_bit > maxs):
            maxs = len_bit
    return maxs