Package org.brotli.dec
Class Dictionary
- java.lang.Object
-
- org.brotli.dec.Dictionary
-
public final class Dictionary extends java.lang.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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
Dictionary.DataLoader
-
Field Summary
Fields Modifier and Type Field Description private static java.nio.ByteBuffer
data
(package private) static int
MAX_DICTIONARY_WORD_LENGTH
(package private) static int
MIN_DICTIONARY_WORD_LENGTH
(package private) static int[]
offsets
(package private) static int[]
sizeBits
-
Constructor Summary
Constructors Constructor Description Dictionary()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.nio.ByteBuffer
getData()
static void
setData(java.nio.ByteBuffer newData, int[] newSizeBits)
-
-
-
Field Detail
-
MIN_DICTIONARY_WORD_LENGTH
static final int MIN_DICTIONARY_WORD_LENGTH
- See Also:
- Constant Field Values
-
MAX_DICTIONARY_WORD_LENGTH
static final int MAX_DICTIONARY_WORD_LENGTH
- See Also:
- Constant Field Values
-
data
private static java.nio.ByteBuffer data
-
offsets
static final int[] offsets
-
sizeBits
static final int[] sizeBits
-
-