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
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -233,7 +233,7 @@ This function is available since v2.4.0; previously it was called as `decodeStre
233
233
234
234
### Reusing Encoder and Decoder instances
235
235
236
-
`Encoder` and `Decoder` classes is provided to have better performance by reusing instances:
236
+
`Encoder` and `Decoder` classes are provided to have better performance by reusing instances:
237
237
238
238
```typescript
239
239
import { deepStrictEqual } from"assert";
@@ -251,6 +251,8 @@ than `encode()` function, and reusing `Decoder` instance is about 2% faster
251
251
than `decode()` function. Note that the result should vary in environments
252
252
and data structure.
253
253
254
+
`Encoder` and `Decoder` take the same options as `encode()` and `decode()` respectively.
255
+
254
256
## Extension Types
255
257
256
258
To handle [MessagePack Extension Types](https://github.com/msgpack/msgpack/blob/master/spec.md#extension-types), this library provides `ExtensionCodec` class.
0 commit comments