reproducible-deflate for node and iojs
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.
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.
npm install reproducible-deflate
// Load the libraryvar rd = ;// create a deflate streamvar deflate = rd;// use the deflate streamdeflate;deflatedatainput;deflate;
The options to
createDeflate are passed on to pako.Deflate.