array<TDecoded>(elementType: Coder<TDecoded>,condition: ArrayWhileCondition<TDecoded>): Coder<TDecoded[]>
Creates a Coder for arrays that automatically chooses between length-prefixed and fixed-length based on the arguments provided.
- If a lengthType coder is provided as the second argument, it creates a length-prefixed array
- If a length number/reference is provided as the second argument, it creates a fixed-length array
elementType: Coder<TDecoded>
The coder for individual array elements
condition: ArrayWhileCondition<TDecoded>
A condition function for while-loop arrays
Coder<TDecoded[]>
A Coder that can encode/decode arrays of the element type
array<TDecoded>(elementType: Coder<TDecoded>,lengthCoderOrLengthType: Coder<number> | LengthOrRef): Coder<TDecoded[]>
Creates a Coder for arrays that automatically chooses between length-prefixed and fixed-length based on the arguments provided.
- If a lengthType coder is provided as the second argument, it creates a length-prefixed array
- If a length number/reference is provided as the second argument, it creates a fixed-length array
elementType: Coder<TDecoded>
The coder for individual array elements
Coder<TDecoded[]>
A Coder that can encode/decode arrays of the element type