Open AlttiRi opened 2 months ago
Currently, the hash of each zip archive is unique. Seems, archiver adds the archiving time in the zip file.
archiver
Is it possibly to skip this? I need the reproducible result.
For example, 7zip always generates the same zips for the same input.
I use that:
export async function zipDirectory(sourceDir, outPath) { const archive = archiver("zip"); const writeStream = fs.createWriteStream(outPath); const readStream = archive.directory(sourceDir, ""); await archive.finalize(); await pipeline(readStream, writeStream); }
Alternatively, I would like to have an ability to get the result zip's CRC hash of the data inside it. I assume archiver computes this, but just not exposes.
Currently, the hash of each zip archive is unique. Seems,
archiver
adds the archiving time in the zip file.Is it possibly to skip this? I need the reproducible result.
For example, 7zip always generates the same zips for the same input.
I use that: