설치 : 바로가기
npm install unzip-jsvar unzip = require('unzip-js')
unzip(getBlobOrFileSomehow(), function (err, zipFile) {
if (err) {
return console.error(err)
}
zipFile.readEntries(function (err, entries) {
if (err) {
return console.error(err)
}
entries.forEach(function (entry) {
zipFile.readEntryData(entry, false, function (err, readStream) {
if (err) {
return console.error(err)
}
readStream.on('data', function (chunk) { ... })
readStream.on('error', function (err) { ... })
readStream.on('end', function () { ... })
})
})
})
})