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

  • Parameters

    • bytes: Uint8Array

      The byte array to chunk

    • chunkSize: number

      The size of each chunk

    Returns Uint8Array[]

    An array of byte arrays of a specified size