def decompress(tree, data):
    """Decompress datas

    Args:
        tree (Tree): the tree used to compress
        data (str): the compressed datas

    Returns:
        The decompressed datas.
    """
    content = ""
    current_node = tree.root
    # Convert data to bits
    bits = ''.join(bin(c)[2:].rjust(8, '0') for c in data)
    # First 6 bytes = size of the uncompressed data
    content_size = int(bits[:48], 2)
    # Iter until we get all uncompress characters
    i = 48
    current_size = 0
    while current_size < content_size:
        if bits[i] == "0":
            current_node = current_node.left
        else:
            current_node = current_node.right
        if current_node.isLeaf():
            current_size += 1
            content += current_node.letter
            current_node = tree.root
        i += 1

    return content