Top Description Fields Constructors Methods
io.netty.handler.codec.compression

pack-priv final Class Bzip2MoveToFrontTable

extends Object
Class Inheritance

A 256 entry Move To Front transform.

Field Summary

Modifier and TypeField and Description
private final byte[]
mtf

The Move To Front list.

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv byte

Returns:

The value at the given index
indexToFront
(final int
The index to move
index
)

Gets the value from a given index and moves it to the front of the MTF list (inverse Move To Front transform).

pack-priv int

Returns:

The position the value moved from
valueToFront
(final byte
The value to move
value
)

Moves a value to the head of the MTF list (forward Move To Front transform).

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

mtfback to summary
private final byte[] mtf

The Move To Front list.

Constructor Detail

Bzip2MoveToFrontTableback to summary
pack-priv Bzip2MoveToFrontTable()

Method Detail

indexToFrontback to summary
pack-priv byte indexToFront(final 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:int

The index to move

Returns:byte

The value at the given index

valueToFrontback to summary
pack-priv int valueToFront(final byte value)

Moves a value to the head of the MTF list (forward Move To Front transform).

Parameters
value:byte

The value to move

Returns:int

The position the value moved from