java.lang.Object
kala.compress.compressors.brotli.dec.Dictionary

final class Dictionary extends Object
Collection of static dictionary words.

Dictionary content is loaded from binary resource when getData() is executed for the first time. Consequently, it saves memory and CPU in case dictionary is not required.

One possible drawback is that multiple threads that need dictionary data may be blocked (only once in each classworld). To avoid this, it is enough to call getData() proactively.

  • Field Details

    • OFFSETS_BY_LENGTH

      static final int[] OFFSETS_BY_LENGTH
    • SIZE_BITS_BY_LENGTH

      static final int[] SIZE_BITS_BY_LENGTH
    • MIN_WORD_LENGTH

      static final int MIN_WORD_LENGTH
      See Also:
    • MAX_WORD_LENGTH

      static final int MAX_WORD_LENGTH
      See Also:
    • MAX_TRANSFORMED_WORD_LENGTH

      static final int MAX_TRANSFORMED_WORD_LENGTH
      See Also:
  • Constructor Details

    • Dictionary

      Dictionary()
  • Method Details

    • getData

      static byte[] getData()