Enum Class Compression_Types
- All Implemented Interfaces:
Serializable,Comparable<Compression_Types>,Constable
Compression formats supported for NBT file storage.
NBT files can be stored with different compression schemes depending on their usage context.
Minecraft primarily uses GZIP compression, though other formats are supported for compatibility.
- Author:
- Paul Ferlitz
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic Compression_TypesgetById(int id) Looks up a compression type by its numeric identifier.intgetId()Returns the numeric identifier for this compression type.getName()Returns the human-readable name of this compression format.static Compression_TypesReturns the enum constant of this class with the specified name.static Compression_Types[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NONE
No compression - raw NBT binary data -
GZIP
GZIP compression - most common for Minecraft saves -
ZLIB
ZLIB compression - used by some Minecraft components -
LZ4
LZ4 compression - planned support for high-performance scenarios
-
-
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
-
getById
Looks up a compression type by its numeric identifier.- Parameters:
id- The compression type ID to find- Returns:
- The corresponding
Compression_Typesenum, ornullif ID is invalid
-
getId
public int getId()Returns the numeric identifier for this compression type.- Returns:
- The compression type ID
-
getName
Returns the human-readable name of this compression format.- Returns:
- The compression type name (e.g., "GZIP", "ZLIB")
-