Package com.googlecode.javaewah
Class RunningLengthWord
java.lang.Object
com.googlecode.javaewah.RunningLengthWord
- All Implemented Interfaces:
Cloneable
Mostly for internal use.
- Since:
- 0.1.0
- Author:
- Daniel Lemire
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic intlargest number of literal words in a run.static longlargest number of clean words in a runstatic intnumber of bits dedicated to marking of the running length of clean words -
Method Summary
Modifier and TypeMethodDescriptionclone()intGets the number of literal words.booleanGets the running bit.longGets the running length.voidsetNumberOfLiteralWords(long number)Sets the number of literal words.voidsetRunningBit(boolean b)Sets the running bit.voidsetRunningLength(long number)Sets the running length.longsize()Return the size in uncompressed words represented by this running length word.toString()
-
Field Details
-
RUNNING_LENGTH_BITS
public static final int RUNNING_LENGTH_BITSnumber of bits dedicated to marking of the running length of clean words- See Also:
- Constant Field Values
-
LARGEST_LITERAL_COUNT
public static final int LARGEST_LITERAL_COUNTlargest number of literal words in a run.- See Also:
- Constant Field Values
-
LARGEST_RUNNING_LENGTH_COUNT
public static final long LARGEST_RUNNING_LENGTH_COUNTlargest number of clean words in a run- See Also:
- Constant Field Values
-
-
Method Details
-
getNumberOfLiteralWords
public int getNumberOfLiteralWords()Gets the number of literal words.- Returns:
- the number of literal words
-
getRunningBit
public boolean getRunningBit()Gets the running bit.- Returns:
- the running bit
-
getRunningLength
public long getRunningLength()Gets the running length.- Returns:
- the running length
-
setNumberOfLiteralWords
public void setNumberOfLiteralWords(long number)Sets the number of literal words.- Parameters:
number- the new number of literal words
-
setRunningBit
public void setRunningBit(boolean b)Sets the running bit.- Parameters:
b- the new running bit
-
setRunningLength
public void setRunningLength(long number)Sets the running length.- Parameters:
number- the new running length
-
size
public long size()Return the size in uncompressed words represented by this running length word.- Returns:
- the size
-
toString
-
clone
- Overrides:
clonein classObject- Throws:
CloneNotSupportedException
-