public final class RunningLengthWord
extends java.lang.Object
implements java.lang.Cloneable
Modifier and Type | Field and Description |
---|---|
(package private) Buffer |
buffer
The array of words.
|
static int |
LARGEST_LITERAL_COUNT
largest number of literal words in a run.
|
static long |
LARGEST_RUNNING_LENGTH_COUNT
largest number of clean words in a run
|
private static int |
LITERAL_BITS |
private static long |
NOT_RUNNING_LENGTH_PLUS_RUNNING_BIT |
private static long |
NOT_SHIFTED_LARGEST_RUNNING_LENGTH_COUNT |
(package private) int |
position
The position in array.
|
static int |
RUNNING_LENGTH_BITS
number of bits dedicated to marking of the running length of clean
words
|
private static long |
RUNNING_LENGTH_PLUS_RUNNING_BIT |
private static long |
SHIFTED_LARGEST_RUNNING_LENGTH_COUNT |
Constructor and Description |
---|
RunningLengthWord(Buffer buffer,
int p)
Instantiates a new running length word.
|
Modifier and Type | Method and Description |
---|---|
RunningLengthWord |
clone() |
int |
getNumberOfLiteralWords()
Gets the number of literal words.
|
(package private) static int |
getNumberOfLiteralWords(Buffer buffer,
int position) |
boolean |
getRunningBit()
Gets the running bit.
|
(package private) static boolean |
getRunningBit(Buffer buffer,
int position) |
long |
getRunningLength()
Gets the running length.
|
(package private) static long |
getRunningLength(Buffer buffer,
int position) |
(package private) static void |
setNumberOfLiteralWords(Buffer buffer,
int position,
long number) |
void |
setNumberOfLiteralWords(long number)
Sets the number of literal words.
|
void |
setRunningBit(boolean b)
Sets the running bit.
|
(package private) static void |
setRunningBit(Buffer buffer,
int position,
boolean b) |
(package private) static void |
setRunningLength(Buffer buffer,
int position,
long number) |
void |
setRunningLength(long number)
Sets the running length.
|
long |
size()
Return the size in uncompressed words represented by this running
length word.
|
java.lang.String |
toString() |
final Buffer buffer
int position
public static final int RUNNING_LENGTH_BITS
private static final int LITERAL_BITS
public static final int LARGEST_LITERAL_COUNT
public static final long LARGEST_RUNNING_LENGTH_COUNT
private static final long RUNNING_LENGTH_PLUS_RUNNING_BIT
private static final long SHIFTED_LARGEST_RUNNING_LENGTH_COUNT
private static final long NOT_RUNNING_LENGTH_PLUS_RUNNING_BIT
private static final long NOT_SHIFTED_LARGEST_RUNNING_LENGTH_COUNT
RunningLengthWord(Buffer buffer, int p)
buffer
- the bufferp
- position in the buffer where the running length word is
located.public int getNumberOfLiteralWords()
static int getNumberOfLiteralWords(Buffer buffer, int position)
public boolean getRunningBit()
static boolean getRunningBit(Buffer buffer, int position)
public long getRunningLength()
static long getRunningLength(Buffer buffer, int position)
public void setNumberOfLiteralWords(long number)
number
- the new number of literal wordsstatic void setNumberOfLiteralWords(Buffer buffer, int position, long number)
public void setRunningBit(boolean b)
b
- the new running bitstatic void setRunningBit(Buffer buffer, int position, boolean b)
public void setRunningLength(long number)
number
- the new running lengthstatic void setRunningLength(Buffer buffer, int position, long number)
public long size()
public java.lang.String toString()
toString
in class java.lang.Object
public RunningLengthWord clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException