kesla/node-snappy — Issue #8: troubles with decompress
Author: ultimaRatio
Created: 2012-02-20 09:00:55+00:00
State: open

Hi,

i'm runnnig into some troubles with decompress.
In the following code, decompress doesn't seem to execute callback.

var texte = "Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit";

console.time();
snappy.compress(texte, function(err, compressed){
if(err) throw err;
console.log("compression ok : "+snappy.isValidCompressedSync(compressed));
snappy.decompress(compressed, function(err,result) {
if (err) throw err;
console.timeEnd("time to compress/decompress : ");
console.log(result);
});
});

and with this code :

var compressed = snappy.compressSync(texte);
snappy.decompress(compressed, function(err,result) {
if (err) throw err;
console.log(result);
});

i've got :

Everythings run fine with decompressSync.

Fedora 16 - 64 bits / node v0.6.11

Regards,