Preparing search index...
The search index is not available
multiformats - v13.3.1
multiformats
codecs/interface
BlockCodec
Interface BlockCodec<Code, T>
An IPLD codec is a combination of both encoder and decoder.
interface
BlockCodec
<
Code
,
T
>
{
code
:
Code
;
name
:
string
;
decode
(
bytes
)
:
T
;
encode
(
data
)
:
ByteView
<
T
>
;
}
Type Parameters
Code
extends
number
T
Hierarchy (
view full
)
BlockEncoder
<
Code
,
T
>
BlockDecoder
<
Code
,
T
>
BlockCodec
Index
Properties
code
name
Methods
decode
encode
Properties
code
code
:
Code
name
name
:
string
Methods
decode
decode
(
bytes
)
:
T
Parameters
bytes
:
ByteView
<
T
>
|
ArrayBufferView
<
T
>
Returns
T
encode
encode
(
data
)
:
ByteView
<
T
>
Parameters
data
:
T
Returns
ByteView
<
T
>
Settings
Member Visibility
Protected
Private
Inherited
External
Theme
OS
Light
Dark
On This Page
code
name
decode
encode
multiformats - v13.3.1
Loading...
An IPLD codec is a combination of both encoder and decoder.