You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2021/08/25 10:57:24 UTC

[GitHub] [lucene] wuda0112 edited a comment on pull request #224: LUCENE-10035: Simple text codec add multi level skip list data

wuda0112 edited a comment on pull request #224:
URL: https://github.com/apache/lucene/pull/224#issuecomment-905393867


   > Let's give this a try.
   
   I tried to define the methods, but i am not sure is it fit,  if this correct, i will create a new issuse, and if this is your concern issuse, could you please defind it, because you are more professional!
   
   MultiLevelSkipListWriter
   
    ```
   /**
      * Writes the length of a level to the given output.
      *
      * @param levelLength the length of a level
      * @param output the IndexOutput the length shall be written to
      */
     protected void writeLevelLength(long levelLength,IndexOutput output) throws IOException{
       output.writeVLong(levelLength);
     }
   
     /**
      * Writes the child pointer of a block to the given output.
      *
      * @param childPointer block of higher level point to the lower level
      * @param skipBuffer the skip buffer to write to
      */
     protected void writeChildPointer(long childPointer, DataOutput skipBuffer) throws IOException{
       skipBuffer.writeVLong(childPointer);
     }
   ```
   
   
   MultiLevelSkipListReader
   
   ```
   /**
      * read the length of the current level.
      *
      * @param skipStream the IndexInput the length shall be read from
      * @return level length
      */
     protected long readLevelLength(IndexInput skipStream) throws IOException {
       return skipStream.readVLong();
     }
   
     /**
      * read the child pointer.
      *
      * @param skipStream the IndexInput the child pointer shall be read from
      * @return child pointer
      */
     protected long readChildPointer(IndexInput skipStream) throws IOException {
       return skipStream.readVLong();
     }
   ```


-- 
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-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org