in nodejs/src/index.js [11:27]
exports.write = function (struct, compression, callback) {
switch (compression || Compression.None) {
case Compression.Disable:
serialize(struct, true, callback);
break;
case Compression.None:
serialize(struct, false, callback);
break;
case Compression.Gzip:
zip(struct, callback);
break;
default:
callback(new Error('Unable to understand the compression applied'));
break;
}
};