package h.b.o;

import java.util.Arrays;

/* JADX INFO: compiled from: PrimitiveArraysSerializers.kt */
/* JADX INFO: loaded from: classes.dex */
@g.i
public final class f extends b1<boolean[]> {
    public boolean[] a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public int f4388b;

    public f(boolean[] zArr) {
        g.h0.c.l.f(zArr, "bufferWithData");
        this.a = zArr;
        this.f4388b = zArr.length;
        b(10);
    }

    @Override // h.b.o.b1
    public boolean[] a() {
        boolean[] zArrCopyOf = Arrays.copyOf(this.a, this.f4388b);
        g.h0.c.l.e(zArrCopyOf, "copyOf(this, newSize)");
        return zArrCopyOf;
    }

    @Override // h.b.o.b1
    public void b(int i2) {
        boolean[] zArr = this.a;
        if (zArr.length < i2) {
            int length = zArr.length * 2;
            if (i2 < length) {
                i2 = length;
            }
            boolean[] zArrCopyOf = Arrays.copyOf(zArr, i2);
            g.h0.c.l.e(zArrCopyOf, "copyOf(this, newSize)");
            this.a = zArrCopyOf;
        }
    }

    @Override // h.b.o.b1
    public int d() {
        return this.f4388b;
    }
}
