Section navigation

Public namespace Rowles.LeanCorpus.Codecs.Postings

Classes

Public class PackedIntCodec

Frame-of-Reference bit-packing codec for blocks of 128 integers. Packs values using the minimum number of bits needed for the largest value in the block.

Output format: [numBits : 1 byte][packed data : numBits × 16 bytes]. When numBits is 0 (all values are zero) the output is a single byte.

Structs

Public struct BlockPostingsEnum

Block-at-a-time postings iterator. Reads packed blocks of 128 doc IDs written by Rowles.LeanCorpus.Codecs.Postings.BlockPostingsWriter. Only the current block is decoded, keeping memory at a constant ~1 KB (2 × 128 ints) regardless of postings list length.

Public struct PostingsEnum

Forward-only cursor over a postings list. Decodes doc IDs and frequencies once into ArrayPool-rented buffers, then yields (DocId, Freq) pairs via MoveNext(). Optionally decodes positions when created via CreateWithPositions(IndexInput, long).

Lifetime contract: When using the lazy position path, this struct holds a raw byte* pointer into a memory-mapped IndexInput. The cursor retains the input mapping until the cursor is disposed, so disposing the source input or its owning searcher waits for active cursor operations to finish.