static equal(arr1, arr2) {
    const BufferUtils = shaka.util.BufferUtils;
    if (!arr1 && !arr2) {
      return true;
    }
    if (!arr1 || !arr2) {
      return false;
    }
    if (arr1.byteLength != arr2.byteLength) {
      return false;
    }

    // Quickly check if these are views of the same buffer.  An ArrayBuffer can
    // be passed but doesn't have a byteOffset field, so default to 0.
    if (BufferUtils.unsafeGetArrayBuffer_(arr1) ==
            BufferUtils.unsafeGetArrayBuffer_(arr2) &&
        (arr1.byteOffset || 0) == (arr2.byteOffset || 0)) {
      return true;
    }

    const uint8A = shaka.util.BufferUtils.toUint8(arr1);
    const uint8B = shaka.util.BufferUtils.toUint8(arr2);
    for (let i = 0; i < arr1.byteLength; i++) {
      if (uint8A[i] != uint8B[i]) {
        return false;
      }
    }
    return true;
  }
Compare two buffers for equality.  For buffers of different types, this
compares the underlying buffers as binary data.

@param {?BufferSource} arr1
@param {?BufferSource} arr2
@return {boolean}
@export
@suppress {strictMissingProperties}