Class Bzip2Rand

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

final class Bzip2Rand extends Object
Random numbers for decompress Bzip2 blocks.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private static final int[]
    The Bzip2 specification originally included the optional addition of a slight pseudo-random perturbation to the input data, in order to work around the block sorting algorithm's non- optimal performance on some types of input.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
     
  • Method Summary

    Modifier and Type
    Method
    Description
    (package private) static int
    rNums(int i)
    Return the random number at a specific index.

    Methods inherited from class java.lang.Object

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

    • RNUMS

      private static final int[] RNUMS
      The Bzip2 specification originally included the optional addition of a slight pseudo-random perturbation to the input data, in order to work around the block sorting algorithm's non- optimal performance on some types of input. The current mainline bzip2 does not require this and will not create randomised blocks, but compatibility is still required for old data (and third party compressors that haven't caught up). When decompressing a randomised block, for each value N in this array, a 1 will be XOR'd onto the output of the Burrows-Wheeler transform stage after N bytes, then the next N taken from the following entry.
  • Constructor Details

    • Bzip2Rand

      private Bzip2Rand()
  • Method Details

    • rNums

      static int rNums(int i)
      Return the random number at a specific index.
      Parameters:
      i - the index
      Returns:
      the random number