Function to take a byte array and split into chunks of a given size

  • Parameters

    • bytes: Uint8Array<ArrayBufferLike>

      The byte array to chunk

    • chunkSize: number

      The size of each chunk

    Returns Uint8Array<ArrayBufferLike>[]

    An array of byte arrays of a specified size