Class Bzip2Rand


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

      Fields 
      Modifier and Type Field Description
      private static 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.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private Bzip2Rand()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      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 Detail

      • 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 Detail

      • Bzip2Rand

        private Bzip2Rand()
    • Method Detail

      • rNums

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