mirror of
https://github.com/Pinball3D/Rabbit-R1.git
synced 2025-01-09 13:43:22 +00:00
45 lines
1.5 KiB
Java
45 lines
1.5 KiB
Java
package com.google.zxing.aztec.encoder;
|
|
|
|
import com.google.zxing.common.BitArray;
|
|
import kotlin.text.Typography;
|
|
|
|
/* loaded from: classes3.dex */
|
|
final class BinaryShiftToken extends Token {
|
|
private final short binaryShiftByteCount;
|
|
private final short binaryShiftStart;
|
|
|
|
/* JADX INFO: Access modifiers changed from: package-private */
|
|
public BinaryShiftToken(Token token, int i, int i2) {
|
|
super(token);
|
|
this.binaryShiftStart = (short) i;
|
|
this.binaryShiftByteCount = (short) i2;
|
|
}
|
|
|
|
@Override // com.google.zxing.aztec.encoder.Token
|
|
public void appendTo(BitArray bitArray, byte[] bArr) {
|
|
int i = 0;
|
|
while (true) {
|
|
short s = this.binaryShiftByteCount;
|
|
if (i >= s) {
|
|
return;
|
|
}
|
|
if (i == 0 || (i == 31 && s <= 62)) {
|
|
bitArray.appendBits(31, 5);
|
|
short s2 = this.binaryShiftByteCount;
|
|
if (s2 > 62) {
|
|
bitArray.appendBits(s2 - 31, 16);
|
|
} else if (i == 0) {
|
|
bitArray.appendBits(Math.min((int) s2, 31), 5);
|
|
} else {
|
|
bitArray.appendBits(s2 - 31, 5);
|
|
}
|
|
}
|
|
bitArray.appendBits(bArr[this.binaryShiftStart + i], 8);
|
|
i++;
|
|
}
|
|
}
|
|
|
|
public String toString() {
|
|
return "<" + ((int) this.binaryShiftStart) + "::" + ((this.binaryShiftStart + this.binaryShiftByteCount) - 1) + Typography.greater;
|
|
}
|
|
}
|