Class PackedInt32s.Format
A format to write packed ints.
Note
This API is for internal purposes only and might change in incompatible ways in the next release.
Inheritance
PackedInt32s.Format
Assembly: Lucene.Net.dll
public class PackedInt32s.Format
Fields
Compact format, all bits are written contiguously.
Declaration
public static readonly PackedInt32s.Format PACKED
Field Value
A format that may insert padding bits to improve encoding and decoding
speed. Since this format doesn't support all possible bits per value, you
should never use it directly, but rather use
FastestFormatAndBits(int, int, float) to find the
format that best suits your needs.
Declaration
public static readonly PackedInt32s.Format PACKED_SINGLE_BLOCK
Field Value
Properties
Returns the ID of the format.
Declaration
Property Value
A format to write packed ints.
Note
This API is for internal purposes only and might change in incompatible ways in the next release.
Declaration
public static IEnumerable<PackedInt32s.Format> Values { get; }
Property Value
Methods
Get a format according to its ID.
Declaration
public static PackedInt32s.Format ById(int id)
Parameters
Type |
Name |
Description |
int |
id |
|
Returns
Computes how many byte blocks are needed to store valueCount
values of size bitsPerValue
.
Declaration
public virtual long ByteCount(int packedIntsVersion, int valueCount, int bitsPerValue)
Parameters
Type |
Name |
Description |
int |
packedIntsVersion |
|
int |
valueCount |
|
int |
bitsPerValue |
|
Returns
Computes how many long blocks are needed to store valueCount
values of size bitsPerValue
.
NOTE: This was longCount() in Lucene.
Declaration
public virtual int Int64Count(int packedIntsVersion, int valueCount, int bitsPerValue)
Parameters
Type |
Name |
Description |
int |
packedIntsVersion |
|
int |
valueCount |
|
int |
bitsPerValue |
|
Returns
Tests whether the provided number of bits per value is supported by the
format.
Declaration
public virtual bool IsSupported(int bitsPerValue)
Parameters
Type |
Name |
Description |
int |
bitsPerValue |
|
Returns
Returns the overhead per value, in bits.
Declaration
public virtual float OverheadPerValue(int bitsPerValue)
Parameters
Type |
Name |
Description |
int |
bitsPerValue |
|
Returns
Returns the overhead ratio (overhead per value / bits per value
).
Declaration
public virtual float OverheadRatio(int bitsPerValue)
Parameters
Type |
Name |
Description |
int |
bitsPerValue |
|
Returns