Add decompiled APK source code (JADX)

- 28,932 files
- Full Java source code
- Smali files
- Resources

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2026-02-18 14:52:23 -08:00
parent cc210a65ea
commit f9d20bb3fc
26991 changed files with 2541449 additions and 0 deletions

View File

@@ -0,0 +1,62 @@
package com.google.zxing.datamatrix.encoder;
/* loaded from: classes3.dex */
public final class ASCIIEncoder implements Encoder {
public int getEncodingMode() {
return 0;
}
@Override // com.google.zxing.datamatrix.encoder.Encoder
public void encode(EncoderContext encoderContext) {
if (HighLevelEncoder.determineConsecutiveDigitCount(encoderContext.getMessage(), encoderContext.pos) >= 2) {
encoderContext.writeCodeword(encodeASCIIDigits(encoderContext.getMessage().charAt(encoderContext.pos), encoderContext.getMessage().charAt(encoderContext.pos + 1)));
encoderContext.pos += 2;
return;
}
char currentChar = encoderContext.getCurrentChar();
int lookAheadTest = HighLevelEncoder.lookAheadTest(encoderContext.getMessage(), encoderContext.pos, getEncodingMode());
if (lookAheadTest == getEncodingMode()) {
if (HighLevelEncoder.isExtendedASCII(currentChar)) {
encoderContext.writeCodeword((char) 235);
encoderContext.writeCodeword((char) (currentChar - 127));
encoderContext.pos++;
return;
} else {
encoderContext.writeCodeword((char) (currentChar + 1));
encoderContext.pos++;
return;
}
}
if (lookAheadTest == 1) {
encoderContext.writeCodeword((char) 230);
encoderContext.signalEncoderChange(1);
return;
}
if (lookAheadTest == 2) {
encoderContext.writeCodeword((char) 239);
encoderContext.signalEncoderChange(2);
return;
}
if (lookAheadTest == 3) {
encoderContext.writeCodeword((char) 238);
encoderContext.signalEncoderChange(3);
} else if (lookAheadTest == 4) {
encoderContext.writeCodeword((char) 240);
encoderContext.signalEncoderChange(4);
} else {
if (lookAheadTest == 5) {
encoderContext.writeCodeword((char) 231);
encoderContext.signalEncoderChange(5);
return;
}
throw new IllegalStateException("Illegal mode: ".concat(String.valueOf(lookAheadTest)));
}
}
public static char encodeASCIIDigits(char c, char c2) {
if (HighLevelEncoder.isDigit(c) && HighLevelEncoder.isDigit(c2)) {
return (char) (((c - '0') * 10) + (c2 - '0') + 130);
}
throw new IllegalArgumentException("not digits: " + c + c2);
}
}

View File

@@ -0,0 +1,48 @@
package com.google.zxing.datamatrix.encoder;
/* loaded from: classes3.dex */
public final class Base256Encoder implements Encoder {
public int getEncodingMode() {
return 5;
}
@Override // com.google.zxing.datamatrix.encoder.Encoder
public void encode(EncoderContext encoderContext) {
StringBuilder sb = new StringBuilder();
sb.append((char) 0);
while (true) {
if (!encoderContext.hasMoreCharacters()) {
break;
}
sb.append(encoderContext.getCurrentChar());
encoderContext.pos++;
if (HighLevelEncoder.lookAheadTest(encoderContext.getMessage(), encoderContext.pos, getEncodingMode()) != getEncodingMode()) {
encoderContext.signalEncoderChange(0);
break;
}
}
int length = sb.length() - 1;
int codewordCount = encoderContext.getCodewordCount() + length + 1;
encoderContext.updateSymbolInfo(codewordCount);
boolean z = encoderContext.getSymbolInfo().getDataCapacity() - codewordCount > 0;
if (encoderContext.hasMoreCharacters() || z) {
if (length <= 249) {
sb.setCharAt(0, (char) length);
} else if (length <= 1555) {
sb.setCharAt(0, (char) ((length / 250) + 249));
sb.insert(1, (char) (length % 250));
} else {
throw new IllegalStateException("Message length not in valid ranges: ".concat(String.valueOf(length)));
}
}
int length2 = sb.length();
for (int i = 0; i < length2; i++) {
encoderContext.writeCodeword(randomize255State(sb.charAt(i), encoderContext.getCodewordCount() + 1));
}
}
public static char randomize255State(char c, int i) {
int i2 = c + ((i * 149) % 255) + 1;
return i2 <= 255 ? (char) i2 : (char) (i2 - 256);
}
}

View File

@@ -0,0 +1,133 @@
package com.google.zxing.datamatrix.encoder;
/* loaded from: classes3.dex */
public class C40Encoder implements Encoder {
public int getEncodingMode() {
return 1;
}
@Override // com.google.zxing.datamatrix.encoder.Encoder
public void encode(EncoderContext encoderContext) {
StringBuilder sb = new StringBuilder();
while (true) {
if (!encoderContext.hasMoreCharacters()) {
break;
}
char currentChar = encoderContext.getCurrentChar();
encoderContext.pos++;
int encodeChar = encodeChar(currentChar, sb);
int codewordCount = encoderContext.getCodewordCount() + ((sb.length() / 3) << 1);
encoderContext.updateSymbolInfo(codewordCount);
int dataCapacity = encoderContext.getSymbolInfo().getDataCapacity() - codewordCount;
if (!encoderContext.hasMoreCharacters()) {
StringBuilder sb2 = new StringBuilder();
if (sb.length() % 3 == 2 && (dataCapacity < 2 || dataCapacity > 2)) {
encodeChar = backtrackOneCharacter(encoderContext, sb, sb2, encodeChar);
}
while (sb.length() % 3 == 1 && ((encodeChar <= 3 && dataCapacity != 1) || encodeChar > 3)) {
encodeChar = backtrackOneCharacter(encoderContext, sb, sb2, encodeChar);
}
} else if (sb.length() % 3 == 0 && HighLevelEncoder.lookAheadTest(encoderContext.getMessage(), encoderContext.pos, getEncodingMode()) != getEncodingMode()) {
encoderContext.signalEncoderChange(0);
break;
}
}
handleEOD(encoderContext, sb);
}
public final int backtrackOneCharacter(EncoderContext encoderContext, StringBuilder sb, StringBuilder sb2, int i) {
int length = sb.length();
sb.delete(length - i, length);
encoderContext.pos--;
int encodeChar = encodeChar(encoderContext.getCurrentChar(), sb2);
encoderContext.resetSymbolInfo();
return encodeChar;
}
public static void writeNextTriplet(EncoderContext encoderContext, StringBuilder sb) {
encoderContext.writeCodewords(encodeToCodewords(sb, 0));
sb.delete(0, 3);
}
public void handleEOD(EncoderContext encoderContext, StringBuilder sb) {
int length = (sb.length() / 3) << 1;
int length2 = sb.length() % 3;
int codewordCount = encoderContext.getCodewordCount() + length;
encoderContext.updateSymbolInfo(codewordCount);
int dataCapacity = encoderContext.getSymbolInfo().getDataCapacity() - codewordCount;
if (length2 == 2) {
sb.append((char) 0);
while (sb.length() >= 3) {
writeNextTriplet(encoderContext, sb);
}
if (encoderContext.hasMoreCharacters()) {
encoderContext.writeCodeword((char) 254);
}
} else if (dataCapacity == 1 && length2 == 1) {
while (sb.length() >= 3) {
writeNextTriplet(encoderContext, sb);
}
if (encoderContext.hasMoreCharacters()) {
encoderContext.writeCodeword((char) 254);
}
encoderContext.pos--;
} else if (length2 == 0) {
while (sb.length() >= 3) {
writeNextTriplet(encoderContext, sb);
}
if (dataCapacity > 0 || encoderContext.hasMoreCharacters()) {
encoderContext.writeCodeword((char) 254);
}
} else {
throw new IllegalStateException("Unexpected case. Please report!");
}
encoderContext.signalEncoderChange(0);
}
public int encodeChar(char c, StringBuilder sb) {
if (c == ' ') {
sb.append((char) 3);
return 1;
}
if (c >= '0' && c <= '9') {
sb.append((char) (c - ','));
return 1;
}
if (c >= 'A' && c <= 'Z') {
sb.append((char) (c - '3'));
return 1;
}
if (c < ' ') {
sb.append((char) 0);
sb.append(c);
return 2;
}
if (c >= '!' && c <= '/') {
sb.append((char) 1);
sb.append((char) (c - '!'));
return 2;
}
if (c >= ':' && c <= '@') {
sb.append((char) 1);
sb.append((char) (c - '+'));
return 2;
}
if (c >= '[' && c <= '_') {
sb.append((char) 1);
sb.append((char) (c - 'E'));
return 2;
}
if (c >= '`' && c <= 127) {
sb.append((char) 2);
sb.append((char) (c - '`'));
return 2;
}
sb.append("\u0001\u001e");
return encodeChar((char) (c - 128), sb) + 2;
}
public static String encodeToCodewords(CharSequence charSequence, int i) {
int charAt = (charSequence.charAt(i) * 1600) + (charSequence.charAt(i + 1) * '(') + charSequence.charAt(i + 2) + 1;
return new String(new char[]{(char) (charAt / 256), (char) (charAt % 256)});
}
}

View File

@@ -0,0 +1,20 @@
package com.google.zxing.datamatrix.encoder;
import com.ironsource.mediationsdk.logger.IronSourceError;
/* loaded from: classes3.dex */
public final class DataMatrixSymbolInfo144 extends SymbolInfo {
@Override // com.google.zxing.datamatrix.encoder.SymbolInfo
public int getDataLengthForInterleavedBlock(int i) {
return i <= 8 ? 156 : 155;
}
@Override // com.google.zxing.datamatrix.encoder.SymbolInfo
public int getInterleavedBlockCount() {
return 10;
}
public DataMatrixSymbolInfo144() {
super(false, 1558, IronSourceError.ERROR_DO_BN_LOAD_DURING_SHOW, 22, 22, 36, -1, 62);
}
}

View File

@@ -0,0 +1,170 @@
package com.google.zxing.datamatrix.encoder;
import java.util.Arrays;
/* loaded from: classes3.dex */
public class DefaultPlacement {
public final byte[] bits;
public final CharSequence codewords;
public final int numcols;
public final int numrows;
public DefaultPlacement(CharSequence charSequence, int i, int i2) {
this.codewords = charSequence;
this.numcols = i;
this.numrows = i2;
byte[] bArr = new byte[i * i2];
this.bits = bArr;
Arrays.fill(bArr, (byte) -1);
}
public final boolean getBit(int i, int i2) {
return this.bits[(i2 * this.numcols) + i] == 1;
}
public final void setBit(int i, int i2, boolean z) {
this.bits[(i2 * this.numcols) + i] = z ? (byte) 1 : (byte) 0;
}
public final boolean hasBit(int i, int i2) {
return this.bits[(i2 * this.numcols) + i] >= 0;
}
public final void place() {
int i;
int i2;
int i3 = 0;
int i4 = 0;
int i5 = 4;
while (true) {
if (i5 == this.numrows && i3 == 0) {
corner1(i4);
i4++;
}
if (i5 == this.numrows - 2 && i3 == 0 && this.numcols % 4 != 0) {
corner2(i4);
i4++;
}
if (i5 == this.numrows - 2 && i3 == 0 && this.numcols % 8 == 4) {
corner3(i4);
i4++;
}
if (i5 == this.numrows + 4 && i3 == 2 && this.numcols % 8 == 0) {
corner4(i4);
i4++;
}
while (true) {
if (i5 < this.numrows && i3 >= 0 && !hasBit(i3, i5)) {
utah(i5, i3, i4);
i4++;
}
int i6 = i5 - 2;
int i7 = i3 + 2;
if (i6 < 0 || i7 >= this.numcols) {
break;
}
i5 = i6;
i3 = i7;
}
int i8 = i5 - 1;
int i9 = i3 + 5;
while (true) {
if (i8 >= 0 && i9 < this.numcols && !hasBit(i9, i8)) {
utah(i8, i9, i4);
i4++;
}
int i10 = i8 + 2;
int i11 = i9 - 2;
i = this.numrows;
if (i10 >= i || i11 < 0) {
break;
}
i8 = i10;
i9 = i11;
}
i5 = i8 + 5;
i3 = i9 - 1;
if (i5 >= i && i3 >= (i2 = this.numcols)) {
break;
}
}
if (hasBit(i2 - 1, i - 1)) {
return;
}
setBit(this.numcols - 1, this.numrows - 1, true);
setBit(this.numcols - 2, this.numrows - 2, true);
}
public final void module(int i, int i2, int i3, int i4) {
if (i < 0) {
int i5 = this.numrows;
i += i5;
i2 += 4 - ((i5 + 4) % 8);
}
if (i2 < 0) {
int i6 = this.numcols;
i2 += i6;
i += 4 - ((i6 + 4) % 8);
}
setBit(i2, i, (this.codewords.charAt(i3) & (1 << (8 - i4))) != 0);
}
public final void utah(int i, int i2, int i3) {
int i4 = i - 2;
int i5 = i2 - 2;
module(i4, i5, i3, 1);
int i6 = i2 - 1;
module(i4, i6, i3, 2);
int i7 = i - 1;
module(i7, i5, i3, 3);
module(i7, i6, i3, 4);
module(i7, i2, i3, 5);
module(i, i5, i3, 6);
module(i, i6, i3, 7);
module(i, i2, i3, 8);
}
public final void corner1(int i) {
module(this.numrows - 1, 0, i, 1);
module(this.numrows - 1, 1, i, 2);
module(this.numrows - 1, 2, i, 3);
module(0, this.numcols - 2, i, 4);
module(0, this.numcols - 1, i, 5);
module(1, this.numcols - 1, i, 6);
module(2, this.numcols - 1, i, 7);
module(3, this.numcols - 1, i, 8);
}
public final void corner2(int i) {
module(this.numrows - 3, 0, i, 1);
module(this.numrows - 2, 0, i, 2);
module(this.numrows - 1, 0, i, 3);
module(0, this.numcols - 4, i, 4);
module(0, this.numcols - 3, i, 5);
module(0, this.numcols - 2, i, 6);
module(0, this.numcols - 1, i, 7);
module(1, this.numcols - 1, i, 8);
}
public final void corner3(int i) {
module(this.numrows - 3, 0, i, 1);
module(this.numrows - 2, 0, i, 2);
module(this.numrows - 1, 0, i, 3);
module(0, this.numcols - 2, i, 4);
module(0, this.numcols - 1, i, 5);
module(1, this.numcols - 1, i, 6);
module(2, this.numcols - 1, i, 7);
module(3, this.numcols - 1, i, 8);
}
public final void corner4(int i) {
module(this.numrows - 1, 0, i, 1);
module(this.numrows - 1, this.numcols - 1, i, 2);
module(0, this.numcols - 3, i, 3);
module(0, this.numcols - 2, i, 4);
module(0, this.numcols - 1, i, 5);
module(1, this.numcols - 3, i, 6);
module(1, this.numcols - 2, i, 7);
module(1, this.numcols - 1, i, 8);
}
}

View File

@@ -0,0 +1,104 @@
package com.google.zxing.datamatrix.encoder;
/* loaded from: classes3.dex */
public final class EdifactEncoder implements Encoder {
public int getEncodingMode() {
return 4;
}
@Override // com.google.zxing.datamatrix.encoder.Encoder
public void encode(EncoderContext encoderContext) {
StringBuilder sb = new StringBuilder();
while (true) {
if (!encoderContext.hasMoreCharacters()) {
break;
}
encodeChar(encoderContext.getCurrentChar(), sb);
encoderContext.pos++;
if (sb.length() >= 4) {
encoderContext.writeCodewords(encodeToCodewords(sb, 0));
sb.delete(0, 4);
if (HighLevelEncoder.lookAheadTest(encoderContext.getMessage(), encoderContext.pos, getEncodingMode()) != getEncodingMode()) {
encoderContext.signalEncoderChange(0);
break;
}
}
}
sb.append((char) 31);
handleEOD(encoderContext, sb);
}
public static void handleEOD(EncoderContext encoderContext, CharSequence charSequence) {
try {
int length = charSequence.length();
if (length == 0) {
return;
}
boolean z = true;
if (length == 1) {
encoderContext.updateSymbolInfo();
int dataCapacity = encoderContext.getSymbolInfo().getDataCapacity() - encoderContext.getCodewordCount();
int remainingCharacters = encoderContext.getRemainingCharacters();
if (remainingCharacters > dataCapacity) {
encoderContext.updateSymbolInfo(encoderContext.getCodewordCount() + 1);
dataCapacity = encoderContext.getSymbolInfo().getDataCapacity() - encoderContext.getCodewordCount();
}
if (remainingCharacters <= dataCapacity && dataCapacity <= 2) {
return;
}
}
if (length > 4) {
throw new IllegalStateException("Count must not exceed 4");
}
int i = length - 1;
String encodeToCodewords = encodeToCodewords(charSequence, 0);
if (!(!encoderContext.hasMoreCharacters()) || i > 2) {
z = false;
}
if (i <= 2) {
encoderContext.updateSymbolInfo(encoderContext.getCodewordCount() + i);
if (encoderContext.getSymbolInfo().getDataCapacity() - encoderContext.getCodewordCount() >= 3) {
encoderContext.updateSymbolInfo(encoderContext.getCodewordCount() + encodeToCodewords.length());
encoderContext.writeCodewords(encodeToCodewords);
}
}
if (z) {
encoderContext.resetSymbolInfo();
encoderContext.pos -= i;
}
encoderContext.writeCodewords(encodeToCodewords);
} finally {
encoderContext.signalEncoderChange(0);
}
}
public static void encodeChar(char c, StringBuilder sb) {
if (c >= ' ' && c <= '?') {
sb.append(c);
} else if (c >= '@' && c <= '^') {
sb.append((char) (c - '@'));
} else {
HighLevelEncoder.illegalCharacter(c);
}
}
private static String encodeToCodewords(CharSequence charSequence, int i) {
int length = charSequence.length() - i;
if (length == 0) {
throw new IllegalStateException("StringBuilder must not be empty");
}
int charAt = (charSequence.charAt(i) << 18) + ((length >= 2 ? charSequence.charAt(i + 1) : (char) 0) << '\f') + ((length >= 3 ? charSequence.charAt(i + 2) : (char) 0) << 6) + (length >= 4 ? charSequence.charAt(i + 3) : (char) 0);
char c = (char) ((charAt >> 16) & 255);
char c2 = (char) ((charAt >> 8) & 255);
char c3 = (char) (charAt & 255);
StringBuilder sb = new StringBuilder(3);
sb.append(c);
if (length >= 2) {
sb.append(c2);
}
if (length >= 3) {
sb.append(c3);
}
return sb.toString();
}
}

View File

@@ -0,0 +1,6 @@
package com.google.zxing.datamatrix.encoder;
/* loaded from: classes3.dex */
public interface Encoder {
void encode(EncoderContext encoderContext);
}

View File

@@ -0,0 +1,110 @@
package com.google.zxing.datamatrix.encoder;
import com.google.zxing.Dimension;
import java.nio.charset.StandardCharsets;
/* loaded from: classes3.dex */
public final class EncoderContext {
public final StringBuilder codewords;
public final String msg;
public int newEncoding;
public int pos;
public SymbolShapeHint shape;
public int skipAtEnd;
public SymbolInfo symbolInfo;
public StringBuilder getCodewords() {
return this.codewords;
}
public String getMessage() {
return this.msg;
}
public int getNewEncoding() {
return this.newEncoding;
}
public SymbolInfo getSymbolInfo() {
return this.symbolInfo;
}
public void resetEncoderSignal() {
this.newEncoding = -1;
}
public void resetSymbolInfo() {
this.symbolInfo = null;
}
public void setSizeConstraints(Dimension dimension, Dimension dimension2) {
}
public void setSkipAtEnd(int i) {
this.skipAtEnd = i;
}
public void setSymbolShape(SymbolShapeHint symbolShapeHint) {
this.shape = symbolShapeHint;
}
public void signalEncoderChange(int i) {
this.newEncoding = i;
}
public EncoderContext(String str) {
byte[] bytes = str.getBytes(StandardCharsets.ISO_8859_1);
StringBuilder sb = new StringBuilder(bytes.length);
int length = bytes.length;
for (int i = 0; i < length; i++) {
char c = (char) (bytes[i] & 255);
if (c == '?' && str.charAt(i) != '?') {
throw new IllegalArgumentException("Message contains characters outside ISO-8859-1 encoding.");
}
sb.append(c);
}
this.msg = sb.toString();
this.shape = SymbolShapeHint.FORCE_NONE;
this.codewords = new StringBuilder(str.length());
this.newEncoding = -1;
}
public char getCurrentChar() {
return this.msg.charAt(this.pos);
}
public void writeCodewords(String str) {
this.codewords.append(str);
}
public void writeCodeword(char c) {
this.codewords.append(c);
}
public int getCodewordCount() {
return this.codewords.length();
}
public boolean hasMoreCharacters() {
return this.pos < getTotalMessageCharCount();
}
public final int getTotalMessageCharCount() {
return this.msg.length() - this.skipAtEnd;
}
public int getRemainingCharacters() {
return getTotalMessageCharCount() - this.pos;
}
public void updateSymbolInfo() {
updateSymbolInfo(getCodewordCount());
}
public void updateSymbolInfo(int i) {
SymbolInfo symbolInfo = this.symbolInfo;
if (symbolInfo == null || i > symbolInfo.getDataCapacity()) {
this.symbolInfo = SymbolInfo.lookup(i, this.shape, null, null, true);
}
}
}

View File

@@ -0,0 +1,126 @@
package com.google.zxing.datamatrix.encoder;
import com.facebook.internal.FacebookRequestErrorClassification;
import com.ironsource.mediationsdk.utils.IronSourceConstants;
import com.mbridge.msdk.playercommon.exoplayer2.extractor.ts.PsExtractor;
import com.vungle.ads.internal.protos.Sdk;
import com.vungle.ads.internal.signals.SignalKey;
/* loaded from: classes3.dex */
public abstract class ErrorCorrection {
public static final int[] FACTOR_SETS = {5, 7, 10, 11, 12, 14, 18, 20, 24, 28, 36, 42, 48, 56, 62, 68};
public static final int[][] FACTORS = {new int[]{228, 48, 15, 111, 62}, new int[]{23, 68, 144, 134, PsExtractor.VIDEO_STREAM_MASK, 92, 254}, new int[]{28, 24, 185, 166, Sdk.SDKError.Reason.STALE_CACHED_RESPONSE_VALUE, 248, 116, 255, 110, 61}, new int[]{175, 138, 205, 12, 194, 168, 39, 245, 60, 97, 120}, new int[]{41, 153, 158, 91, 61, 42, 142, 213, 97, 178, 100, 242}, new int[]{156, 97, PsExtractor.AUDIO_STREAM, 252, 95, 9, 157, 119, 138, 45, 18, 186, 83, 185}, new int[]{83, 195, 100, 39, 188, 75, 66, 61, 241, 213, 109, 129, 94, 254, 225, 48, 90, 188}, new int[]{15, 195, 244, 9, 233, 71, 168, 2, 188, 160, 153, 145, 253, 79, 108, 82, 27, 174, 186, 172}, new int[]{52, FacebookRequestErrorClassification.EC_INVALID_TOKEN, 88, 205, 109, 39, 176, 21, 155, 197, 251, Sdk.SDKError.Reason.STALE_CACHED_RESPONSE_VALUE, 155, 21, 5, 172, 254, 124, 12, 181, 184, 96, 50, 193}, new int[]{211, 231, 43, 97, 71, 96, 103, 174, 37, 151, 170, 53, 75, 34, 249, 121, 17, 138, 110, 213, 141, 136, 120, 151, 233, 168, 93, 255}, new int[]{245, 127, 242, 218, 130, 250, 162, 181, 102, 120, 84, 179, 220, 251, 80, 182, 229, 18, 2, 4, 68, 33, 101, 137, 95, 119, 115, 44, 175, 184, 59, 25, 225, 98, 81, 112}, new int[]{77, 193, 137, 31, 19, 38, 22, 153, 247, 105, 122, 2, 245, 133, 242, 8, 175, 95, 100, 9, 167, 105, 214, 111, 57, 121, 21, 1, 253, 57, 54, 101, 248, 202, 69, 50, IronSourceConstants.REWARDED_VIDEO_DAILY_CAPPED, 177, 226, 5, 9, 5}, new int[]{245, 132, 172, Sdk.SDKError.Reason.STALE_CACHED_RESPONSE_VALUE, 96, 32, 117, 22, 238, 133, 238, 231, 205, 188, 237, 87, 191, 106, 16, 147, 118, 23, 37, 90, 170, 205, 131, 88, 120, 100, 66, 138, 186, PsExtractor.VIDEO_STREAM_MASK, 82, 44, 176, 87, 187, 147, 160, 175, 69, 213, 92, 253, 225, 19}, new int[]{175, 9, Sdk.SDKError.Reason.STALE_CACHED_RESPONSE_VALUE, 238, 12, 17, 220, 208, 100, 29, 175, 170, 230, PsExtractor.AUDIO_STREAM, 215, 235, IronSourceConstants.REWARDED_VIDEO_DAILY_CAPPED, 159, 36, Sdk.SDKError.Reason.STALE_CACHED_RESPONSE_VALUE, 38, 200, 132, 54, 228, 146, 218, 234, 117, 203, 29, 232, 144, 238, 22, IronSourceConstants.REWARDED_VIDEO_DAILY_CAPPED, 201, 117, 62, 207, 164, 13, 137, 245, 127, 67, 247, 28, 155, 43, 203, SignalKey.EVENT_ID, 233, 53, 143, 46}, new int[]{242, 93, 169, 50, 144, 210, 39, 118, 202, 188, 201, PsExtractor.PRIVATE_STREAM_1, 143, 108, 196, 37, 185, 112, 134, 230, 245, 63, 197, FacebookRequestErrorClassification.EC_INVALID_TOKEN, 250, 106, 185, 221, 175, 64, 114, 71, 161, 44, 147, 6, 27, 218, 51, 63, 87, 10, 40, 130, 188, 17, 163, 31, 176, 170, 4, SignalKey.EVENT_ID, 232, 7, 94, 166, 224, 124, 86, 47, 11, 204}, new int[]{220, 228, 173, 89, 251, 149, 159, 56, 89, 33, 147, 244, 154, 36, 73, 127, 213, 136, 248, 180, 234, 197, 158, 177, 68, 122, 93, 213, 15, 160, 227, 236, 66, 139, 153, 185, 202, 167, 179, 25, 220, 232, 96, 210, 231, 136, Sdk.SDKError.Reason.STALE_CACHED_RESPONSE_VALUE, 239, 181, 241, 59, 52, 172, 25, 49, 232, 211, PsExtractor.PRIVATE_STREAM_1, 64, 54, 108, 153, 132, 63, 96, 103, 82, 186}};
public static final int[] LOG = new int[256];
public static final int[] ALOG = new int[255];
static {
int i = 1;
for (int i2 = 0; i2 < 255; i2++) {
ALOG[i2] = i;
LOG[i] = i2;
i <<= 1;
if (i >= 256) {
i ^= 301;
}
}
}
public static String encodeECC200(String str, SymbolInfo symbolInfo) {
if (str.length() != symbolInfo.getDataCapacity()) {
throw new IllegalArgumentException("The number of codewords does not match the selected symbol");
}
StringBuilder sb = new StringBuilder(symbolInfo.getDataCapacity() + symbolInfo.getErrorCodewords());
sb.append(str);
int interleavedBlockCount = symbolInfo.getInterleavedBlockCount();
if (interleavedBlockCount == 1) {
sb.append(createECCBlock(str, symbolInfo.getErrorCodewords()));
} else {
sb.setLength(sb.capacity());
int[] iArr = new int[interleavedBlockCount];
int[] iArr2 = new int[interleavedBlockCount];
int[] iArr3 = new int[interleavedBlockCount];
int i = 0;
while (i < interleavedBlockCount) {
int i2 = i + 1;
iArr[i] = symbolInfo.getDataLengthForInterleavedBlock(i2);
iArr2[i] = symbolInfo.getErrorLengthForInterleavedBlock(i2);
iArr3[i] = 0;
if (i > 0) {
iArr3[i] = iArr3[i - 1] + iArr[i];
}
i = i2;
}
for (int i3 = 0; i3 < interleavedBlockCount; i3++) {
StringBuilder sb2 = new StringBuilder(iArr[i3]);
for (int i4 = i3; i4 < symbolInfo.getDataCapacity(); i4 += interleavedBlockCount) {
sb2.append(str.charAt(i4));
}
String createECCBlock = createECCBlock(sb2.toString(), iArr2[i3]);
int i5 = i3;
int i6 = 0;
while (i5 < iArr2[i3] * interleavedBlockCount) {
sb.setCharAt(symbolInfo.getDataCapacity() + i5, createECCBlock.charAt(i6));
i5 += interleavedBlockCount;
i6++;
}
}
}
return sb.toString();
}
public static String createECCBlock(CharSequence charSequence, int i) {
return createECCBlock(charSequence, 0, charSequence.length(), i);
}
public static String createECCBlock(CharSequence charSequence, int i, int i2, int i3) {
int i4;
int i5;
int i6 = 0;
while (true) {
int[] iArr = FACTOR_SETS;
if (i6 >= iArr.length) {
i6 = -1;
break;
}
if (iArr[i6] == i3) {
break;
}
i6++;
}
if (i6 < 0) {
throw new IllegalArgumentException("Illegal number of error correction codewords specified: ".concat(String.valueOf(i3)));
}
int[] iArr2 = FACTORS[i6];
char[] cArr = new char[i3];
for (int i7 = 0; i7 < i3; i7++) {
cArr[i7] = 0;
}
for (int i8 = i; i8 < i + i2; i8++) {
int i9 = i3 - 1;
int charAt = cArr[i9] ^ charSequence.charAt(i8);
while (i9 > 0) {
if (charAt != 0 && (i5 = iArr2[i9]) != 0) {
char c = cArr[i9 - 1];
int[] iArr3 = ALOG;
int[] iArr4 = LOG;
cArr[i9] = (char) (iArr3[(iArr4[charAt] + iArr4[i5]) % 255] ^ c);
} else {
cArr[i9] = cArr[i9 - 1];
}
i9--;
}
if (charAt != 0 && (i4 = iArr2[0]) != 0) {
int[] iArr5 = ALOG;
int[] iArr6 = LOG;
cArr[0] = (char) iArr5[(iArr6[charAt] + iArr6[i4]) % 255];
} else {
cArr[0] = 0;
}
}
char[] cArr2 = new char[i3];
for (int i10 = 0; i10 < i3; i10++) {
cArr2[i10] = cArr[(i3 - i10) - 1];
}
return String.valueOf(cArr2);
}
}

View File

@@ -0,0 +1,284 @@
package com.google.zxing.datamatrix.encoder;
import com.google.zxing.Dimension;
import java.util.Arrays;
/* loaded from: classes3.dex */
public abstract class HighLevelEncoder {
public static boolean isDigit(char c) {
return c >= '0' && c <= '9';
}
public static boolean isExtendedASCII(char c) {
return c >= 128 && c <= 255;
}
public static boolean isNativeC40(char c) {
if (c == ' ') {
return true;
}
if (c < '0' || c > '9') {
return c >= 'A' && c <= 'Z';
}
return true;
}
public static boolean isNativeEDIFACT(char c) {
return c >= ' ' && c <= '^';
}
public static boolean isNativeText(char c) {
if (c == ' ') {
return true;
}
if (c < '0' || c > '9') {
return c >= 'a' && c <= 'z';
}
return true;
}
public static boolean isSpecialB256(char c) {
return false;
}
public static boolean isX12TermSep(char c) {
return c == '\r' || c == '*' || c == '>';
}
public static char randomize253State(char c, int i) {
int i2 = c + ((i * 149) % 253) + 1;
if (i2 > 254) {
i2 -= 254;
}
return (char) i2;
}
public static String encodeHighLevel(String str, SymbolShapeHint symbolShapeHint, Dimension dimension, Dimension dimension2) {
int i = 0;
Encoder[] encoderArr = {new ASCIIEncoder(), new C40Encoder(), new TextEncoder(), new X12Encoder(), new EdifactEncoder(), new Base256Encoder()};
EncoderContext encoderContext = new EncoderContext(str);
encoderContext.setSymbolShape(symbolShapeHint);
encoderContext.setSizeConstraints(dimension, dimension2);
if (str.startsWith("[)>\u001e05\u001d") && str.endsWith("\u001e\u0004")) {
encoderContext.writeCodeword((char) 236);
encoderContext.setSkipAtEnd(2);
encoderContext.pos += 7;
} else if (str.startsWith("[)>\u001e06\u001d") && str.endsWith("\u001e\u0004")) {
encoderContext.writeCodeword((char) 237);
encoderContext.setSkipAtEnd(2);
encoderContext.pos += 7;
}
while (encoderContext.hasMoreCharacters()) {
encoderArr[i].encode(encoderContext);
if (encoderContext.getNewEncoding() >= 0) {
i = encoderContext.getNewEncoding();
encoderContext.resetEncoderSignal();
}
}
int codewordCount = encoderContext.getCodewordCount();
encoderContext.updateSymbolInfo();
int dataCapacity = encoderContext.getSymbolInfo().getDataCapacity();
if (codewordCount < dataCapacity && i != 0 && i != 5 && i != 4) {
encoderContext.writeCodeword((char) 254);
}
StringBuilder codewords = encoderContext.getCodewords();
if (codewords.length() < dataCapacity) {
codewords.append((char) 129);
}
while (codewords.length() < dataCapacity) {
codewords.append(randomize253State((char) 129, codewords.length() + 1));
}
return encoderContext.getCodewords().toString();
}
public static int lookAheadTest(CharSequence charSequence, int i, int i2) {
float[] fArr;
char c;
if (i >= charSequence.length()) {
return i2;
}
int i3 = 6;
if (i2 == 0) {
fArr = new float[]{0.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.25f};
} else {
fArr = new float[]{1.0f, 2.0f, 2.0f, 2.0f, 2.0f, 2.25f};
fArr[i2] = 0.0f;
}
int i4 = 0;
while (true) {
int i5 = i + i4;
if (i5 == charSequence.length()) {
byte[] bArr = new byte[i3];
int[] iArr = new int[i3];
int findMinimums = findMinimums(fArr, iArr, Integer.MAX_VALUE, bArr);
int minimumCount = getMinimumCount(bArr);
if (iArr[0] == findMinimums) {
return 0;
}
if (minimumCount == 1 && bArr[5] > 0) {
return 5;
}
if (minimumCount == 1 && bArr[4] > 0) {
return 4;
}
if (minimumCount != 1 || bArr[2] <= 0) {
return (minimumCount != 1 || bArr[3] <= 0) ? 1 : 3;
}
return 2;
}
char charAt = charSequence.charAt(i5);
i4++;
if (isDigit(charAt)) {
fArr[0] = fArr[0] + 0.5f;
} else if (isExtendedASCII(charAt)) {
float ceil = (float) Math.ceil(fArr[0]);
fArr[0] = ceil;
fArr[0] = ceil + 2.0f;
} else {
float ceil2 = (float) Math.ceil(fArr[0]);
fArr[0] = ceil2;
fArr[0] = ceil2 + 1.0f;
}
if (isNativeC40(charAt)) {
fArr[1] = fArr[1] + 0.6666667f;
} else if (isExtendedASCII(charAt)) {
fArr[1] = fArr[1] + 2.6666667f;
} else {
fArr[1] = fArr[1] + 1.3333334f;
}
if (isNativeText(charAt)) {
fArr[2] = fArr[2] + 0.6666667f;
} else if (isExtendedASCII(charAt)) {
fArr[2] = fArr[2] + 2.6666667f;
} else {
fArr[2] = fArr[2] + 1.3333334f;
}
if (isNativeX12(charAt)) {
fArr[3] = fArr[3] + 0.6666667f;
} else if (isExtendedASCII(charAt)) {
fArr[3] = fArr[3] + 4.3333335f;
} else {
fArr[3] = fArr[3] + 3.3333333f;
}
if (isNativeEDIFACT(charAt)) {
fArr[4] = fArr[4] + 0.75f;
} else if (isExtendedASCII(charAt)) {
fArr[4] = fArr[4] + 4.25f;
} else {
fArr[4] = fArr[4] + 3.25f;
}
if (isSpecialB256(charAt)) {
c = 5;
fArr[5] = fArr[5] + 4.0f;
} else {
c = 5;
fArr[5] = fArr[5] + 1.0f;
}
if (i4 >= 4) {
int[] iArr2 = new int[i3];
byte[] bArr2 = new byte[i3];
findMinimums(fArr, iArr2, Integer.MAX_VALUE, bArr2);
int minimumCount2 = getMinimumCount(bArr2);
int i6 = iArr2[0];
int i7 = iArr2[c];
if (i6 < i7 && i6 < iArr2[1] && i6 < iArr2[2] && i6 < iArr2[3] && i6 < iArr2[4]) {
return 0;
}
if (i7 < i6) {
return 5;
}
byte b = bArr2[1];
byte b2 = bArr2[2];
byte b3 = bArr2[3];
byte b4 = bArr2[4];
if (b + b2 + b3 + b4 == 0) {
return 5;
}
if (minimumCount2 == 1 && b4 > 0) {
return 4;
}
if (minimumCount2 == 1 && b2 > 0) {
return 2;
}
if (minimumCount2 == 1 && b3 > 0) {
return 3;
}
int i8 = iArr2[1];
if (i8 + 1 < i6 && i8 + 1 < i7 && i8 + 1 < iArr2[4] && i8 + 1 < iArr2[2]) {
int i9 = iArr2[3];
if (i8 < i9) {
return 1;
}
if (i8 == i9) {
for (int i10 = i + i4 + 1; i10 < charSequence.length(); i10++) {
char charAt2 = charSequence.charAt(i10);
if (isX12TermSep(charAt2)) {
return 3;
}
if (!isNativeX12(charAt2)) {
break;
}
}
return 1;
}
}
}
i3 = 6;
}
}
public static int findMinimums(float[] fArr, int[] iArr, int i, byte[] bArr) {
Arrays.fill(bArr, (byte) 0);
for (int i2 = 0; i2 < 6; i2++) {
int ceil = (int) Math.ceil(fArr[i2]);
iArr[i2] = ceil;
if (i > ceil) {
Arrays.fill(bArr, (byte) 0);
i = ceil;
}
if (i == ceil) {
bArr[i2] = (byte) (bArr[i2] + 1);
}
}
return i;
}
public static int getMinimumCount(byte[] bArr) {
int i = 0;
for (int i2 = 0; i2 < 6; i2++) {
i += bArr[i2];
}
return i;
}
public static boolean isNativeX12(char c) {
if (isX12TermSep(c) || c == ' ') {
return true;
}
if (c < '0' || c > '9') {
return c >= 'A' && c <= 'Z';
}
return true;
}
public static int determineConsecutiveDigitCount(CharSequence charSequence, int i) {
int length = charSequence.length();
int i2 = 0;
if (i < length) {
char charAt = charSequence.charAt(i);
while (isDigit(charAt) && i < length) {
i2++;
i++;
if (i < length) {
charAt = charSequence.charAt(i);
}
}
}
return i2;
}
public static void illegalCharacter(char c) {
String hexString = Integer.toHexString(c);
throw new IllegalArgumentException("Illegal character: " + c + " (0x" + ("0000".substring(0, 4 - hexString.length()) + hexString) + ')');
}
}

View File

@@ -0,0 +1,145 @@
package com.google.zxing.datamatrix.encoder;
import com.google.zxing.Dimension;
import com.ironsource.mediationsdk.utils.IronSourceConstants;
import com.mbridge.msdk.playercommon.exoplayer2.extractor.ts.PsExtractor;
/* loaded from: classes3.dex */
public class SymbolInfo {
public static final SymbolInfo[] PROD_SYMBOLS;
public static SymbolInfo[] symbols;
public final int dataCapacity;
public final int dataRegions;
public final int errorCodewords;
public final int matrixHeight;
public final int matrixWidth;
public final boolean rectangular;
public final int rsBlockData;
public final int rsBlockError;
public final int getDataCapacity() {
return this.dataCapacity;
}
public int getDataLengthForInterleavedBlock(int i) {
return this.rsBlockData;
}
public final int getErrorCodewords() {
return this.errorCodewords;
}
public final int getErrorLengthForInterleavedBlock(int i) {
return this.rsBlockError;
}
static {
SymbolInfo[] symbolInfoArr = {new SymbolInfo(false, 3, 5, 8, 8, 1), new SymbolInfo(false, 5, 7, 10, 10, 1), new SymbolInfo(true, 5, 7, 16, 6, 1), new SymbolInfo(false, 8, 10, 12, 12, 1), new SymbolInfo(true, 10, 11, 14, 6, 2), new SymbolInfo(false, 12, 12, 14, 14, 1), new SymbolInfo(true, 16, 14, 24, 10, 1), new SymbolInfo(false, 18, 14, 16, 16, 1), new SymbolInfo(false, 22, 18, 18, 18, 1), new SymbolInfo(true, 22, 18, 16, 10, 2), new SymbolInfo(false, 30, 20, 20, 20, 1), new SymbolInfo(true, 32, 24, 16, 14, 2), new SymbolInfo(false, 36, 24, 22, 22, 1), new SymbolInfo(false, 44, 28, 24, 24, 1), new SymbolInfo(true, 49, 28, 22, 14, 2), new SymbolInfo(false, 62, 36, 14, 14, 4), new SymbolInfo(false, 86, 42, 16, 16, 4), new SymbolInfo(false, 114, 48, 18, 18, 4), new SymbolInfo(false, 144, 56, 20, 20, 4), new SymbolInfo(false, 174, 68, 22, 22, 4), new SymbolInfo(false, 204, 84, 24, 24, 4, 102, 42), new SymbolInfo(false, 280, 112, 14, 14, 16, IronSourceConstants.USING_CACHE_FOR_INIT_EVENT, 56), new SymbolInfo(false, 368, 144, 16, 16, 16, 92, 36), new SymbolInfo(false, 456, PsExtractor.AUDIO_STREAM, 18, 18, 16, 114, 48), new SymbolInfo(false, 576, 224, 20, 20, 16, 144, 56), new SymbolInfo(false, 696, 272, 22, 22, 16, 174, 68), new SymbolInfo(false, 816, 336, 24, 24, 16, 136, 56), new SymbolInfo(false, 1050, 408, 18, 18, 36, 175, 68), new SymbolInfo(false, 1304, 496, 20, 20, 36, 163, 62), new DataMatrixSymbolInfo144()};
PROD_SYMBOLS = symbolInfoArr;
symbols = symbolInfoArr;
}
public SymbolInfo(boolean z, int i, int i2, int i3, int i4, int i5) {
this(z, i, i2, i3, i4, i5, i, i2);
}
public SymbolInfo(boolean z, int i, int i2, int i3, int i4, int i5, int i6, int i7) {
this.rectangular = z;
this.dataCapacity = i;
this.errorCodewords = i2;
this.matrixWidth = i3;
this.matrixHeight = i4;
this.dataRegions = i5;
this.rsBlockData = i6;
this.rsBlockError = i7;
}
public static SymbolInfo lookup(int i, SymbolShapeHint symbolShapeHint, Dimension dimension, Dimension dimension2, boolean z) {
for (SymbolInfo symbolInfo : symbols) {
if (!(symbolShapeHint == SymbolShapeHint.FORCE_SQUARE && symbolInfo.rectangular) && ((symbolShapeHint != SymbolShapeHint.FORCE_RECTANGLE || symbolInfo.rectangular) && i <= symbolInfo.dataCapacity)) {
return symbolInfo;
}
}
if (z) {
throw new IllegalArgumentException("Can't find a symbol arrangement that matches the message. Data codewords: ".concat(String.valueOf(i)));
}
return null;
}
public final int getHorizontalDataRegions() {
int i = this.dataRegions;
int i2 = 1;
if (i != 1) {
i2 = 2;
if (i != 2 && i != 4) {
if (i == 16) {
return 4;
}
if (i == 36) {
return 6;
}
throw new IllegalStateException("Cannot handle this number of data regions");
}
}
return i2;
}
public final int getVerticalDataRegions() {
int i = this.dataRegions;
if (i == 1 || i == 2) {
return 1;
}
if (i == 4) {
return 2;
}
if (i == 16) {
return 4;
}
if (i == 36) {
return 6;
}
throw new IllegalStateException("Cannot handle this number of data regions");
}
public final int getSymbolDataWidth() {
return getHorizontalDataRegions() * this.matrixWidth;
}
public final int getSymbolDataHeight() {
return getVerticalDataRegions() * this.matrixHeight;
}
public final int getSymbolWidth() {
return getSymbolDataWidth() + (getHorizontalDataRegions() << 1);
}
public final int getSymbolHeight() {
return getSymbolDataHeight() + (getVerticalDataRegions() << 1);
}
public int getInterleavedBlockCount() {
return this.dataCapacity / this.rsBlockData;
}
public final String toString() {
StringBuilder sb = new StringBuilder();
sb.append(this.rectangular ? "Rectangular Symbol:" : "Square Symbol:");
sb.append(" data region ");
sb.append(this.matrixWidth);
sb.append('x');
sb.append(this.matrixHeight);
sb.append(", symbol size ");
sb.append(getSymbolWidth());
sb.append('x');
sb.append(getSymbolHeight());
sb.append(", symbol data size ");
sb.append(getSymbolDataWidth());
sb.append('x');
sb.append(getSymbolDataHeight());
sb.append(", codewords ");
sb.append(this.dataCapacity);
sb.append('+');
sb.append(this.errorCodewords);
return sb.toString();
}
}

View File

@@ -0,0 +1,8 @@
package com.google.zxing.datamatrix.encoder;
/* loaded from: classes3.dex */
public enum SymbolShapeHint {
FORCE_NONE,
FORCE_SQUARE,
FORCE_RECTANGLE
}

View File

@@ -0,0 +1,62 @@
package com.google.zxing.datamatrix.encoder;
/* loaded from: classes3.dex */
public final class TextEncoder extends C40Encoder {
@Override // com.google.zxing.datamatrix.encoder.C40Encoder
public int getEncodingMode() {
return 2;
}
@Override // com.google.zxing.datamatrix.encoder.C40Encoder
public int encodeChar(char c, StringBuilder sb) {
if (c == ' ') {
sb.append((char) 3);
return 1;
}
if (c >= '0' && c <= '9') {
sb.append((char) (c - ','));
return 1;
}
if (c >= 'a' && c <= 'z') {
sb.append((char) (c - 'S'));
return 1;
}
if (c < ' ') {
sb.append((char) 0);
sb.append(c);
return 2;
}
if (c >= '!' && c <= '/') {
sb.append((char) 1);
sb.append((char) (c - '!'));
return 2;
}
if (c >= ':' && c <= '@') {
sb.append((char) 1);
sb.append((char) (c - '+'));
return 2;
}
if (c >= '[' && c <= '_') {
sb.append((char) 1);
sb.append((char) (c - 'E'));
return 2;
}
if (c == '`') {
sb.append((char) 2);
sb.append((char) (c - '`'));
return 2;
}
if (c >= 'A' && c <= 'Z') {
sb.append((char) 2);
sb.append((char) (c - '@'));
return 2;
}
if (c >= '{' && c <= 127) {
sb.append((char) 2);
sb.append((char) (c - '`'));
return 2;
}
sb.append("\u0001\u001e");
return encodeChar((char) (c - 128), sb) + 2;
}
}

View File

@@ -0,0 +1,63 @@
package com.google.zxing.datamatrix.encoder;
/* loaded from: classes3.dex */
public final class X12Encoder extends C40Encoder {
@Override // com.google.zxing.datamatrix.encoder.C40Encoder
public int getEncodingMode() {
return 3;
}
@Override // com.google.zxing.datamatrix.encoder.C40Encoder, com.google.zxing.datamatrix.encoder.Encoder
public void encode(EncoderContext encoderContext) {
StringBuilder sb = new StringBuilder();
while (true) {
if (!encoderContext.hasMoreCharacters()) {
break;
}
char currentChar = encoderContext.getCurrentChar();
encoderContext.pos++;
encodeChar(currentChar, sb);
if (sb.length() % 3 == 0) {
C40Encoder.writeNextTriplet(encoderContext, sb);
if (HighLevelEncoder.lookAheadTest(encoderContext.getMessage(), encoderContext.pos, getEncodingMode()) != getEncodingMode()) {
encoderContext.signalEncoderChange(0);
break;
}
}
}
handleEOD(encoderContext, sb);
}
@Override // com.google.zxing.datamatrix.encoder.C40Encoder
public int encodeChar(char c, StringBuilder sb) {
if (c == '\r') {
sb.append((char) 0);
} else if (c == ' ') {
sb.append((char) 3);
} else if (c == '*') {
sb.append((char) 1);
} else if (c == '>') {
sb.append((char) 2);
} else if (c >= '0' && c <= '9') {
sb.append((char) (c - ','));
} else if (c >= 'A' && c <= 'Z') {
sb.append((char) (c - '3'));
} else {
HighLevelEncoder.illegalCharacter(c);
}
return 1;
}
@Override // com.google.zxing.datamatrix.encoder.C40Encoder
public void handleEOD(EncoderContext encoderContext, StringBuilder sb) {
encoderContext.updateSymbolInfo();
int dataCapacity = encoderContext.getSymbolInfo().getDataCapacity() - encoderContext.getCodewordCount();
encoderContext.pos -= sb.length();
if (encoderContext.getRemainingCharacters() > 1 || dataCapacity > 1 || encoderContext.getRemainingCharacters() != dataCapacity) {
encoderContext.writeCodeword((char) 254);
}
if (encoderContext.getNewEncoding() < 0) {
encoderContext.signalEncoderChange(0);
}
}
}