Forward/random‐access reader over a bit‐vector‐encoded integer sequence.

Synopsis

Declared in <folly/compression/elias_fano/BitVectorCoding.h>

template<
    class Encoder,
    class Instructions = instructions::Default,
    bool kUnchecked = false>
class BitVectorReader;

Type Aliases

Name

Description

EncoderType

The encoder type whose output this reader consumes.

SizeType

The type used for positions and sizes.

SkipValueType

The type used to store skip and forward pointers.

ValueType

The element value type.

Member Functions

Name

Description

BitVectorReader [constructor]

Constructs a reader over the given compressed list.

jump

Jumps to the element at position n from any reader state.

jumpTo

Jumps to the first element >= v from any reader state.

next

Advances to the next element.

position

Returns the zero‐based index of the current element.

reset

Repositions the reader before the first element.

setDone

Marks the reader as positioned past the last element.

size

Returns the number of elements in the list.

skip

Advances by n elements.

skipTo

Skips forward to the first element >= v.

valid

Whether the reader is positioned on a valid element.

value

Returns the value of the current element. Requires valid().

Created with MrDocs