( input: Uint8Array, aI: number, offset: number, )
| 61 | } |
| 62 | |
| 63 | function decodeOne( |
| 64 | input: Uint8Array, |
| 65 | aI: number, |
| 66 | offset: number, |
| 67 | ): [number | bigint, number] { |
| 68 | if (aI > 27) { |
| 69 | throw new RangeError( |
| 70 | `Cannot decode value (0b001_${aI.toString(2).padStart(5, "0")})`, |
| 71 | ); |
| 72 | } |
| 73 | const output = calcLength(input, aI, offset); |
| 74 | output[0] = typeof output[0] === "bigint" ? -output[0] - 1n : -output[0] - 1; |
| 75 | return output; |
| 76 | } |
| 77 | |
| 78 | function decodeTwo( |
| 79 | input: Uint8Array, |
no test coverage detected