minizip-asm.js
minizip-asm.js copied to clipboard
error with zipfile in unzGoToFirstFile
I have testing this library and created many files however at random a few of the zip files created throw up this error. I have not been able to find out what is specific to those files. I am including the code and the point where the error appears
// read the buffer from file object
const _filebuffer = await this._readBuffer(fileobj);
// convert to uint8array
const _arr = new Uint8Array(_filebuffer);
// create new object using arr
this._zip = new Minizip(_arr);
// read list of zip content
const _list = this._zip.list();
At the point of list()
the library inconsistently throws up
Error: error with zipfile in unzGoToFirstFile
at Minizip.list
Any help on why this happens will be greatly appreciated. Thanks