Package org.apache.lucene.util.packed
Interface PackedInts.Encoder
-
- Enclosing class:
- PackedInts
public static interface PackedInts.Encoder
An encoder for packed integers.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
byteBlockCount()
The minimum number of byte blocks to encode in a single iteration, when using byte encoding.int
byteValueCount()
The number of values that can be stored inbyteBlockCount()
byte blocks.void
encode(int[] values, int valuesOffset, byte[] blocks, int blocksOffset, int iterations)
Readiterations * valueCount()
values fromvalues
, encode them and write8 * iterations * blockCount()
blocks intoblocks
.void
encode(int[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations)
Readiterations * valueCount()
values fromvalues
, encode them and writeiterations * blockCount()
blocks intoblocks
.void
encode(long[] values, int valuesOffset, byte[] blocks, int blocksOffset, int iterations)
Readiterations * valueCount()
values fromvalues
, encode them and write8 * iterations * blockCount()
blocks intoblocks
.void
encode(long[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations)
Readiterations * valueCount()
values fromvalues
, encode them and writeiterations * blockCount()
blocks intoblocks
.int
longBlockCount()
The minimum number of long blocks to encode in a single iteration, when using long encoding.int
longValueCount()
The number of values that can be stored inlongBlockCount()
long blocks.
-
-
-
Method Detail
-
longBlockCount
int longBlockCount()
The minimum number of long blocks to encode in a single iteration, when using long encoding.
-
longValueCount
int longValueCount()
The number of values that can be stored inlongBlockCount()
long blocks.
-
byteBlockCount
int byteBlockCount()
The minimum number of byte blocks to encode in a single iteration, when using byte encoding.
-
byteValueCount
int byteValueCount()
The number of values that can be stored inbyteBlockCount()
byte blocks.
-
encode
void encode(long[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations)
Readiterations * valueCount()
values fromvalues
, encode them and writeiterations * blockCount()
blocks intoblocks
.- Parameters:
blocks
- the long blocks that hold packed integer valuesblocksOffset
- the offset where to start writing blocksvalues
- the values buffervaluesOffset
- the offset where to start reading valuesiterations
- controls how much data to encode
-
encode
void encode(long[] values, int valuesOffset, byte[] blocks, int blocksOffset, int iterations)
Readiterations * valueCount()
values fromvalues
, encode them and write8 * iterations * blockCount()
blocks intoblocks
.- Parameters:
blocks
- the long blocks that hold packed integer valuesblocksOffset
- the offset where to start writing blocksvalues
- the values buffervaluesOffset
- the offset where to start reading valuesiterations
- controls how much data to encode
-
encode
void encode(int[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations)
Readiterations * valueCount()
values fromvalues
, encode them and writeiterations * blockCount()
blocks intoblocks
.- Parameters:
blocks
- the long blocks that hold packed integer valuesblocksOffset
- the offset where to start writing blocksvalues
- the values buffervaluesOffset
- the offset where to start reading valuesiterations
- controls how much data to encode
-
encode
void encode(int[] values, int valuesOffset, byte[] blocks, int blocksOffset, int iterations)
Readiterations * valueCount()
values fromvalues
, encode them and write8 * iterations * blockCount()
blocks intoblocks
.- Parameters:
blocks
- the long blocks that hold packed integer valuesblocksOffset
- the offset where to start writing blocksvalues
- the values buffervaluesOffset
- the offset where to start reading valuesiterations
- controls how much data to encode
-
-