Multicodec enum

Represents multicodecs types.

Multicodecs are self-describing protocol/encoding streams defined by multiformats, used as unique identifiers for various data types or encodings.

A Multicodec consists of an identifier code, which describes the data format or encoding associated with that code.

Inheritance
Available extensions

Values

raw → const Multicodec

Raw binary (0x55). Used by atproto for blob CIDs.

const Multicodec(0x55)
dagPb2 → const Multicodec

DAG-PB (0x70).

const Multicodec(0x70)
dagCbor → const Multicodec

DAG-CBOR (0x71). Used by atproto for record/commit CIDs.

const Multicodec(0x71)
dagPb → const Multicodec

Deprecated: historically this entry carried the code 0x55, which is actually the multicodec for raw, not dag-pb. It is retained only to avoid a breaking change for callers that reference Multicodec.dagPb. Use dagPb2 for real dag-pb (0x70) or raw for raw binary (0x55).

const Multicodec(0x55)
dabCbor → const Multicodec

Deprecated typo alias for dagCbor. Use dagCbor instead.

const Multicodec(0x71)

Properties

code → int
The code of this codec.
final
hashCode → int
The hash code for this object.
no setterinherited
index → int
A numeric identifier for the enumerated value.
no setterinherited
isDagCbor → bool
Returns true if this codec is dag-cbor (0x71), otherwise false.
no setter
isDagPb → bool
Returns true if this codec is dag-pb (0x70), otherwise false.
no setter
isNotDagCbor → bool
Returns true if this codec is not dag-cbor, otherwise false.
no setter
isNotDagPb → bool
Returns true if this codec is not dag-pb, otherwise false.
no setter
isNotRaw → bool
Returns true if this codec is not raw binary, otherwise false.
no setter
isRaw → bool
Returns true if this codec is raw binary (0x55), otherwise false.
no setter
name → String

Available on Enum, provided by the EnumName extension

The name of the enum value.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

hasCode(int code) → bool
Returns true if code is supported, otherwise false.
valueOf(int code) → Multicodec
Returns the specific codec based on code.

Constants

values → const List<Multicodec>
A constant List of the values in this enum, in order of their declaration.