()
| 457 | }; |
| 458 | |
| 459 | readAlignedByte() { |
| 460 | // Ensure we're byte-aligned |
| 461 | if (this.pos % 8 !== 0) { |
| 462 | throw new Error('Bitstream is not byte-aligned.'); |
| 463 | } |
| 464 | |
| 465 | const byteIndex = this.pos / 8; |
| 466 | const byte = this.bytes[byteIndex] ?? 0; |
| 467 | |
| 468 | this.pos += 8; |
| 469 | return byte; |
| 470 | } |
| 471 | |
| 472 | skipBits(n: number) { |
| 473 | this.pos += n; |
no outgoing calls
no test coverage detected