Closed gowy222 closed 1 year ago
If you cannot web streams natively, you can write a class extending the class Reader
. The method readUint8Array
in this class should rely on fs.createReadStream
and use the options start
, end
in order to read sections of the file, see https://nodejs.org/api/all.html#fs_fs_createreadstream_path_options. There is an example of custom Reader
class in the documentation or here: https://github.com/gildas-lormeau/zip.js/blob/151b5984728dddad42f2f87da39b1efc9b9b7519/tests/all/test-custom-io.js.
const zipReader = new zip.ZipReader(readable)
ERR: reader = new BlobReader(await new Response(reader.readable).blob()); //put all data into memory? if file over 2GB.. => ReferenceError: Response is not defined
Response is Web API? is there any way work with big file(>2GB) use fs.createReadStream(local_path)... low memory! ; and noted NO Readable.toWeb() in pure nodejs tho..