Change of behavior in CompressionStream from node 22.2.0 to 22.3.0 #53581
-
I'm seeing a difference in CompressionStream behavior from node 22.2.0 to 22.3.0 and I can not understand if it is an issue on my code or a node 22.3.0 issue. To see it use ;(async () => {
console.log(await deflate('deflate me'))
})()
async function deflate(buffer) {
const cs = new CompressionStream('deflate')
const c = new Blob([buffer]).stream().pipeThrough(cs)
return new Uint8Array(await new Response(c).arrayBuffer())
} In node 22.2.0 and previous the reuslt is: Uint8Array(18) [
120, 156, 75, 73, 77, 203, 73,
44, 73, 85, 200, 77, 5, 0,
21, 96, 3, 200
] while on node 22.3.0 it is: Uint8Array(8192) [
47, 0, 0, 0, 0, 0, 0, 0, 13, 10, 0, 0,
0, 0, 0, 0, 72, 84, 84, 80, 47, 49, 46, 49,
32, 52, 48, 48, 32, 66, 97, 100, 32, 82, 101, 113,
117, 101, 115, 116, 13, 10, 67, 111, 110, 110, 101, 99,
116, 105, 111, 110, 58, 32, 99, 108, 111, 115, 101, 13,
10, 13, 10, 0, 72, 84, 84, 80, 47, 49, 46, 49,
32, 52, 48, 56, 32, 82, 101, 113, 117, 101, 115, 116,
32, 84, 105, 109, 101, 111, 117, 116, 13, 10, 67, 111,
110, 110, 101, 99,
... 8092 more items
] |
Beta Was this translation helpful? Give feedback.
Answered by
marco-ippolito
Jun 25, 2024
Replies: 2 comments 2 replies
-
@nodejs/security-wg |
Beta Was this translation helpful? Give feedback.
2 replies
-
Hi @matteo-cristino we are aware of this issue and a fix is coming in v22.4.0 in a couple of days |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
avivkeller
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @matteo-cristino we are aware of this issue and a fix is coming in v22.4.0 in a couple of days