This class has 3 instances
native instance which is a JNI binding to
the original LZ4 C implementation.
safe Java instance which is a pure Java port
of the original C library,unsafe Java instance which is a Java port
using the unofficial sun.misc.Unsafe API.
Only the safe instance is guaranteed to work on your
JVM, as a consequence it is advised to use the fastestInstance() or
fastestJavaInstance() to pull a LZ4Factory instance.
All methods from this class are very costly, so you should get an instance
once, and then reuse it whenever possible. This is typically done by storing
a LZ4Factory instance in a static field.
| Modifier and Type | Field and Description |
|---|---|
| private final LZ4Compressor | |
| private final LZ4FastDecompressor | fastDecompressor
Deprecated
as a consequence of
LZ4FastDecompressor being deprecated.
|
| private final LZ4Compressor | |
| private final LZ4Compressor[] | |
| private final String | |
| private static LZ4Factory | |
| private static LZ4Factory | |
| private static LZ4Factory | |
| private final LZ4SafeDecompressor | safeDecompressor
Deprecated
as a consequence of
LZ4SafeDecompressor being deprecated.
|
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private static <T> T | |
| public LZ4Decompressor | |
| public LZ4Compressor | |
| public LZ4FastDecompressor | fastDecompressor()
Deprecated
as a consequence of
Return a LZ4FastDecompressor being deprecated.
LZ4FastDecompressor instance.
|
| public static LZ4Factory | |
| public static LZ4Factory | fastestJavaInstance()
Return the fastest available |
| public LZ4Compressor | highCompressor()
Return a |
| public LZ4Compressor | highCompressor(int compressionLevel)
Return a |
| private static LZ4Factory | |
| public static void | |
| public static synchronized LZ4Factory | nativeInstance()
Return a |
| public LZ4SafeDecompressor | safeDecompressor()
Deprecated
as a consequence of
Return a LZ4SafeDecompressor being deprecated.
LZ4SafeDecompressor instance.
|
| public static synchronized LZ4Factory | safeInstance()
Return a |
| public String | |
| public LZ4UnknownSizeDecompressor | unknownSizeDecompressor()
Deprecated
use
Return a safeDecompressor()
LZ4UnknownSizeDecompressor instance.
|
| public static synchronized LZ4Factory | unsafeInstance()
Return a |
| fastCompressor | back to summary |
|---|---|
| private final LZ4Compressor fastCompressor | |
| fastDecompressor | back to summary |
|---|---|
| private final LZ4FastDecompressor fastDecompressor
Deprecated as a consequence of | |
| highCompressor | back to summary |
|---|---|
| private final LZ4Compressor highCompressor | |
| highCompressors | back to summary |
|---|---|
| private final LZ4Compressor[] highCompressors | |
| impl | back to summary |
|---|---|
| private final String impl | |
| JAVA_SAFE_INSTANCE | back to summary |
|---|---|
| private static LZ4Factory JAVA_SAFE_INSTANCE | |
| JAVA_UNSAFE_INSTANCE | back to summary |
|---|---|
| private static LZ4Factory JAVA_UNSAFE_INSTANCE | |
| NATIVE_INSTANCE | back to summary |
|---|---|
| private static LZ4Factory NATIVE_INSTANCE | |
| safeDecompressor | back to summary |
|---|---|
| private final LZ4SafeDecompressor safeDecompressor
Deprecated as a consequence of | |
| LZ4Factory | back to summary |
|---|---|
| private LZ4Factory(String impl) throws ClassNotFoundException, NoSuchFieldException, SecurityException, IllegalArgumentException, IllegalAccessException, NoSuchMethodException, InstantiationException, InvocationTargetException | |
| classInstance | back to summary |
|---|---|
private static <T> T classInstance(String cls) throws NoSuchFieldException, SecurityException, ClassNotFoundException, IllegalArgumentException, IllegalAccessException
| |
| decompressor | back to summary |
|---|---|
| public LZ4Decompressor decompressor()
Deprecated Return a | |
| fastCompressor | back to summary |
|---|---|
| public LZ4Compressor fastCompressor() Return a blazing fast | |
| fastDecompressor | back to summary |
|---|---|
| public LZ4FastDecompressor fastDecompressor()
Deprecated as a consequence of Return a | |
| fastestInstance | back to summary |
|---|---|
| public static LZ4Factory fastestInstance() Return the fastest available
Please read | |
| fastestJavaInstance | back to summary |
|---|---|
| public static LZ4Factory fastestJavaInstance() Return the fastest available | |
| highCompressor | back to summary |
|---|---|
| public LZ4Compressor highCompressor() Return a | |
| highCompressor | back to summary |
|---|---|
| public LZ4Compressor highCompressor(int compressionLevel) Return a For current implementations, the following is true about compression level:
| |
| instance | back to summary |
|---|---|
| private static LZ4Factory instance(String impl) | |
| main | back to summary |
|---|---|
| public static void main(String[] args) Prints the fastest instance. | |
| nativeInstance | back to summary |
|---|---|
| public static synchronized LZ4Factory nativeInstance() Return a Please note that this instance has some traps you should be aware of:
| |
| safeDecompressor | back to summary |
|---|---|
| public LZ4SafeDecompressor safeDecompressor()
Deprecated as a consequence of Return a | |
| safeInstance | back to summary |
|---|---|
| public static synchronized LZ4Factory safeInstance() Return a | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |
| unknownSizeDecompressor | back to summary |
|---|---|
| public LZ4UnknownSizeDecompressor unknownSizeDecompressor()
Deprecated Return a | |
| unsafeInstance | back to summary |
|---|---|
| public static synchronized LZ4Factory unsafeInstance() Return a | |