When I run the script, it generated a
file as expected. However, when I decompress this file, I get a
file. If I try and decompress that, it just generates the original file again. What am I doing wrong?
Problem courtesy of: LandonSchropp
, but are using
, that works fine:
% coffee coffee> zlib = require('zlib'); 'ok' 'ok' coffee> fs = require('fs'); 'ok' 'ok' coffee> zlib.gzip('qweqweqweqwe', (_, buf) -> fs.writeFile('/tmp/test.gz', buf)) undefined % zcat /tmp/test.gz qweqweqweqwe
Solution courtesy of: alex