Closed JamesKyburz closed 9 years ago
Having issues with gzip
var zlib = require('zlib')
zlib.gzip('test', function(err, data) { console.log('gzip:', err ? err.toString() : data); zlib.gunzip(data, function(err, data) { console.log('gunzip', err ? err.toString() : data); }); });
requirebin example to save time http://requirebin.com/?gist=6159124
gzip: Buffer 0: 31 1: 139 2: 8 3: 0 4: 115 5: 6 6: 0 7: 82 8: 0 9: 255 10: 5 11: 192 12: 129 13: 8 14: 0 15: 0 16: 0 17: 0 18: 32 19: 127 20: 235 21: 3 22: 28 23: 223 24: 68 25: 33 26: 4 27: 0 28: 0 29: 0 length: 30 offset: 4 parent: SlowBuffer subarray: function (start, end) { proto: Buffer gunzip Error: invalid CRC-32 checksum: 0x0 / 0x2144df1c
works in latest.
Having issues with gzip
var zlib = require('zlib')
zlib.gzip('test', function(err, data) { console.log('gzip:', err ? err.toString() : data); zlib.gunzip(data, function(err, data) { console.log('gunzip', err ? err.toString() : data); }); });
requirebin example to save time http://requirebin.com/?gist=6159124
gzip: Buffer 0: 31 1: 139 2: 8 3: 0 4: 115 5: 6 6: 0 7: 82 8: 0 9: 255 10: 5 11: 192 12: 129 13: 8 14: 0 15: 0 16: 0 17: 0 18: 32 19: 127 20: 235 21: 3 22: 28 23: 223 24: 68 25: 33 26: 4 27: 0 28: 0 29: 0 length: 30 offset: 4 parent: SlowBuffer subarray: function (start, end) { proto: Buffer gunzip Error: invalid CRC-32 checksum: 0x0 / 0x2144df1c