You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Darwin ****** 23.0.0 Darwin Kernel Version 23.0.0: Fri Sep 15 14:42:42 PDT 2023; root:xnu-10002.1.13~1/RELEASE_X86_64 x86_64
Subsystem
globals, streams/web
What steps will reproduce the bug?
functionfrom(src){returnnewReadableStream({start(controller){controller.enqueue(src);controller.close();},});}asyncfunctionread(stream){constreader=stream.getReader();constchunks=[];while(true){const{ done, value }=awaitreader.read();if(done)break;chunks.push(value);}returnchunks;}awaitread(from(newArrayBuffer([0,0,0,0])).pipeThrough(newCompressionStream('gzip')));
How often does it reproduce? Is there a required condition?
Every time
What is the expected behavior? Why is that the expected behavior?
Should resolve to [Uint8Array(10), Uint8Array(10)].
What do you see instead?
Nothing - reader.read() hangs and never resolves.
Additional information
Running the code snippet in Chrome devtools console produces the correct outcome. Using 'deflate' rather than 'gzip' has no effect, it still hangs.
The text was updated successfully, but these errors were encountered:
I explored the issue and it appears that Nodejs expects the "chunk" argument in the _write function to be either a string, Buffer, or Uint8Array, not an ArrayBuffer.
A potential workaround involves converting the ArrayBuffer to a Buffer before processing it:
Version
v21.6.1
Platform
Darwin ****** 23.0.0 Darwin Kernel Version 23.0.0: Fri Sep 15 14:42:42 PDT 2023; root:xnu-10002.1.13~1/RELEASE_X86_64 x86_64
Subsystem
globals, streams/web
What steps will reproduce the bug?
How often does it reproduce? Is there a required condition?
Every time
What is the expected behavior? Why is that the expected behavior?
Should resolve to
[Uint8Array(10), Uint8Array(10)]
.What do you see instead?
Nothing -
reader.read()
hangs and never resolves.Additional information
Running the code snippet in Chrome devtools console produces the correct outcome. Using
'deflate'
rather than'gzip'
has no effect, it still hangs.The text was updated successfully, but these errors were encountered: