Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
module.exports = function(input) {
var _entryHeader = new Headers.EntryHeader, _entryName = new Buffer(0), _comment = new Buffer(0), _isDirectory = false, uncompressedData = null, _extra = new Buffer(0);
function getCompressedDataFromZip() {
if (!input || !Buffer.isBuffer(input)) {
return new Buffer(0);
}
_entryHeader.loadDataHeaderFromBinary(input);
return input.slice(_entryHeader.realDataOffset, _entryHeader.realDataOffset + _entryHeader.compressedSize);
}
function crc32OK(data) {
if (_entryHeader.flags & 8 != 8) {
if (Utils.crc32(data) != _entryHeader.crc) {
return false;
}
} else {}
return true;
}
function decompress(async, callback) {