Enum Class CompressionType
- All Implemented Interfaces:
Serializable, Comparable<CompressionType>, Constable
Compression codec used for message payloads.
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic CompressionTypeReturns the enum constant of this class with the specified name.static CompressionType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NONE
No compression. Lowest CPU cost but highest bandwidth and storage usage. -
LZ4
LZ4 compression. Very fast compression and decompression with moderate compression ratio. A good general-purpose default for latency-sensitive and CPU-sensitive workloads. -
ZLIB
ZLIB compression. Higher compression ratio than LZ4 but significantly slower. PreferZSTDwhich achieves better compression ratios with faster performance. -
ZSTD
Zstandard compression. Best compression ratio of all options with decompression speed close to LZ4. Recommended for throughput and storage-optimized workloads. -
SNAPPY
Snappy compression. Very fast with a compression profile similar to LZ4. Useful for compatibility with ecosystems that standardize on Snappy.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException- if the argument is null
-