easyice commented on PR #12841:
URL: https://github.com/apache/lucene/pull/12841#issuecomment-1845632140

   Thank you for sharing the code, it seems very clear, another way, could we 
pass the current block(ByteBuffer) to the decode function  like below? this 
will keep the remaining byte checking in each indexinputs.
   
   ```java
     private void readGroupVInt(long[] dst, int offset) throws IOException {
       if (buffer.remaining() < GroupVIntUtil.MAX_LENGTH_PER_GROUP) {
         GroupVIntUtil.readGroupVInt(this, dst, offset);
         return;
       }
       int pos = buffer.position();
       int len = GroupVIntUtil.readGroupVIntFromByteBuffer(buffer, pos, dst, 
offset);
       buffer.position(pos + len);
     }
   ```


-- 
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

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

Reply via email to