getBit( object, index ) {

		if ( index < 0 || index >= object.lengthBits ) {

			throw new Error( 'Bit index out of bounds.' );

		}
		if ( object.constant !== undefined ) {

			return object.constant;

		}
		// byteIndex is floor(index / 8)
		const byteIndex = index >> 3;
		const bitIndex = index % 8;
		return ( ( new Uint8Array( object.bitstream )[ byteIndex ] >> bitIndex ) & 1 ) === 1;

	}
Get a bit from the bitstream as a Boolean. If the bitstream
is a constant, the constant value is returned instead.

@param {ParsedBitstream} object
@param {number} index The integer index of the bit.
@returns {boolean} The value of the bit.
@private