node-document-compressor-snappy

Compressor adapter snappy for node-document ODM for Node.js.

NODE-DOCUMENT-COMPRESSOR-SNAPPY

Compressor adapter snappy for node-document ODM for Node.js.

  $ npm install node-document-compressor-snappy

Basic:

  var Compressor = require('node-document-compressor-snappy');
 
  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.

Local tests:

  $ make test

Released under the MIT license.

Copyright (c) Jonas Grimfelt