Class Bzip2MoveToFrontTable
java.lang.Object
io.netty.handler.codec.compression.Bzip2MoveToFrontTable
A 256 entry Move To Front transform.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(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).
-
Field Details
-
mtf
private final byte[] mtfThe Move To Front list.
-
-
Constructor Details
-
Bzip2MoveToFrontTable
Bzip2MoveToFrontTable()
-
-
Method Details
-
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
-