129 lines
4.0 KiB
Java
129 lines
4.0 KiB
Java
|
package com.google.android.gms.internal.firebase_ml;
|
||
|
|
||
|
import java.io.IOException;
|
||
|
import java.nio.charset.Charset;
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
/* loaded from: classes2.dex */
|
||
|
public class zztg extends zztf {
|
||
|
protected final byte[] bytes;
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
public zztg(byte[] bArr) {
|
||
|
bArr.getClass();
|
||
|
this.bytes = bArr;
|
||
|
}
|
||
|
|
||
|
protected int zzqa() {
|
||
|
return 0;
|
||
|
}
|
||
|
|
||
|
@Override // com.google.android.gms.internal.firebase_ml.zzsw
|
||
|
public byte zzcl(int i) {
|
||
|
return this.bytes[i];
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
@Override // com.google.android.gms.internal.firebase_ml.zzsw
|
||
|
public byte zzcm(int i) {
|
||
|
return this.bytes[i];
|
||
|
}
|
||
|
|
||
|
@Override // com.google.android.gms.internal.firebase_ml.zzsw
|
||
|
public int size() {
|
||
|
return this.bytes.length;
|
||
|
}
|
||
|
|
||
|
@Override // com.google.android.gms.internal.firebase_ml.zzsw
|
||
|
public final zzsw zzf(int i, int i2) {
|
||
|
int zzc = zzc(0, i2, size());
|
||
|
if (zzc == 0) {
|
||
|
return zzsw.zzbkl;
|
||
|
}
|
||
|
return new zztb(this.bytes, zzqa(), zzc);
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
@Override // com.google.android.gms.internal.firebase_ml.zzsw
|
||
|
public final void zza(zzsv zzsvVar) throws IOException {
|
||
|
zzsvVar.zzb(this.bytes, zzqa(), size());
|
||
|
}
|
||
|
|
||
|
@Override // com.google.android.gms.internal.firebase_ml.zzsw
|
||
|
protected final String zzb(Charset charset) {
|
||
|
return new String(this.bytes, zzqa(), size(), charset);
|
||
|
}
|
||
|
|
||
|
@Override // com.google.android.gms.internal.firebase_ml.zzsw
|
||
|
public final boolean zzpy() {
|
||
|
int zzqa = zzqa();
|
||
|
return zzxe.zzf(this.bytes, zzqa, size() + zzqa);
|
||
|
}
|
||
|
|
||
|
@Override // com.google.android.gms.internal.firebase_ml.zzsw
|
||
|
public final boolean equals(Object obj) {
|
||
|
if (obj == this) {
|
||
|
return true;
|
||
|
}
|
||
|
if (!(obj instanceof zzsw) || size() != ((zzsw) obj).size()) {
|
||
|
return false;
|
||
|
}
|
||
|
if (size() == 0) {
|
||
|
return true;
|
||
|
}
|
||
|
if (obj instanceof zztg) {
|
||
|
zztg zztgVar = (zztg) obj;
|
||
|
int zzpz = zzpz();
|
||
|
int zzpz2 = zztgVar.zzpz();
|
||
|
if (zzpz == 0 || zzpz2 == 0 || zzpz == zzpz2) {
|
||
|
return zza(zztgVar, 0, size());
|
||
|
}
|
||
|
return false;
|
||
|
}
|
||
|
return obj.equals(this);
|
||
|
}
|
||
|
|
||
|
@Override // com.google.android.gms.internal.firebase_ml.zztf
|
||
|
final boolean zza(zzsw zzswVar, int i, int i2) {
|
||
|
if (i2 > zzswVar.size()) {
|
||
|
int size = size();
|
||
|
StringBuilder sb = new StringBuilder(40);
|
||
|
sb.append("Length too large: ");
|
||
|
sb.append(i2);
|
||
|
sb.append(size);
|
||
|
throw new IllegalArgumentException(sb.toString());
|
||
|
}
|
||
|
if (i2 > zzswVar.size()) {
|
||
|
int size2 = zzswVar.size();
|
||
|
StringBuilder sb2 = new StringBuilder(59);
|
||
|
sb2.append("Ran off end of other: 0, ");
|
||
|
sb2.append(i2);
|
||
|
sb2.append(", ");
|
||
|
sb2.append(size2);
|
||
|
throw new IllegalArgumentException(sb2.toString());
|
||
|
}
|
||
|
if (zzswVar instanceof zztg) {
|
||
|
zztg zztgVar = (zztg) zzswVar;
|
||
|
byte[] bArr = this.bytes;
|
||
|
byte[] bArr2 = zztgVar.bytes;
|
||
|
int zzqa = zzqa();
|
||
|
int zzqa2 = zzqa();
|
||
|
int zzqa3 = zztgVar.zzqa();
|
||
|
while (zzqa2 < zzqa + i2) {
|
||
|
if (bArr[zzqa2] != bArr2[zzqa3]) {
|
||
|
return false;
|
||
|
}
|
||
|
zzqa2++;
|
||
|
zzqa3++;
|
||
|
}
|
||
|
return true;
|
||
|
}
|
||
|
return zzswVar.zzf(0, i2).equals(zzf(0, i2));
|
||
|
}
|
||
|
|
||
|
@Override // com.google.android.gms.internal.firebase_ml.zzsw
|
||
|
protected final int zzb(int i, int i2, int i3) {
|
||
|
return zzug.zza(i, this.bytes, zzqa(), i3);
|
||
|
}
|
||
|
}
|