import base64


def encode(data):
    """
    Encodes the data structure to a format that can be pushed.

    :param data: data structure obtained from the rsync delta.
    :return: data structured encoded.
    """
    encoded_data = [data[0]]  # the first item is the block size
    for block in data[1:]:  # skip block size
        encoded_data.append(base64.b64encode(block))

    return encoded_data