Class Bzip2MoveToFrontTable
- java.lang.Object
-
- io.netty.handler.codec.compression.Bzip2MoveToFrontTable
-
final class Bzip2MoveToFrontTable extends java.lang.Object
A 256 entry Move To Front transform.
-
-
Field Summary
Fields Modifier and Type Field Description private byte[]
mtf
The Move To Front list.
-
Constructor Summary
Constructors Constructor Description Bzip2MoveToFrontTable()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) byte
indexToFront(int index)
Gets the value from a given index and moves it to the front of the MTF list (inverse Move To Front transform).(package private) int
valueToFront(byte value)
Moves a value to the head of the MTF list (forward Move To Front transform).
-
-
-
Method Detail
-
valueToFront
int valueToFront(byte value)
Moves a value to the head of the MTF list (forward Move To Front transform).- Parameters:
value
- The value to move- Returns:
- The position the value moved from
-
indexToFront
byte indexToFront(int index)
Gets the value from a given index and moves it to the front of the MTF list (inverse Move To Front transform).- Parameters:
index
- The index to move- Returns:
- The value at the given index
-
-