joyent/node — Issue #1929: zlib fails on large files
Author: tuxychandru
Created: 2011-10-24 12:05:31+00:00
State: open

Create a 695 MB file with,

dd if=/dev/urandom of=test.iso bs=1024 count=$((1024*695))

Compress it with,

var zlib = require('zlib');

var gzip = zlib.createGzip();
var fs = require('fs');
var inp = fs.createReadStream('test.iso');
var out = fs.createWriteStream('out.iso.gz');

inp.pipe(gzip).pipe(out);

The compressed file is corrupted.