File tree Expand file tree Collapse file tree
src/main/java/net/eewbot/base32768j Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -189,6 +189,7 @@ public byte[] decode(String src) {
189189 long acc = 0L ;
190190 int bitCount = 0 ;
191191
192+ // ---- Fast Path (2文字): 2文字(=30bit) -> 3バイト + 余り6bit ----
192193 final int fast2Limit = end - 1 ; // 2文字取れる限界(lastは除外)
193194 while (si < fast2Limit ) {
194195 final int v0 = decode [src .charAt (si )];
@@ -254,9 +255,7 @@ public byte[] decode(String src) {
254255 if (bitCount > 0 && (acc & ((1L << bitCount ) - 1 )) != ((1L << bitCount ) - 1 )) {
255256 long actual = acc & ((1L << bitCount ) - 1 );
256257 long expected = (1L << bitCount ) - 1 ;
257- throw new IllegalBase32768TextException (
258- "Bad padding at position " + (n - 1 ) + ": expected " + bitCount + " bits of 1s, got 0b" + Long .toBinaryString (actual )
259- );
258+ throw new IllegalBase32768TextException ("Bad padding at position " + (n - 1 ) + ": expected " + bitCount + " bits of 1s, got 0b" + Long .toBinaryString (actual ));
260259 }
261260
262261 return out ;
You can’t perform that action at this time.
0 commit comments