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

Method readBits

src/misc.ts:428–441  ·  view source on GitHub ↗
(n: number)

Source from the content-addressed store, hash-verified

426 }
427
428 readBits(n: number) {
429 if (n === 1) {
430 return this.readBit();
431 }
432
433 let result = 0;
434
435 for (let i = 0; i < n; i++) {
436 result <<= 1;
437 result |= this.readBit();
438 }
439
440 return result;
441 }
442
443 writeBits(n: number, value: number) {
444 const end = this.pos + n;

Callers 13

parseAvcSpsFunction · 0.95
parseProfileTierLevelFunction · 0.80
skipScalingListDataFunction · 0.80
skipStRefPicSetFunction · 0.80
skipHrdParametersFunction · 0.80
codec_data.tsFile · 0.80

Calls 1

readBitMethod · 0.95

Tested by

no test coverage detected