Class Bzip2MoveToFrontTable

java.lang.Object
io.netty.handler.codec.compression.Bzip2MoveToFrontTable

final class Bzip2MoveToFrontTable extends Object
A 256 entry Move To Front transform.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final byte[]
    The Move To Front list.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    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).

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • mtf

      private final byte[] mtf
      The 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