LengthPrefixedCodec<T> class

Generic codec wrapper that adds length prefix to any codec

This is useful for types that are encoded as Compact

Mixed-in types

Constructors

LengthPrefixedCodec(Codec<T> inner)
const

Properties

hashCode → int
The hash code for this object.
no setterinherited
inner → Codec<T>
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

decode(Input input) → T
override
encode(T value) → Uint8List
Convert self to an owned vector.
inherited
encodeTo(T value, Output output) → void
Convert self to a slice and append it to the destination.
override
isSizeZero() → bool
Is Size Zero
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
sizeHint(T value) → int
If possible give a hint of expected size of the encoding.
override
toString() → String
A string representation of this object.
inherited

Operators

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