diff --git a/index.js b/index.js index f686240..43ff15a 100644 --- a/index.js +++ b/index.js @@ -150,7 +150,7 @@ class Zipfile { } else { const directoryTempl = this.fileCentralDirTempl; const filenameBuffer = fromBuffer(file.relativePath) - directoryTempl.writeUIntLE(file.checksum, 16, 4); //crc-32 + directoryTempl.writeUIntLE(parseInt(file.checksum.toString('hex'), 16), 16, 4); //crc-32 directoryTempl.writeInt32LE(file.compressedSize, 20); //compressedSize directoryTempl.writeInt32LE(file.uncompressedSize, 24); //uncompressedSize directoryTempl.writeInt16LE(filenameBuffer.length, 28); //filename length @@ -202,4 +202,4 @@ const zip = (dir, destination, options, callback) => { }) } -module.exports = zip \ No newline at end of file +module.exports = zip