Skip to content

Commit

Permalink
More README
Browse files Browse the repository at this point in the history
  • Loading branch information
rpj committed Jul 19, 2020
1 parent db82ce6 commit b5f2c21
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ A two-dimensional sparse bitmap implementation for [Node.js](https://nodejs.org/

Allows for flexible backing store choice, with the primary supported being [Redis](http://redis.io/) via [`ioredis`](https://github.com/luin/ioredis).

The underlying "chunked" implementation is quite efficient; the following example needs only 64 bytes to represent two coordinates which are ~1,414,213 units distant each other on the diagonal:
The underlying chunked implementation is quite efficient; the following example needs only 64 bytes to represent two coordinates which are ~1,414,213 units distant each other on the diagonal:

```javascript
const TwoD = require('2d-sparse-bitmaps');
Expand Down Expand Up @@ -51,15 +51,15 @@ and may optionally implement `pipeline()`, which must return an instance impleme

The backing store interface methods must also accept an additional callback argument of type `function (err, result)`.

The default `InMemoryStore` provides an example implementation (sans `pipeline()` et. al).
The default [`InMemoryStore`](stores/in-memory.js) provides an example implementation (sans `pipeline()` et. al).

### Full options

| Constant Name | Description | Default | Restrictions |
| --- | --- | --- | --- |
| `ChunkWidthKey` | The width of each chunk in the sparse bitmap; eack chunk requires up to `(X / 8) * X` bytes of storage (where `X` is the chosen chunk width) | 128 | >= 8, must be a multiple of 8 |
| `KeyPrefixKey` | The string preprended to each `key` before being passed onto the backing store. | `sparse-bitmap` | none |
| `BackingStoreKey` | The backing store instance to be used. | `InMemoryStore` | Must conform to the [aforementioned interface][7]. |
| `BackingStoreKey` | The backing store instance to be used. | [`InMemoryStore`](stores/in-memory.js) | Must conform to the [aforementioned interface][7]. |

## Usage

Expand Down

0 comments on commit b5f2c21

Please sign in to comment.