问题
Is there any JS library that allows to provide input data in chunks rather than expecting 100% file content to be present in memory (string, Buffer, UInt8Array) before starting archivation? I checked several popular libraries like JSZip or archiver and found that they do not offer such functionality.
We process large data tables, client side, using Javascript and we have feature to export table to CSV file, compress and upload to server. Currently we generate huge string which is passed to archiver. What we would ideally want is to have a way to "stream" input and return small chunk of CSV file content (several lines) for archiver library, then return another chunk etc. to avoid using big amount of memory at once.
来源:https://stackoverflow.com/questions/58014109/streaming-client-side-zip-archivation