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