0.84.0 • Published 1 day ago

@gomomento/sdk-nodejs-compression v0.84.0

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
1 day ago

{{ ossHeader }}

Compression Extensions for Momento Node.js SDK

This package provides extensions for the Momento Node.js SDK to support compression and decompression of data that is stored using the CacheClient.set function and accessed through the CacheClient.get function.

To use the library, you will need to install it from npm:

npm install @gomomento/sdk-compression

Then, you can configure the Momento cache client to enable compression:

configuration.withCompressionStrategy({
  compressorFactory: CompressorFactory.default(),
  compressionLevel: CompressionLevel.SmallestSize,
})

To compress a value when calling CacheClient.set, use the compress option:

const setResponse = await cacheClient.set(
  'my-cache',
  'my-key',
  'my-value',
  {
    compress: true,
  }
);

To decompress a value when calling CacheClient.get, use the decompress option:

const getResponse = await cacheClient.get(
  'my-cache',
  'my-key',
  {
    decompress: true,
  }
);

{{ ossFooter }}

0.84.0

1 day ago

0.83.0

3 days ago

0.82.0

13 days ago

0.81.1

16 days ago

0.81.0

17 days ago

0.80.0

23 days ago

0.78.0

25 days ago

0.79.0

24 days ago

0.77.1

30 days ago

0.77.0

1 month ago

0.76.0

1 month ago

0.75.0

1 month ago

0.74.0

1 month ago