You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+2-8Lines changed: 2 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# level-transcoder
2
2
3
-
**Encode data with built-in or custom encodings.** The successor to [`level-codec`][level-codec] that transcodes encodings from and to internal data formats supported by a database. This allows a database to store data in a format of its choice (Buffer, Uint8Array or String) with zero-effort support of known encodings. That includes other encoding interfaces in the ecosystem like [`codecs`][mafintosh-codecs], [`abstract-encoding`][abstract-enc] and [`multiformats`][blockcodec].
3
+
**Encode data with built-in or custom encodings.** The successor to [`level-codec`][level-codec] that transcodes encodings from and to internal data formats supported by a database. This allows a database to store data in a format of its choice (Buffer, Uint8Array or String) with zero-effort support of known encodings. That includes other encoding interfaces in the ecosystem like [`abstract-encoding`][abstract-enc] and [`multiformats`][blockcodec].
Those marked as not named are modules that export or generate encodings that don't have a `name` property (or `type` as an alias). We call these _anonymous encodings_. They can only be used as objects and not by name. Passing an anonymous encoding through `Transcoder#encoding()` does give it a `name` property for compatibility, but the value of `name` is not deterministic.
110
108
@@ -121,7 +119,7 @@ Create a new transcoder, providing the formats that are supported by a database
121
119
Returns the given `encoding` argument as a normalized encoding object that follows the `level-transcoder` encoding interface. The `encoding` argument may be:
122
120
123
121
- A string to select a known encoding by its name
124
-
- An object that follows one of the following interfaces: [`level-transcoder`](#encoding-interface), [`level-codec`](https://github.com/Level/codec#encoding-format), [`codecs`][mafintosh-codecs], [`abstract-encoding`][abstract-enc], [`multiformats`][blockcodec]
122
+
- An object that follows one of the following interfaces: [`level-transcoder`](#encoding-interface), [`level-codec`](https://github.com/Level/codec#encoding-format), [`abstract-encoding`][abstract-enc], [`multiformats`][blockcodec]
125
123
- A previously normalized encoding, such that `encoding(x)` equals `encoding(encoding(x))`.
126
124
127
125
Results are cached. If the `encoding` argument is an object and it has a name then subsequent calls can refer to that encoding by name.
@@ -209,12 +207,8 @@ Support us with a monthly donation on [Open Collective](https://opencollective.c
0 commit comments