()
| 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) |
no outgoing calls
no test coverage detected