Read the whole stream and call a callback with the complete content.

Returns : A Promise of the full content.

Since: v3.0.0


name type description
updateCallback function the function called every time the stream updates. This function is optional.

The update callback function takes 1 parameter: the metadata (see the on method).


.accumulate(function updateCallback(metadata) {
    // metadata contains for example currentFile and percent, see the generateInternalStream doc.
}).then(function (data) {
    // data contains here the complete zip file as a uint8array (the type asked in generateInternalStream)