Package org.apache.druid.segment.data
Enum CompressionStrategy
- All Implemented Interfaces:
Serializable,Comparable<CompressionStrategy>
Compression strategy is used to compress block of bytes without knowledge of what data the bytes represents.
When adding compression strategy, do not use id in the range [0x7C, 0xFD] (greater than 123 or less than -2), since
a flag mechanism is used in CompressionFactory that involves subtracting the value 126 from the compression id
(see
CompressionFactory.FLAG_BOUND)-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic interfacestatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic class -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThis value indicate no compression strategy should be used, and compression should not be block based. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic CompressionStrategyforId(byte id) static CompressionStrategyfromString(String name) abstract CompressionStrategy.Compressorabstract CompressionStrategy.DecompressorbytegetId()static CompressionStrategy[]toString()static CompressionStrategyReturns the enum constant of this type with the specified name.static CompressionStrategy[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
LZF
-
LZ4
-
ZSTD
-
UNCOMPRESSED
-
NONE
This value indicate no compression strategy should be used, and compression should not be block based.ColumnarLongs,ColumnarFloatsandColumnarDoublessupport non block based compression, and other types treat this asUNCOMPRESSED.
-
-
Field Details
-
DEFAULT_COMPRESSION_STRATEGY
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
getId
public byte getId() -
getCompressor
-
getDecompressor
-
toString
- Overrides:
toStringin classEnum<CompressionStrategy>
-
fromString
-
forId
-
noNoneValues
-