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
Fix zlib crashes on Node 24: use sync zlib everywhere
Async zlib (deflate, unzip, gunzip) creates internal Zlib C++ handles
that can fire onerror asynchronously, becoming uncaught exceptions on
Node 24. Sync versions (deflateSync, unzipSync) complete immediately
with no lingering handles. Each call processes one small packet, so
sync is safe in the Transform._transform context.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@@ -52,23 +54,23 @@ class Decompressor extends Transform {
52
54
this.push(chunk.slice(size))
53
55
returncb()
54
56
}else{
55
-
zlib.unzip(chunk.slice(size),{finishFlush: 2/* Z_SYNC_FLUSH = 2, but when using Browserify/Webpack it doesn't exist */},(err,newBuf)=>{/** Fix by lefela4. */
0 commit comments