reproducible-deflate for node and iojs
Alternative to zlib.createDeflate
with guaranteed reproducibility.
Sometimes (e.g. when performing automated regression tests) it is important that the same input will always be compressed to the same output.
Since the zlib
library of node.js ships with node.js, and might even depend on the operating system in addition to the node.js version number. that can make no such guarantees.
Therefore, we use a fixed version of the JavaScript-only implementation pako to offer reproducible results.
Installation
npm install reproducible-deflate
Usage
var rd = require("reproducible-deflate");
var deflate = rd.createDeflate(options);
deflate.pipe(output);
deflate.data(input);
deflate.end();
Options
The options to createDeflate
are passed on to pako.Deflate.