Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
set entryName(val) {
_entryName = Utils.toBuffer(val);
var lastChar = _entryName[_entryName.length - 1];
_isDirectory = lastChar == 47 || lastChar == 92;
_entryHeader.fileNameLength = _entryName.length;
},
get extra() {
set comment(val) {
_comment = Utils.toBuffer(val);
_entryHeader.commentLength = _comment.length;
},
get name() {
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() {