node-document-compressor-deflate
v0.1.0
Published
Compressor adapter `deflate` for `node-document` ODM for Node.js.
Downloads
2
Readme
NODE-DOCUMENT-COMPRESSOR-DEFLATE
Compressor adapter deflate for node-document ODM for Node.js.
Installation
$ npm install node-document-compressor-deflate
Usage
Basic:
var Compressor = require('node-document-compressor-deflate');
var Compressor = require('..');
var compressor = new Compressor();
var object = {foo: "bar"}, data;
console.log("Object: ", require('util').inspect(object), typeof object);
data = compressor.compress(object);
console.log("Compressed: ", require('util').inspect(data), typeof data);
object = compressor.decompress(data);
console.log("Decompressed: ", require('util').inspect(object), typeof object);
For details; see node-document.
Test
Local tests:
$ make test
License
Released under the MIT license.
Copyright (c) Jonas Grimfelt