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
When attempting to read data from a ZIP file using entry.getData(writer), a RangeError [ERR_BUFFER_TOO_LARGE] occurs if the ZIP file contains a file larger than 4GB (ZIP64 format).
This leads to the termination of the Node.js process.
Is there any way to fix this issue?
constzipFilePath="./sample.zip"constbuffer=fs.readFileSync(zipFilePath);constcompressed=newBlob([Buffer.from(buffer)],{type: "application/zip",});constbinaryReader=newBlobReader(compressed);constreader=newZipReader(binaryReader);constentries=awaitreader.getEntries();for(const[index,entry]ofentries.entries()){constwriter=newBlobWriter();awaitentry.getData(writer);// RangeError [ERR_BUFFER_TOO_LARGE]: Cannot create a Buffer larger than 4294967295 bytesconstfileContent=awaitwriter.getData();}
The text was updated successfully, but these errors were encountered:
Hi,
When attempting to read data from a ZIP file using entry.getData(writer), a RangeError [ERR_BUFFER_TOO_LARGE] occurs if the ZIP file contains a file larger than 4GB (ZIP64 format).
This leads to the termination of the Node.js process.
Is there any way to fix this issue?
The text was updated successfully, but these errors were encountered: