MCPcopy Create free account
hub / github.com/Vanilagy/webcodecs-polyfill / readAlignedByte

Method readAlignedByte

src/misc.ts:459–470  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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;

Callers 2

parseAvcSpsFunction · 0.95
readLeb128Function · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected