https://github.com/grimen/node-document-compressor-snappy
Compressor adapter `snappy` for `node-document` ODM for Node.js.
https://github.com/grimen/node-document-compressor-snappy
Last synced: 3 months ago
JSON representation
Compressor adapter `snappy` for `node-document` ODM for Node.js.
- Host: GitHub
- URL: https://github.com/grimen/node-document-compressor-snappy
- Owner: grimen
- License: mit
- Created: 2013-01-09T20:12:01.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2013-11-29T09:06:28.000Z (over 11 years ago)
- Last Synced: 2025-02-12T12:05:53.476Z (3 months ago)
- Language: JavaScript
- Homepage: https://npmjs.org/package/node-document-compressor-snappy
- Size: 123 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: MIT-LICENSE
Awesome Lists containing this project
README
# NODE-DOCUMENT-COMPRESSOR-SNAPPY [](http://travis-ci.org/grimen/node-document-compressor-snappy)
**Compressor** adapter [snappy](https://github.com/kesla/node-snappy) for [node-document](https://github.com/grimen/node-document) ODM for Node.js.
## Installation
```shell
$ npm install node-document-compressor-snappy
```## Usage
**Basic:**
```javascript
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](https://github.com/grimen/node-document).
## Test
**Local tests:**
```shell
$ make test
```## License
Released under the MIT license.
Copyright (c) [Jonas Grimfelt](http://github.com/grimen)
[](https://bitdeli.com/free "Bitdeli Badge")