Skip to content
This repository has been archived by the owner on Dec 20, 2024. It is now read-only.

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
juliangruber committed Mar 24, 2015
1 parent 37f103e commit 054fb3f
Showing 1 changed file with 52 additions and 10 deletions.
62 changes: 52 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,60 @@

[![Build Status](https://travis-ci.org/Level/codec.png)](https://travis-ci.org/Level/codec)

__WIP__

## API

### .encodeKey(key, optionObjects)
### .encodeValue(value, optionObjects)
### .encodeBatch(batch, optionObjects)
### .encodings
### .decodeKey(key, optionObjects)
### .decodeValue(value, optionObjects)
### .keyAsBuffer(optionObjects)
### .valueAsBuffer(optionObjects)
### Codec(opts)

Create a new codec, with a global options object.

This could be something like

```js
var codec = new Codec(db.options);
```

### #encodeKey(key, opts)

Encode `key` with given `opts`.

### #encodeValue(value, opts)

Encode `value` with given `opts`.

### #encodeBatch(batch, opts)

Encode `batch` ops with given `opts`.

### #decodeKey(key, opts)

Decode `key` with given `opts`.

### #decodeValue(value, opts)

Decode `value` with given `opts`.

### #keyAsBuffer(opts)

Check whether `opts` and the global `opts` call for a binary key encoding.

### #valueAsBuffer(opts)

Check whether `opts` and the global `opts` call for a binary value encoding.

### #encodings

The supported encodings as object of form

```js
{
"name": {
"encode": Function,
"decode": Function,
"buffer": Boolean,
"type": String
}
}
```

## Publishers

Expand Down

0 comments on commit 054fb3f

Please sign in to comment.