mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 10:28:47 +00:00
* Add test for multiple partial consume from BufferList This shows the problem indicated in #7385 * Fix multiple partial consume from BufferList The JSUint8Array::possiblySharedBuffer() returns the backing array, not taking into account the byteOffset that indicates the start of the data in the backing array. This means that when creating an array with the same backing array, the current byteOffset needs to be added to the start of the new slice. This led to consume() returning the same data when repeatedly consuming small numbers of bytes from the BufferList.