Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
setData: function(value) {
uncompressedData = Utils.toBuffer(value);
if (!_isDirectory && uncompressedData.length) {
_entryHeader.size = uncompressedData.length;
_entryHeader.method = Utils.Constants.DEFLATED;
_entryHeader.crc = Utils.crc32(value);
} else {
_entryHeader.method = Utils.Constants.STORED;
}
},
getData: function() {
function crc32OK(data) {
if (_entryHeader.flags & 8 != 8) {
if (Utils.crc32(data) != _entryHeader.crc) {
return false;
}
} else {}
return true;
}
function decompress(async, callback) {