writeUint16(value, littleEndian) {
    const state = this.#state;
    this.ensureCanWrite(2);
    state.data.setUint16(state.index, value, littleEndian);
    state.index += 2;
    state.length = Math.max(state.index, state.length);
  }
@param {number} value
@param {boolean=} littleEndian