public enum CompressionType extends java.lang.Enum<CompressionType>
DB contents are stored in a set of blocks, each of which holds a sequence of key,value pairs. Each block may be compressed before being stored in a file. The following enum describes which compression method (if any) is used to compress a block.
Enum Constant and Description |
---|
BZLIB2_COMPRESSION |
DISABLE_COMPRESSION_OPTION |
LZ4_COMPRESSION |
LZ4HC_COMPRESSION |
NO_COMPRESSION |
SNAPPY_COMPRESSION |
XPRESS_COMPRESSION |
ZLIB_COMPRESSION |
ZSTD_COMPRESSION |
Modifier and Type | Method and Description |
---|---|
static CompressionType |
getCompressionType(byte byteIdentifier)
Get the CompressionType enumeration value by
passing the byte identifier to this method.
|
static CompressionType |
getCompressionType(java.lang.String libraryName)
Get the CompressionType enumeration value by
passing the library name to this method.
|
java.lang.String |
getLibraryName()
Returns the library name of the compression type
identified by the enumeration value.
|
byte |
getValue()
Returns the byte value of the enumerations value.
|
static CompressionType |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static CompressionType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final CompressionType NO_COMPRESSION
public static final CompressionType SNAPPY_COMPRESSION
public static final CompressionType ZLIB_COMPRESSION
public static final CompressionType BZLIB2_COMPRESSION
public static final CompressionType LZ4_COMPRESSION
public static final CompressionType LZ4HC_COMPRESSION
public static final CompressionType XPRESS_COMPRESSION
public static final CompressionType ZSTD_COMPRESSION
public static final CompressionType DISABLE_COMPRESSION_OPTION
public static CompressionType[] values()
for (CompressionType c : CompressionType.values()) System.out.println(c);
public static CompressionType valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic static CompressionType getCompressionType(java.lang.String libraryName)
Get the CompressionType enumeration value by passing the library name to this method.
If library cannot be found the enumeration
value NO_COMPRESSION
will be returned.
libraryName
- compression library name.public static CompressionType getCompressionType(byte byteIdentifier)
Get the CompressionType enumeration value by passing the byte identifier to this method.
byteIdentifier
- of CompressionType.java.lang.IllegalArgumentException
- If CompressionType cannot be found for the
provided byteIdentifierpublic byte getValue()
Returns the byte value of the enumerations value.
public java.lang.String getLibraryName()
Returns the library name of the compression type identified by the enumeration value.