Stupiddd opened a new issue, #12225: URL: https://github.com/apache/lucene/issues/12225
### Description public void decode( byte[] blocks, int blocksOffset, long[] values, int valuesOffset, int iterations) { long nextValue = 0L; int bitsLeft = bitsPerValue; for (int i = 0; i < iterations * byteBlockCount; ++i) { final long bytes = blocks[blocksOffset++] & 0xFFL; if (bitsLeft > 8) { // just buffer bitsLeft -= 8; nextValue |= bytes << bitsLeft; } else { // flush int bits = 8 - bitsLeft; values[valuesOffset++] = nextValue | (bytes >>> bits); while (bits >= bitsPerValue) { bits -= bitsPerValue; values[valuesOffset++] = (bytes >>> bits) & mask; } // then buffer bitsLeft = bitsPerValue - bits; nextValue = (bytes & ((1L << bits) - 1)) << bitsLeft; } } assert bitsLeft == bitsPerValue; } maybe use for 【iterations * byteValueCount】 ### Version and environment details _No response_ -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org