- Added realracing3-community.apk (71.57 MB) - Removed 32-bit support (armeabi-v7a) - Only includes arm64-v8a libraries - Decompiled source code included - Added README-community.md with analysis
66 lines
2.0 KiB
Java
66 lines
2.0 KiB
Java
package com.google.android.gms.internal.ads;
|
|
|
|
import java.io.IOException;
|
|
import java.io.InputStream;
|
|
import java.util.ArrayDeque;
|
|
import java.util.Arrays;
|
|
import java.util.Queue;
|
|
|
|
/* loaded from: classes3.dex */
|
|
public final class zzgad {
|
|
static {
|
|
new zzgab();
|
|
}
|
|
|
|
public static InputStream zza(InputStream inputStream, long j) {
|
|
return new zzgac(inputStream, j);
|
|
}
|
|
|
|
private static byte[] zzc(Queue queue, int i) {
|
|
if (queue.isEmpty()) {
|
|
return new byte[0];
|
|
}
|
|
byte[] bArr = (byte[]) queue.remove();
|
|
int length = bArr.length;
|
|
if (length == i) {
|
|
return bArr;
|
|
}
|
|
byte[] copyOf = Arrays.copyOf(bArr, i);
|
|
int i2 = i - length;
|
|
while (i2 > 0) {
|
|
byte[] bArr2 = (byte[]) queue.remove();
|
|
int min = Math.min(i2, bArr2.length);
|
|
System.arraycopy(bArr2, 0, copyOf, i - i2, min);
|
|
i2 -= min;
|
|
}
|
|
return copyOf;
|
|
}
|
|
|
|
public static byte[] zzb(InputStream inputStream) throws IOException {
|
|
inputStream.getClass();
|
|
ArrayDeque arrayDeque = new ArrayDeque(20);
|
|
int highestOneBit = Integer.highestOneBit(0);
|
|
int min = Math.min(8192, Math.max(128, highestOneBit + highestOneBit));
|
|
int i = 0;
|
|
while (i < 2147483639) {
|
|
int min2 = Math.min(min, 2147483639 - i);
|
|
byte[] bArr = new byte[min2];
|
|
arrayDeque.add(bArr);
|
|
int i2 = 0;
|
|
while (i2 < min2) {
|
|
int read = inputStream.read(bArr, i2, min2 - i2);
|
|
if (read == -1) {
|
|
return zzc(arrayDeque, i);
|
|
}
|
|
i2 += read;
|
|
i += read;
|
|
}
|
|
min = zzgaq.zze(min * (min < 4096 ? 4 : 2));
|
|
}
|
|
if (inputStream.read() == -1) {
|
|
return zzc(arrayDeque, 2147483639);
|
|
}
|
|
throw new OutOfMemoryError("input is too large to fit in a byte array");
|
|
}
|
|
}
|