def get_lempel_ziv_entropy(message: str) ->float:
    """
    Get Lempel-Ziv entropy estimate, Snippet 18.2, page 266.

    :param message: (str) encoded message
    :return: (float) Lempel-Ziv entropy
    """
    i, lib = 1, [message[0]]
    while i < len(message):
        for j in range(i, len(message)):
            message_ = message[i:j + 1]
            if message_ not in lib:
                lib.append(message_)
                break
        i = j + 1
    return len(lib) / len(message)
