package defpackage;

import android.text.TextUtils;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

/* renamed from: ʽᵛᵬˊ, reason: contains not printable characters */
/* loaded from: classes3.dex */
public abstract class AbstractC0137 {

    /* renamed from: ᵥᵯˎ, reason: contains not printable characters */
    public static final Pattern f1480 = Pattern.compile("bytes (\\d+)-(\\d+)/(?:\\d+|\\*)");

    /* renamed from: ᵴᵳ, reason: contains not printable characters */
    public static final Pattern f1481 = Pattern.compile("bytes (?:(?:\\d+-\\d+)|\\*)/(\\d+)");

    /* renamed from: ᵥᵯˎ, reason: contains not printable characters */
    public static String m1243(long j, long j2) {
        if (j == 0 && j2 == -1) {
            return null;
        }
        StringBuilder sbM4110 = AbstractC1327.m4110(j, "bytes=", "-");
        if (j2 != -1) {
            sbM4110.append((j + j2) - 1);
        }
        return sbM4110.toString();
    }

    /* renamed from: ᵴᵳ, reason: contains not printable characters */
    public static long m1244(String str) {
        if (TextUtils.isEmpty(str)) {
            return -1L;
        }
        Matcher matcher = f1481.matcher(str);
        if (!matcher.matches()) {
            return -1L;
        }
        String strGroup = matcher.group(1);
        strGroup.getClass();
        return Long.parseLong(strGroup);
    }
}
