- 28,932 files - Full Java source code - Smali files - Resources Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
97 lines
2.6 KiB
Java
97 lines
2.6 KiB
Java
package com.google.android.gms.internal.measurement;
|
|
|
|
import com.applovin.exoplayer2.common.base.Ascii;
|
|
|
|
/* loaded from: classes3.dex */
|
|
final class zzmi {
|
|
private static final zzmj zza;
|
|
|
|
public static /* synthetic */ int zza(byte[] bArr, int i, int i2) {
|
|
byte b = bArr[i - 1];
|
|
int i3 = i2 - i;
|
|
if (i3 == 0) {
|
|
if (b > -12) {
|
|
return -1;
|
|
}
|
|
return b;
|
|
}
|
|
if (i3 == 1) {
|
|
byte b2 = bArr[i];
|
|
if (b > -12 || b2 > -65) {
|
|
return -1;
|
|
}
|
|
return (b2 << 8) ^ b;
|
|
}
|
|
if (i3 != 2) {
|
|
throw new AssertionError();
|
|
}
|
|
byte b3 = bArr[i];
|
|
byte b4 = bArr[i + 1];
|
|
if (b > -12 || b3 > -65 || b4 > -65) {
|
|
return -1;
|
|
}
|
|
return (b4 << Ascii.DLE) ^ ((b3 << 8) ^ b);
|
|
}
|
|
|
|
public static int zza(String str, byte[] bArr, int i, int i2) {
|
|
return zza.zza(str, bArr, i, i2);
|
|
}
|
|
|
|
public static int zza(String str) {
|
|
int length = str.length();
|
|
int i = 0;
|
|
int i2 = 0;
|
|
while (i2 < length && str.charAt(i2) < 128) {
|
|
i2++;
|
|
}
|
|
int i3 = length;
|
|
while (true) {
|
|
if (i2 >= length) {
|
|
break;
|
|
}
|
|
char charAt = str.charAt(i2);
|
|
if (charAt < 2048) {
|
|
i3 += (127 - charAt) >>> 31;
|
|
i2++;
|
|
} else {
|
|
int length2 = str.length();
|
|
while (i2 < length2) {
|
|
char charAt2 = str.charAt(i2);
|
|
if (charAt2 < 2048) {
|
|
i += (127 - charAt2) >>> 31;
|
|
} else {
|
|
i += 2;
|
|
if (55296 <= charAt2 && charAt2 <= 57343) {
|
|
if (Character.codePointAt(str, i2) < 65536) {
|
|
throw new zzml(i2, length2);
|
|
}
|
|
i2++;
|
|
}
|
|
}
|
|
i2++;
|
|
}
|
|
i3 += i;
|
|
}
|
|
}
|
|
if (i3 >= length) {
|
|
return i3;
|
|
}
|
|
throw new IllegalArgumentException("UTF-8 length does not fit in int: " + (i3 + 4294967296L));
|
|
}
|
|
|
|
public static String zzb(byte[] bArr, int i, int i2) throws zzjt {
|
|
return zza.zza(bArr, i, i2);
|
|
}
|
|
|
|
static {
|
|
if (zzmh.zzc()) {
|
|
zzmh.zzd();
|
|
}
|
|
zza = new zzmm();
|
|
}
|
|
|
|
public static boolean zzc(byte[] bArr, int i, int i2) {
|
|
return zza.zza(0, bArr, i, i2) == 0;
|
|
}
|
|
}
|