Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compress-lz4 - clean up readme docs #1285

Merged
merged 2 commits into from
Jan 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ If there is already an adapter that you would like to add, please post an issue

### Compression Adapters

* [brotli](https://github.com/jaredwray/keyv/tree/main/packages/compress-brotli): Brotli compression adapter
* [Gzip](https://github.com/jaredwray/keyv/tree/main/packages/compress-gzip): Gzip compression adapter
* [lz4](https://github.com/jaredwray/keyv/tree/main/packages/compress-lz4): lz4-napi compression adapter
* [brotli](https://github.com/jaredwray/keyv/tree/main/packages/compress-brotli): brotli compression adapter
* [gzip](https://github.com/jaredwray/keyv/tree/main/packages/compress-gzip): gzip compression adapter
* [lz4](https://github.com/jaredwray/keyv/tree/main/packages/compress-lz4): lz4 compression adapter

### Third-party Storage Adapters

Expand Down
8 changes: 4 additions & 4 deletions packages/compress-lz4/README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# @keyv/compress-lz4 [<img width="100" align="right" src="https://jaredwray.com/images/keyv-symbol.svg" alt="keyv">](https://github.com/jaredwra/keyv)

> lz4-napi compression for Keyv
> lz4 compression for Keyv

[![build](https://github.com/jaredwray/keyv/actions/workflows/tests.yaml/badge.svg)](https://github.com/jaredwray/keyv/actions/workflows/tests.yaml)
[![codecov](https://codecov.io/gh/jaredwray/keyv/branch/main/graph/badge.svg?token=bRzR3RyOXZ)](https://codecov.io/gh/jaredwray/keyv)
[![npm](https://img.shields.io/npm/v/@keyv/compress-lz4.svg)](https://www.npmjs.com/package/@keyv/compress-lz4)
[![npm](https://img.shields.io/npm/dm/@keyv/compress-lz4)](https://npmjs.com/package/@keyv/compress-lz4)

lz4-napi compression for [Keyv](https://github.com/jaredwray/keyv).
lz4 compression for [Keyv](https://github.com/jaredwray/keyv).

lz4-napi is a data compression algorithm that is designed to be fast and efficient.
`lz4` is a data compression algorithm that is designed to be fast and efficient and is provided by the package [lz4-napi](https://npmjs.com/package/lz4-napi).

## Install

Expand All @@ -33,7 +33,7 @@ const keyv = new Keyv({store: new Map(), compression: new KeyvLz4()});

#### options

All options for `@keyv/compress-lz4` are based on the package [lz4-napi](https://github.com/antoniomuso/lz4-napi)
All options for `@keyv/compress-lz4` are based on the package [lz4-napi](https://npmjs.com/package/lz4-napi).

## License

Expand Down
4 changes: 2 additions & 2 deletions packages/compress-lz4/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@keyv/compress-lz4",
"version": "0.1.0",
"description": "lz4-napi compression for keyv",
"version": "1.0.0",
"description": "lz4 compression for Keyv",
"type": "module",
"main": "dist/index.cjs",
"module": "dist/index.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/keyv/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ The following are third-party storage adapters compatible with Keyv:

# Compression

Keyv supports `gzip`, `brotli` and lz4-napi compression. To enable compression, pass the `compress` option to the constructor.
Keyv supports `gzip`, `brotli` and `lz4` compression. To enable compression, pass the `compress` option to the constructor.

```js
import Keyv from 'keyv';
Expand Down
2 changes: 1 addition & 1 deletion packages/keyv/test/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ test.it('compress/decompress with gzip', async t => {
t.expect(await keyv.get('foo')).toBe('bar');
});

test.it('compress/decompress with lz4-napi', async t => {
test.it('compress/decompress with lz4', async t => {
const keyv = new Keyv({store: new Map(), compression: new KeyvLz4()});
await keyv.set('foo', 'bar');
t.expect(await keyv.get('foo')).toBe('bar');
Expand Down
4 changes: 2 additions & 2 deletions packages/website/site/docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ await users.clear();

## 6. Advanced - Enable Compression

Keyv supports both `gzip`, `brotli` and lz4-napi methods of compression. Before you can enable compression, you will need to install the compression package:
Keyv supports both `gzip`, `brotli` and `lz4` methods of compression. Before you can enable compression, you will need to install the compression package:

```sh
npm install --save keyv @keyv/compress-gzip
Expand All @@ -192,7 +192,7 @@ const keyvBrotli = new KeyvBrotli();
const keyv = new Keyv({ compression: keyvBrotli });
```

### Example - Enable lz4-napi compression
### Example - Enable lz4 compression

```js
import Keyv from 'keyv';
Expand Down
Loading