(values: CborType[])
| 35 | * @returns A {@link Uint8Array} representing the encoded data. |
| 36 | */ |
| 37 | export function encodeCborSequence(values: CborType[]): Uint8Array { |
| 38 | let o = 0; |
| 39 | for (const value of values) o += calcEncodingSize(value); |
| 40 | const output = new Uint8Array(o); |
| 41 | |
| 42 | o = 0; |
| 43 | for (const value of values) o = encode(value, output, o); |
| 44 | if (o !== output.length) return output.subarray(0, o); |
| 45 | return output; |
| 46 | } |
no test coverage detected