code: function unpackArray(
      buffer, theType, start=0, end=buffer.length, safe=false) {
    /** @type {!Array<number>} */
    let output = [];
    unpackArrayTo(buffer, theType, output, start, end, safe);
    return output;
  }
docs: Unpack an array of numbers from a byte buffer.
  @param {!Uint8Array|!Array<number>} buffer The byte buffer.
  @param {!Object} theType The type definition.
  @param {number=} start The buffer index to start reading.
  Assumes zero if undefined.
  @param {number=} end The buffer index to stop reading.
  Assumes the buffer length if undefined.
  @param {boolean=} safe If set to false, extra bytes in the end of
  the array are ignored and input buffers with insufficient bytes will
  output a empty array. If safe is set to true the function
  will throw a 'Bad buffer length' error. Defaults to false.
  @return {!Array<number>}
  @throws {Error} If the type definition is not valid
  @throws {Error} On overflow