Comparing version 1.3.1 to 1.3.2
@@ -26,3 +26,3 @@ /* | ||
*/ | ||
var binding = require('bindings')('binding.node'); | ||
var binding = require('bindings')('binding'); | ||
@@ -29,0 +29,0 @@ /* |
@@ -5,3 +5,3 @@ { | ||
"description": "Nodejs bindings to Google's Snappy compression library", | ||
"version": "1.3.1", | ||
"version": "1.3.2", | ||
"homepage": "https://github.com/kesla/node-snappy", | ||
@@ -8,0 +8,0 @@ "repository": { |
@@ -12,13 +12,16 @@ # Node-snappy [![Build Status](https://secure.travis-ci.org/kesla/node-snappy.png)](http://travis-ci.org/kesla/node-snappy) | ||
## Installation | ||
- "npm install snappy" | ||
``` | ||
npm install snappy | ||
``` | ||
## Examples | ||
### String | ||
```js | ||
var snappy = require('./snappy'); | ||
// Use synchronous version | ||
var compressed = snappy.compressSync('string to compress'); | ||
var result = snappy.decompressSync(compressed, snappy.parsers.string); | ||
// result will be string instead of Buffer | ||
console.log(result); | ||
var snappy = require('./snappy'); | ||
// Use synchronous version | ||
var compressed = snappy.compressSync('string to compress'); | ||
var result = snappy.decompressSync(compressed, snappy.parsers.string); | ||
// result will be string instead of Buffer | ||
console.log(result); | ||
``` | ||
@@ -28,10 +31,10 @@ | ||
```js | ||
var snappy = require('./snappy'); | ||
// Snappy automatically convert json to a string | ||
snappy.compress({"foo": "bar"}, function(err, compressed){ | ||
snappy.decompress(compressed, snappy.parsers.json, function(err, result){ | ||
// result will be json instead of Buffer | ||
console.log(result["foo"]); | ||
} | ||
var snappy = require('./snappy'); | ||
// Snappy automatically convert json to a string | ||
snappy.compress({"foo": "bar"}, function(err, compressed){ | ||
snappy.decompress(compressed, snappy.parsers.json, function(err, result){ | ||
// result will be json instead of Buffer | ||
console.log(result["foo"]); | ||
} | ||
} | ||
``` | ||
@@ -62,4 +65,4 @@ | ||
# License | ||
Copyright (c) 2011 David Björklund | ||
## License | ||
Copyright (c) 2013 David Björklund | ||
@@ -66,0 +69,0 @@ Permission is hereby granted, free of charge, to any person obtaining a copy |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
83
6361162
76