Documentation
¶
Overview ¶
Package multicodec provides the ability to add and remove codec prefixes from data.
Index ¶
- func AddCodec(name string, data []byte) ([]byte, error)
- func GetCodec(data []byte) (uint64, error)
- func ID(name string) (uint64, error)
- func IsCodec(name string, data []byte) bool
- func MustID(name string) uint64
- func MustName(id uint64) string
- func Name(id uint64) (string, error)
- func RemoveCodec(data []byte) ([]byte, uint64, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddCodec ¶
AddCodec adds a codec prefix to a byte array. It returns a new byte array with the relevant codec prefixed.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.