def GetChunks(data, size=None):
    """
    Get chunks of the data.
    """
    if size == None:
        size = len(data)

    start = 0
    end = size
    chunks = []

    while start < len(data):
        chunks.append(data[start:end])

        start = end
        end += size
        if end > len(data):
            end = len(data)

    return chunks