@InterfaceAudience.Private public class LongEncoder extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected int |
bytesPerDelta |
protected int |
bytesPerIndex |
protected long |
max |
protected long |
maxDelta |
protected long |
min |
protected long[] |
sortedUniqueValues |
protected int |
totalCompressedBytes |
protected java.util.HashSet<java.lang.Long> |
uniqueValues
fields
|
Constructor and Description |
---|
LongEncoder()
construct
|
Modifier and Type | Method and Description |
---|---|
void |
add(long timestamp)
methods
|
LongEncoder |
compile() |
byte[] |
getByteArray() |
int |
getBytesPerDelta() |
int |
getBytesPerIndex() |
long |
getDelta(int index) |
int |
getIndex(long value) |
long |
getMin()
get/set
|
int |
getNumUniqueValues() |
int |
getOutputArrayLength() |
long[] |
getSortedUniqueTimestamps() |
int |
getTotalCompressedBytes() |
void |
reset() |
java.lang.String |
toString()
Object methods
|
void |
writeBytes(java.io.OutputStream os) |
protected java.util.HashSet<java.lang.Long> uniqueValues
protected long[] sortedUniqueValues
protected long min
protected long max
protected long maxDelta
protected int bytesPerDelta
protected int bytesPerIndex
protected int totalCompressedBytes
public void reset()
public void add(long timestamp)
public LongEncoder compile()
public long getDelta(int index)
public int getIndex(long value)
public void writeBytes(java.io.OutputStream os) throws java.io.IOException
java.io.IOException
public byte[] getByteArray() throws java.io.IOException
java.io.IOException
public int getOutputArrayLength()
public int getNumUniqueValues()
public java.lang.String toString()
toString
in class java.lang.Object
public long getMin()
public int getBytesPerDelta()
public int getBytesPerIndex()
public int getTotalCompressedBytes()
public long[] getSortedUniqueTimestamps()