def _chunkify(arr, size):
    """ Split up a bytestream into chunks """
    arrs = []
    for i in range(0, len(arr), size):
        chunk = bytearray(arr[i:i + size])
        arrs.append(chunk)
    return arrs
