Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

redis-gzip

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

redis-gzip

Magical gzip/gunzip on calls to setz(), getz(), mgetz()

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
34
increased by25.93%
Maintainers
1
Weekly downloads
 
Created
Source

redis-gzip

Automatically gzip and gunzip on calls to new methods: setz, getz, mgetz

example

var redz = require('redis-gzip');
var redis = require('redis');

var client = redz(redis.createClient());

client.setz('zkey', 'z nice long value that shall be compressed with gzip', function (err, result) {
	client.getz('zkey', function (err, result) {
		console.log(arguments);

		client.end();
	});
});

api

redz = require('redis-gzip')

Get a reference to the module

client = redz(redisClient)

  • redisClient: the redis client to which you want to add gzip functions

client.setz(key, val, cb)

Store a key/value pair to redis where the value is first gzipped

  • key: the key name where you want to store val
  • val: the value that will be stored compressed
  • cb(err, result): called when gzipped saved to redis

client.getz(key, cb)

Get a value from redis and gunzip it before returning it

  • key: the key whose value you want to retrieve
  • cb(err, result): called with gunzipped results from redis

client.mgetz(keys, cb)

Get multiple values based on multiple keys from redis. Each value is gunzipped before being returned

  • keys: array: an array of keys whose values are to be returned
  • cb(err, result):
    • err: an error message from redis or gunzip if any
    • result: array: gunzipped values for each of the requested keys

license

MIT

Keywords

FAQs

Package last updated on 22 Sep 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc