MCPcopy
hub / github.com/bilibili/flv.js / _fillCurrentWord

Method _fillCurrentWord

src/demux/exp-golomb.js:39–51  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

37 }
38
39 _fillCurrentWord() {
40 let buffer_bytes_left = this._total_bytes - this._buffer_index;
41 if (buffer_bytes_left <= 0)
42 throw new IllegalStateException('ExpGolomb: _fillCurrentWord() but no bytes available');
43
44 let bytes_read = Math.min(4, buffer_bytes_left);
45 let word = new Uint8Array(4);
46 word.set(this._buffer.subarray(this._buffer_index, this._buffer_index + bytes_read));
47 this._current_word = new DataView(word.buffer).getUint32(0, false);
48
49 this._buffer_index += bytes_read;
50 this._current_word_bits_left = bytes_read * 8;
51 }
52
53 readBits(bits) {
54 if (bits > 32)

Callers 2

readBitsMethod · 0.95
_skipLeadingZeroMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected