IndexBuilder class
Builder for CAR v2 index payloads.
Collects (multihash digest, section offset) pairs and emits a sorted index
payload in either IndexSorted (0x0400) or MultihashIndexSorted
(0x0401) format.
Constructors
- IndexBuilder({bool multihashSorted = false})
-
Creates an IndexBuilder with the given
multihashSortedformat flag.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- multihashSorted → bool
-
Whether to build a
MultihashIndexSortedindex.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
add(
CID cid, int offset) → void -
Records a new section at
offsetwith the givencid. -
build(
) → Uint8List - Builds and returns the sorted index payload bytes.
-
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