Rebuffers an array of Uint8Arrays to a specific chunk size.
Convenience wrapper around rebuffer stream for array inputs/outputs.
Array of Uint8Arrays to rebuffer
Target size for output chunks
Promise resolving to array of rebuffered chunks
const chunks = [ new Uint8Array([1, 2]), new Uint8Array([3, 4, 5]), new Uint8Array([6])];const rebuffered = await rebufferArray(chunks, 3);// [Uint8Array([1,2,3]), Uint8Array([4,5,6])] Copy
const chunks = [ new Uint8Array([1, 2]), new Uint8Array([3, 4, 5]), new Uint8Array([6])];const rebuffered = await rebufferArray(chunks, 3);// [Uint8Array([1,2,3]), Uint8Array([4,5,6])]
Rebuffers an array of Uint8Arrays to a specific chunk size.
Convenience wrapper around rebuffer stream for array inputs/outputs.